{"type": "func", "start": 5374373920, "end": 5374374112, "name": "GJChestSprite::setColor", "pseudocode": "// \n// GJChestSprite::setColor from 0x140567020 to 0x1405670e0 (192 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1407db1a0\n// > <???> @ 0x14092c57c\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:34:17 +0000\n// \n\nint __fastcall GJChestSprite::setColor(cocos2d::CCSprite *a1, __int16 *a2)\n{\n  bool v2; // zf\n  _BYTE *v3; // rbx\n  __int16 v4; // ax\n  int v5; // r8d\n  cocos2d::CCArray *v6; // rax\n  cocos2d::CCArray *v7; // rbx\n  struct cocos2d::CCObject *v8; // rax\n  __int16 v10; // [rsp+30h] [rbp+8h] BYREF\n  char v11; // [rsp+32h] [rbp+Ah]\n\n  v2 = *((_BYTE *)a1 + 288) == 0;\n  v3 = (char *)a1 - 320;\n  v4 = *a2;\n  v5 = *((unsigned __int8 *)a2 + 2);\n  v10 = *a2;\n  v11 = v5;\n  if ( !v2 )\n  {\n    LOBYTE(v10) = (int)(float)((float)(unsigned __int8)v4 * 0.40000001);\n    HIBYTE(v10) = (int)(float)((float)HIBYTE(v10) * 0.40000001);\n    v11 = (int)(float)((float)v5 * 0.40000001);\n  }\n  cocos2d::CCSprite::setColor(a1, (const struct cocos2d::_ccColor3B *)&v10);\n  v6 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v3 + 480LL))(v3);\n  v7 = v6;\n  if ( v6 )\n  {\n    LODWORD(v6) = cocos2d::CCArray::count(v6);\n    if ( (_DWORD)v6 )\n    {\n      v8 = cocos2d::CCArray::objectAtIndex(v7, 0);\n      LODWORD(v6) = (**((__int64 (__fastcall ***)(__int64, __int16 *))v8 + 40))((__int64)v8 + 320, &v10);\n    }\n  }\n  return (int)v6;\n}", "assembly": "; \n; GJChestSprite::setColor from 0x140567020 to 0x1405670e0 (192 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1407db1a0\n; > <???> @ 0x14092c57c\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:34:17 +0000\n; \npush    rbx                                                            ; +0x0, 0x140567020\nsub     rsp, 20h                                                       ; +0x2, 0x140567022\ncmp     byte ptr [rcx+120h], 0                                         ; +0x6, 0x140567026\nlea     rbx, [rcx-140h]                                                ; +0xd, 0x14056702d\nmovzx   eax, word ptr [rdx]                                            ; +0x14, 0x140567034\nmovzx   r8d, byte ptr [rdx+2]                                          ; +0x17, 0x140567037\nmov     [rsp+28h+arg_0], ax                                            ; +0x1c, 0x14056703c\nmov     [rsp+28h+arg_2], r8b                                           ; +0x21, 0x140567041\njz      short loc_140567092                                            ; +0x26, 0x140567046\nmovss   xmm1, cs:dword_140834EDC                                       ; +0x28, 0x140567048\nmovzx   eax, al                                                        ; +0x30, 0x140567050\nmovd    xmm0, eax                                                      ; +0x33, 0x140567053\ncvtdq2ps xmm0, xmm0                                                    ; +0x37, 0x140567057\nmulss   xmm0, xmm1                                                     ; +0x3a, 0x14056705a\ncvttss2si eax, xmm0                                                    ; +0x3e, 0x14056705e\nmov     byte ptr [rsp+28h+arg_0], al                                   ; +0x42, 0x140567062\nmovzx   eax, byte ptr [rsp+28h+arg_0+1]                                ; +0x46, 0x140567066\nmovd    xmm0, eax                                                      ; +0x4b, 0x14056706b\ncvtdq2ps xmm0, xmm0                                                    ; +0x4f, 0x14056706f\nmulss   xmm0, xmm1                                                     ; +0x52, 0x140567072\ncvttss2si eax, xmm0                                                    ; +0x56, 0x140567076\nmovd    xmm0, r8d                                                      ; +0x5a, 0x14056707a\ncvtdq2ps xmm0, xmm0                                                    ; +0x5f, 0x14056707f\nmov     byte ptr [rsp+28h+arg_0+1], al                                 ; +0x62, 0x140567082\nmulss   xmm0, xmm1                                                     ; +0x66, 0x140567086\ncvttss2si eax, xmm0                                                    ; +0x6a, 0x14056708a\nmov     [rsp+28h+arg_2], al                                            ; +0x6e, 0x14056708e\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x72, 0x140567092\ncall    cs:__imp_?setColor@CCSprite@cocos2d@@UEAAXAEBU_ccColor3B@2@@Z; cocos2d::CCSprite::setColor(cocos2d::_ccColor3B const &) ; +0x77, 0x140567097\nmov     rax, [rbx]                                                     ; +0x7d, 0x14056709d\nmov     rcx, rbx                                                       ; +0x80, 0x1405670a0\ncall    qword ptr [rax+1E0h]                                           ; +0x83, 0x1405670a3\nmov     rbx, rax                                                       ; +0x89, 0x1405670a9\ntest    rax, rax                                                       ; +0x8c, 0x1405670ac\njz      short loc_1405670DA                                            ; +0x8f, 0x1405670af\nmov     rcx, rax                                                       ; +0x91, 0x1405670b1\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x94, 0x1405670b4\ntest    eax, eax                                                       ; +0x9a, 0x1405670ba\njz      short loc_1405670DA                                            ; +0x9c, 0x1405670bc\nxor     edx, edx                                                       ; +0x9e, 0x1405670be\nmov     rcx, rbx                                                       ; +0xa0, 0x1405670c0\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xa3, 0x1405670c3\nlea     rdx, [rsp+28h+arg_0]                                           ; +0xa9, 0x1405670c9\nlea     rcx, [rax+140h]                                                ; +0xae, 0x1405670ce\nmov     rax, [rcx]                                                     ; +0xb5, 0x1405670d5\ncall    qword ptr [rax]                                                ; +0xb8, 0x1405670d8\nadd     rsp, 20h                                                       ; +0xba, 0x1405670da\npop     rbx                                                            ; +0xbe, 0x1405670de\nretn                                                                   ; +0xbf, 0x1405670df", "xrefs": ["<???> @ 0x1407db1a0", "<???> @ 0x14092c57c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}