{"type": "func", "start": 5372712624, "end": 5372712816, "name": "GJChestSprite::setColor", "pseudocode": "// \n// GJChestSprite::setColor from 0x1403d16b0 to 0x1403d1770 (192 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1405cd520\n// > <???> @ 0x1406d7c7c\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 GJChestSprite::setColor(GJChestSprite *a1, const cocos2d::ccColor3B *a2)\n{\n  __int16 v2; // ax\n  int b; // ecx\n  cocos2d::CCArray *v5; // rax\n  cocos2d::CCArray *v6; // rbx\n  struct cocos2d::CCObject *v7; // rax\n  struct cocos2d::_ccColor3B v8; // [rsp+30h] [rbp+8h] BYREF\n\n  v2 = *(_WORD *)&a2->r;\n  b = a2->b;\n  *(_WORD *)&v8.r = *(_WORD *)&a2->r;\n  v8.b = b;\n  if ( a1->m_bReorderChildDirty )\n  {\n    v8.r = (int)(float)((float)(unsigned __int8)v2 * 0.40000001);\n    v8.g = (int)(float)((float)v8.g * 0.40000001);\n    v8.b = (int)(float)((float)b * 0.40000001);\n  }\n  cocos2d::CCSprite::setColor(a1, &v8);\n  v5 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(int *))(*(_QWORD *)&a1[-1].m_nUpdateScriptHandler + 464LL))(&a1[-1].m_nUpdateScriptHandler);\n  v6 = v5;\n  if ( v5 )\n  {\n    if ( cocos2d::CCArray::count(v5) )\n    {\n      v7 = cocos2d::CCArray::objectAtIndex(v6, 0);\n      (**(void (__fastcall ***)(__int64, struct cocos2d::_ccColor3B *))&v7[5].m_unknown2)(\n        (__int64)&v7[5].m_unknown2,\n        &v8);\n    }\n  }\n}", "assembly": "; \n; GJChestSprite::setColor from 0x1403d16b0 to 0x1403d1770 (192 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1405cd520\n; > <???> @ 0x1406d7c7c\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\npush    rbx                                                            ; +0x0, 0x1403d16b0\nsub     rsp, 20h                                                       ; +0x2, 0x1403d16b2\nmovzx   eax, word ptr [rdx]                                            ; +0x6, 0x1403d16b6\nmov     rbx, rcx                                                       ; +0x9, 0x1403d16b9\nmovzx   ecx, byte ptr [rdx+2]                                          ; +0xc, 0x1403d16bc\nmov     [rsp+28h+arg_0], ax                                            ; +0x10, 0x1403d16c0\nmov     [rsp+28h+arg_2], cl                                            ; +0x15, 0x1403d16c5\ncmp     byte ptr [rbx+120h], 0                                         ; +0x19, 0x1403d16c9\njz      short loc_1403D171B                                            ; +0x20, 0x1403d16d0\nmovss   xmm1, cs:dword_140622AD0                                       ; +0x22, 0x1403d16d2\nmovzx   eax, al                                                        ; +0x2a, 0x1403d16da\nmovd    xmm0, eax                                                      ; +0x2d, 0x1403d16dd\ncvtdq2ps xmm0, xmm0                                                    ; +0x31, 0x1403d16e1\nmulss   xmm0, xmm1                                                     ; +0x34, 0x1403d16e4\ncvttss2si eax, xmm0                                                    ; +0x38, 0x1403d16e8\nmov     byte ptr [rsp+28h+arg_0], al                                   ; +0x3c, 0x1403d16ec\nmovzx   eax, byte ptr [rsp+28h+arg_0+1]                                ; +0x40, 0x1403d16f0\nmovd    xmm0, eax                                                      ; +0x45, 0x1403d16f5\ncvtdq2ps xmm0, xmm0                                                    ; +0x49, 0x1403d16f9\nmulss   xmm0, xmm1                                                     ; +0x4c, 0x1403d16fc\ncvttss2si eax, xmm0                                                    ; +0x50, 0x1403d1700\nmovd    xmm0, ecx                                                      ; +0x54, 0x1403d1704\ncvtdq2ps xmm0, xmm0                                                    ; +0x58, 0x1403d1708\nmov     byte ptr [rsp+28h+arg_0+1], al                                 ; +0x5b, 0x1403d170b\nmulss   xmm0, xmm1                                                     ; +0x5f, 0x1403d170f\ncvttss2si eax, xmm0                                                    ; +0x63, 0x1403d1713\nmov     [rsp+28h+arg_2], al                                            ; +0x67, 0x1403d1717\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x6b, 0x1403d171b\nmov     rcx, rbx                                                       ; +0x70, 0x1403d1720\ncall    cs:__imp_?setColor@CCSprite@cocos2d@@UEAAXAEBU_ccColor3B@2@@Z; cocos2d::CCSprite::setColor(cocos2d::_ccColor3B const &) ; +0x73, 0x1403d1723\nlea     rcx, [rbx-140h]                                                ; +0x79, 0x1403d1729\nmov     rax, [rcx]                                                     ; +0x80, 0x1403d1730\ncall    qword ptr [rax+1D0h]                                           ; +0x83, 0x1403d1733\nmov     rbx, rax                                                       ; +0x89, 0x1403d1739\ntest    rax, rax                                                       ; +0x8c, 0x1403d173c\njz      short loc_1403D176A                                            ; +0x8f, 0x1403d173f\nmov     rcx, rax                                                       ; +0x91, 0x1403d1741\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x94, 0x1403d1744\ntest    eax, eax                                                       ; +0x9a, 0x1403d174a\njz      short loc_1403D176A                                            ; +0x9c, 0x1403d174c\nxor     edx, edx                                                       ; +0x9e, 0x1403d174e\nmov     rcx, rbx                                                       ; +0xa0, 0x1403d1750\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xa3, 0x1403d1753\nlea     rdx, [rsp+28h+arg_0]                                           ; +0xa9, 0x1403d1759\nlea     rcx, [rax+140h]                                                ; +0xae, 0x1403d175e\nmov     rax, [rcx]                                                     ; +0xb5, 0x1403d1765\ncall    qword ptr [rax]                                                ; +0xb8, 0x1403d1768\nadd     rsp, 20h                                                       ; +0xba, 0x1403d176a\npop     rbx                                                            ; +0xbe, 0x1403d176e\nretn                                                                   ; +0xbf, 0x1403d176f", "xrefs": ["<???> @ 0x1405cd520", "<???> @ 0x1406d7c7c"], "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"}