{"type": "func", "start": 11867328, "end": 11867440, "name": "CharacterColorPage::activeColorForMode", "pseudocode": "// \n// CharacterColorPage::activeColorForMode from 0xb514c0 to 0xb51530 (112 bytes)\n// \n// 5 xrefs:\n// > CharacterColorPage::updateColorMode @ 0xb51568\n// > CharacterColorPage::updateColorMode @ 0xb51578\n// > CharacterColorPage::updateColorMode @ 0xb51588\n// > CharacterColorPage::onPlayerColor @ 0xb51c44\n// > <???> @ 0xf1738\n// \n// This function is hookable on this platform (idp: arm, 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 13:01:59 +0000\n// \n\n__int64 __fastcall CharacterColorPage::activeColorForMode(CharacterColorPage *this, int a2)\n{\n  __int64 result; // x0\n  __int64 v3; // x0\n  __int64 v4; // x0\n  __int64 v5; // x0\n\n  if ( a2 == 1 )\n  {\n    v5 = GameManager::sharedState(this);\n    return (unsigned int)(*(_DWORD *)(v5 + 824) - *(_DWORD *)(v5 + 828));\n  }\n  else if ( a2 == 2 )\n  {\n    v4 = GameManager::sharedState(this);\n    return (unsigned int)(*(_DWORD *)(v4 + 836) - *(_DWORD *)(v4 + 840));\n  }\n  else\n  {\n    result = 0;\n    if ( !a2 )\n    {\n      v3 = GameManager::sharedState(nullptr);\n      return (unsigned int)(*(_DWORD *)(v3 + 812) - *(_DWORD *)(v3 + 816));\n    }\n  }\n  return result;\n}", "assembly": "; \n; CharacterColorPage::activeColorForMode from 0xb514c0 to 0xb51530 (112 bytes)\n; \n; 5 xrefs:\n; > CharacterColorPage::updateColorMode @ 0xb51568\n; > CharacterColorPage::updateColorMode @ 0xb51578\n; > CharacterColorPage::updateColorMode @ 0xb51588\n; > CharacterColorPage::onPlayerColor @ 0xb51c44\n; > <???> @ 0xf1738\n; \n; This function is hookable on this platform (idp: arm, 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 13:01:59 +0000\n; \nSTP             X29, X30, [SP,#-0x10+var_s0]!                          ; +0x0, 0xb514c0\nCMP             W1, #1                                                 ; +0x4, 0xb514c4\nMOV             X29, SP                                                ; +0x8, 0xb514c8\nB.EQ            loc_B51518                                             ; +0xc, 0xb514cc\nCMP             W1, #2                                                 ; +0x10, 0xb514d0\nB.EQ            loc_B51500                                             ; +0x14, 0xb514d4\nMOV             W0, #0; this                                           ; +0x18, 0xb514d8\nCBZ             W1, loc_B514E8                                         ; +0x1c, 0xb514dc\nLDP             X29, X30, [SP+var_s0],#0x10                            ; +0x20, 0xb514e0\nRET                                                                    ; +0x24, 0xb514e4\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x28, 0xb514e8\nLDR             W1, [X0,#0x32C]                                        ; +0x2c, 0xb514ec\nLDR             W0, [X0,#0x330]                                        ; +0x30, 0xb514f0\nLDP             X29, X30, [SP+var_s0],#0x10                            ; +0x34, 0xb514f4\nSUB             W0, W1, W0; this                                       ; +0x38, 0xb514f8\nRET                                                                    ; +0x3c, 0xb514fc\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x40, 0xb51500\nLDR             W1, [X0,#0x344]                                        ; +0x44, 0xb51504\nLDR             W0, [X0,#0x348]                                        ; +0x48, 0xb51508\nLDP             X29, X30, [SP+var_s0],#0x10                            ; +0x4c, 0xb5150c\nSUB             W0, W1, W0; this                                       ; +0x50, 0xb51510\nRET                                                                    ; +0x54, 0xb51514\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x58, 0xb51518\nLDR             W1, [X0,#0x338]                                        ; +0x5c, 0xb5151c\nLDR             W0, [X0,#0x33C]                                        ; +0x60, 0xb51520\nLDP             X29, X30, [SP+var_s0],#0x10                            ; +0x64, 0xb51524\nSUB             W0, W1, W0                                             ; +0x68, 0xb51528\nRET                                                                    ; +0x6c, 0xb5152c", "xrefs": ["CharacterColorPage::updateColorMode @ 0xb51568", "CharacterColorPage::updateColorMode @ 0xb51578", "CharacterColorPage::updateColorMode @ 0xb51588", "CharacterColorPage::onPlayerColor @ 0xb51c44", "<???> @ 0xf1738"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}