{"type": "func", "start": 6443029584, "end": 6443029798, "name": "cocos2d::CCSprite::updateColor", "pseudocode": "// \n// cocos2d::CCSprite::updateColor from 0x18008d450 to 0x18008d526 (214 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCSprite::setColor @ 0x18008c3e4\n// > cocos2d::CCSprite::setOpacity @ 0x18008c612\n// > cocos2d::CCSprite::setOpacityModifyRGB @ 0x18008c645\n// > cocos2d::CCSprite::updateDisplayedColor @ 0x18008d54a\n// > cocos2d::CCSprite::updateDisplayedOpacity @ 0x18008d56a\n// > <???> @ 0x1801438a8\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall cocos2d::CCSprite::updateColor(cocos2d::CCSprite *this)\n{\n  __int64 r; // rdx\n  float v2; // xmm1_4\n  bool v3; // zf\n  unsigned int m_uAtlasIndex; // r8d\n  cocos2d::ccColor4B v5; // [rsp+8h] [rbp+8h]\n\n  r = this->_displayedColor.r;\n  *(cocos2d::ccColor3B *)&v5.r = this->_displayedColor;\n  v5.a = this->_displayedOpacity;\n  if ( this->m_bOpacityModifyRGB )\n  {\n    v2 = (float)this->_displayedOpacity / 255.0;\n    v5.r = (int)(float)((float)(int)r * v2);\n    v5.g = (int)(float)((float)this->_displayedColor.g * v2);\n    v5.b = (int)(float)((float)this->_displayedColor.b * v2);\n  }\n  v3 = this->m_pobBatchNode == nullptr;\n  this->m_sQuad.bl.colors = v5;\n  this->m_sQuad.br.colors = v5;\n  this->m_sQuad.tl.colors = v5;\n  this->m_sQuad.tr.colors = v5;\n  if ( !v3 )\n  {\n    m_uAtlasIndex = this->m_uAtlasIndex;\n    if ( m_uAtlasIndex == -1 )\n    {\n      LOBYTE(r) = 1;\n      ((void (__fastcall *)(cocos2d::CCSprite *, __int64))this->setDirty)(this, r);\n    }\n    else\n    {\n      cocos2d::CCTextureAtlas::updateQuad(this->m_pobTextureAtlas, &this->m_sQuad, m_uAtlasIndex);\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCSprite::updateColor from 0x18008d450 to 0x18008d526 (214 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCSprite::setColor @ 0x18008c3e4\n; > cocos2d::CCSprite::setOpacity @ 0x18008c612\n; > cocos2d::CCSprite::setOpacityModifyRGB @ 0x18008c645\n; > cocos2d::CCSprite::updateDisplayedColor @ 0x18008d54a\n; > cocos2d::CCSprite::updateDisplayedOpacity @ 0x18008d56a\n; > <???> @ 0x1801438a8\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\ncmp     byte ptr [rcx+22Ch], 0                                         ; +0x0, 0x18008d450\nmovzx   edx, byte ptr [rcx+14Ah]                                       ; +0x7, 0x18008d457\nmovzx   r8d, byte ptr [rcx+14Bh]                                       ; +0xe, 0x18008d45e\nmovzx   r9d, byte ptr [rcx+14Ch]                                       ; +0x16, 0x18008d466\nmovzx   eax, byte ptr [rcx+148h]                                       ; +0x1e, 0x18008d46e\nmov     byte ptr [rsp+arg_0], dl                                       ; +0x25, 0x18008d475\nmov     byte ptr [rsp+arg_0+1], r8b                                    ; +0x29, 0x18008d479\nmov     byte ptr [rsp+arg_0+2], r9b                                    ; +0x2e, 0x18008d47e\nmov     byte ptr [rsp+arg_0+3], al                                     ; +0x33, 0x18008d483\njz      short loc_18008D4D3                                            ; +0x37, 0x18008d487\nmovd    xmm1, eax                                                      ; +0x39, 0x18008d489\ncvtdq2ps xmm1, xmm1                                                    ; +0x3d, 0x18008d48d\nmovd    xmm0, edx                                                      ; +0x40, 0x18008d490\ndivss   xmm1, cs:dword_1800E5838                                       ; +0x44, 0x18008d494\ncvtdq2ps xmm0, xmm0                                                    ; +0x4c, 0x18008d49c\nmulss   xmm0, xmm1                                                     ; +0x4f, 0x18008d49f\ncvttss2si eax, xmm0                                                    ; +0x53, 0x18008d4a3\nmovd    xmm0, r8d                                                      ; +0x57, 0x18008d4a7\ncvtdq2ps xmm0, xmm0                                                    ; +0x5c, 0x18008d4ac\nmov     byte ptr [rsp+arg_0], al                                       ; +0x5f, 0x18008d4af\nmulss   xmm0, xmm1                                                     ; +0x63, 0x18008d4b3\ncvttss2si eax, xmm0                                                    ; +0x67, 0x18008d4b7\nmovd    xmm0, r9d                                                      ; +0x6b, 0x18008d4bb\ncvtdq2ps xmm0, xmm0                                                    ; +0x70, 0x18008d4c0\nmov     byte ptr [rsp+arg_0+1], al                                     ; +0x73, 0x18008d4c3\nmulss   xmm0, xmm1                                                     ; +0x77, 0x18008d4c7\ncvttss2si eax, xmm0                                                    ; +0x7b, 0x18008d4cb\nmov     byte ptr [rsp+arg_0+2], al                                     ; +0x7f, 0x18008d4cf\ncmp     qword ptr [rcx+170h], 0                                        ; +0x83, 0x18008d4d3\nmov     eax, [rsp+arg_0]                                               ; +0x8b, 0x18008d4db\nmov     [rcx+1F0h], eax                                                ; +0x8f, 0x18008d4df\nmov     [rcx+220h], eax                                                ; +0x95, 0x18008d4e5\nmov     [rcx+1D8h], eax                                                ; +0x9b, 0x18008d4eb\nmov     [rcx+208h], eax                                                ; +0xa1, 0x18008d4f1\njz      short locret_18008D525                                         ; +0xa7, 0x18008d4f7\nmov     r8d, [rcx+168h]; unsigned int                                  ; +0xa9, 0x18008d4f9\ncmp     r8d, 0FFFFFFFFh                                                ; +0xb0, 0x18008d500\njz      short loc_18008D519                                            ; +0xb4, 0x18008d504\nlea     rdx, [rcx+1CCh]; struct cocos2d::_ccV3F_C4B_T2F_Quad *         ; +0xb6, 0x18008d506\nmov     rcx, [rcx+160h]; this                                          ; +0xbd, 0x18008d50d\njmp     ?updateQuad@CCTextureAtlas@cocos2d@@QEAAXPEAU_ccV3F_C4B_T2F_Quad@2@I@Z; cocos2d::CCTextureAtlas::updateQuad(cocos2d::_ccV3F_C4B_T2F_Quad *,uint) ; +0xc4, 0x18008d514\nmov     rax, [rcx]                                                     ; +0xc9, 0x18008d519\nmov     dl, 1                                                          ; +0xcc, 0x18008d51c\njmp     qword ptr [rax+408h]                                           ; +0xce, 0x18008d51e\nretn                                                                   ; +0xd5, 0x18008d525", "xrefs": ["cocos2d::CCSprite::setColor @ 0x18008c3e4", "cocos2d::CCSprite::setOpacity @ 0x18008c612", "cocos2d::CCSprite::setOpacityModifyRGB @ 0x18008c645", "cocos2d::CCSprite::updateDisplayedColor @ 0x18008d54a", "cocos2d::CCSprite::updateDisplayedOpacity @ 0x18008d56a", "<???> @ 0x1801438a8"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}