{"type": "func", "start": 4301041232, "end": 4301041459, "name": "GameObject::getActiveColorForMode", "pseudocode": "// \n// GameObject::getActiveColorForMode from 0x1005cae50 to 0x1005caf33 (227 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::addObject @ 0x1000b20f8\n// > PlayLayer::addObject @ 0x1000b2114\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\nconst cocos2d::ccColor3B *__fastcall GameObject::getActiveColorForMode(GameObject *a1, int a2, bool a3)\n{\n  const cocos2d::ccColor3B *result; // rax\n  GJEffectManager *m_goEffectManager; // r14\n  int v5; // esi\n  GameObject *v6; // r15\n  unsigned __int16 *v7; // rax\n  cocos2d::ccHSVValue v8; // 0:xmm0_8.8,8:rdx.8\n\n  result = (const cocos2d::ccColor3B *)&unk_10081F483;\n  if ( a2 <= 1010 )\n  {\n    if ( !a2 )\n      return result;\n    if ( a2 == 1010 )\n      return (const cocos2d::ccColor3B *)&unk_10081F480;\nLABEL_9:\n    if ( a3 )\n      return &a1->m_mainActionSprite->m_copyColor;\n    else\n      return &a1->m_detailActionSprite->m_copyColor;\n  }\n  if ( a2 == 1011 )\n    return result;\n  if ( a2 != 1012 )\n    goto LABEL_9;\n  m_goEffectManager = a1->m_goEffectManager;\n  if ( a3 )\n  {\n    v5 = *(unsigned __int16 *)&a1->m_mainActionSprite->m_copyColor.r | (a1->m_mainActionSprite->m_copyColor.b << 16);\n    *(_QWORD *)&v8.h = 0x3F26666600000000LL;\n    v6 = a1;\n  }\n  else\n  {\n    v6 = a1;\n    v7 = (unsigned __int16 *)((__int64 (__fastcall *)(GameObject *))a1->getColor)(a1);\n    v5 = *v7 | (*((unsigned __int8 *)v7 + 2) << 16);\n    *(_QWORD *)&v8.h = 0x3F26666600000000LL;\n  }\n  *(_QWORD *)&v8.v = 0x1003E19999ALL;\n  v6->m_groupColor = GJEffectManager::colorForEffect(m_goEffectManager, (cocos2d::ccColor3B)v5, v8);\n  return &v6->m_groupColor;\n}", "assembly": "; \n; GameObject::getActiveColorForMode from 0x1005cae50 to 0x1005caf33 (227 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::addObject @ 0x1000b20f8\n; > PlayLayer::addObject @ 0x1000b2114\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\nlea     rax, unk_10081F483                                             ; +0x0, 0x1005cae50\ncmp     esi, 3F2h                                                      ; +0x7, 0x1005cae57\njg      short loc_1005CAE73                                            ; +0xd, 0x1005cae5d\ntest    esi, esi                                                       ; +0xf, 0x1005cae5f\njz      short locret_1005CAEE1                                         ; +0x11, 0x1005cae61\ncmp     esi, 3F2h                                                      ; +0x13, 0x1005cae63\njnz     short loc_1005CAEC9                                            ; +0x19, 0x1005cae69\nlea     rax, unk_10081F480                                             ; +0x1b, 0x1005cae6b\nretn                                                                   ; +0x22, 0x1005cae72\ncmp     esi, 3F3h                                                      ; +0x23, 0x1005cae73\njz      short locret_1005CAEE1                                         ; +0x29, 0x1005cae79\ncmp     esi, 3F4h                                                      ; +0x2b, 0x1005cae7b\njnz     short loc_1005CAEC9                                            ; +0x31, 0x1005cae81\npush    rbp                                                            ; +0x33, 0x1005cae83\nmov     rbp, rsp                                                       ; +0x34, 0x1005cae84\npush    r15                                                            ; +0x37, 0x1005cae87\npush    r14                                                            ; +0x39, 0x1005cae89\npush    rbx                                                            ; +0x3b, 0x1005cae8b\npush    rax                                                            ; +0x3c, 0x1005cae8c\nmov     rbx, 1003E19999Ah                                              ; +0x3d, 0x1005cae8d\nmov     r14, [rdi+500h]                                                ; +0x47, 0x1005cae97\ntest    dl, dl                                                         ; +0x4e, 0x1005cae9e\njz      short loc_1005CAEE2                                            ; +0x50, 0x1005caea0\nmov     rax, [rdi+4F0h]                                                ; +0x52, 0x1005caea2\nmovzx   ecx, word ptr [rax+143h]                                       ; +0x59, 0x1005caea9\nmovzx   esi, byte ptr [rax+145h]                                       ; +0x60, 0x1005caeb0\nshl     esi, 10h                                                       ; +0x67, 0x1005caeb7\nor      esi, ecx                                                       ; +0x6a, 0x1005caeba\nmovsd   xmm0, cs:qword_1008164E0                                       ; +0x6c, 0x1005caebc\nmov     r15, rdi                                                       ; +0x74, 0x1005caec4\njmp     short loc_1005CAF02                                            ; +0x77, 0x1005caec7\nmov     eax, 143h                                                      ; +0x79, 0x1005caec9\ntest    dl, dl                                                         ; +0x7e, 0x1005caece\njz      short loc_1005CAEDA                                            ; +0x80, 0x1005caed0\nadd     rax, [rdi+4F0h]                                                ; +0x82, 0x1005caed2\nretn                                                                   ; +0x89, 0x1005caed9\nadd     rax, [rdi+4F8h]                                                ; +0x8a, 0x1005caeda\nretn                                                                   ; +0x91, 0x1005caee1\nmov     rax, [rdi]                                                     ; +0x92, 0x1005caee2\nmov     r15, rdi                                                       ; +0x95, 0x1005caee5\ncall    qword ptr [rax+3A0h]                                           ; +0x98, 0x1005caee8\nmovzx   ecx, word ptr [rax]                                            ; +0x9e, 0x1005caeee\nmovzx   esi, byte ptr [rax+2]                                          ; +0xa1, 0x1005caef1\nshl     esi, 10h                                                       ; +0xa5, 0x1005caef5\nor      esi, ecx                                                       ; +0xa8, 0x1005caef8\nmovsd   xmm0, cs:qword_1008164E0                                       ; +0xaa, 0x1005caefa\nmov     rdi, r14                                                       ; +0xb2, 0x1005caf02\nmov     rdx, rbx                                                       ; +0xb5, 0x1005caf05\ncall    GJEffectManager__colorForEffect                                ; +0xb8, 0x1005caf08\nmov     ecx, eax                                                       ; +0xbd, 0x1005caf0d\nlea     rax, [r15+27Dh]                                                ; +0xbf, 0x1005caf0f\nmov     [r15+27Dh], cx                                                 ; +0xc6, 0x1005caf16\nshr     ecx, 10h                                                       ; +0xce, 0x1005caf1e\nmov     [r15+27Fh], cl                                                 ; +0xd1, 0x1005caf21\nadd     rsp, 8                                                         ; +0xd8, 0x1005caf28\npop     rbx                                                            ; +0xdc, 0x1005caf2c\npop     r14                                                            ; +0xdd, 0x1005caf2d\npop     r15                                                            ; +0xdf, 0x1005caf2f\npop     rbp                                                            ; +0xe1, 0x1005caf31\nretn                                                                   ; +0xe2, 0x1005caf32", "xrefs": ["PlayLayer::addObject @ 0x1000b20f8", "PlayLayer::addObject @ 0x1000b2114"], "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"}