{"type": "func", "start": 4301645712, "end": 4301645798, "name": "CharacterColorPage::activeColorForMode", "pseudocode": "// \n// CharacterColorPage::activeColorForMode from 0x10065e790 to 0x10065e7e6 (86 bytes)\n// \n// 0 xrefs:\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\nint __fastcall CharacterColorPage::activeColorForMode(CharacterColorPage *a1, int a2)\n{\n  int result; // eax\n  GameManager *v3; // rax\n  GameManager *v4; // rax\n  GameManager *v5; // rax\n\n  if ( a2 == 2 )\n  {\n    v5 = GameManager::sharedState();\n    return v5->m_playerGlowColor.random - v5->m_playerGlowColor.seed;\n  }\n  else if ( a2 == 1 )\n  {\n    v4 = GameManager::sharedState();\n    return v4->m_playerColor2.random - v4->m_playerColor2.seed;\n  }\n  else\n  {\n    result = 0;\n    if ( !a2 )\n    {\n      v3 = GameManager::sharedState();\n      return v3->m_playerColor.random - v3->m_playerColor.seed;\n    }\n  }\n  return result;\n}", "assembly": "; \n; CharacterColorPage::activeColorForMode from 0x10065e790 to 0x10065e7e6 (86 bytes)\n; \n; 0 xrefs:\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    rbp                                                            ; +0x0, 0x10065e790\nmov     rbp, rsp                                                       ; +0x1, 0x10065e791\ncmp     esi, 2                                                         ; +0x4, 0x10065e794\njz      short loc_10065E7D0                                            ; +0x7, 0x10065e797\ncmp     esi, 1                                                         ; +0x9, 0x10065e799\njz      short loc_10065E7BA                                            ; +0xc, 0x10065e79c\nxor     eax, eax                                                       ; +0xe, 0x10065e79e\ntest    esi, esi                                                       ; +0x10, 0x10065e7a0\njnz     short loc_10065E7E4                                            ; +0x12, 0x10065e7a2\ncall    GameManager__sharedState                                       ; +0x14, 0x10065e7a4\nmov     rcx, rax                                                       ; +0x19, 0x10065e7a9\nmov     eax, [rax+304h]                                                ; +0x1c, 0x10065e7ac\nsub     eax, [rcx+308h]                                                ; +0x22, 0x10065e7b2\npop     rbp                                                            ; +0x28, 0x10065e7b8\nretn                                                                   ; +0x29, 0x10065e7b9\ncall    GameManager__sharedState                                       ; +0x2a, 0x10065e7ba\nmov     rcx, rax                                                       ; +0x2f, 0x10065e7bf\nmov     eax, [rax+310h]                                                ; +0x32, 0x10065e7c2\nsub     eax, [rcx+314h]                                                ; +0x38, 0x10065e7c8\npop     rbp                                                            ; +0x3e, 0x10065e7ce\nretn                                                                   ; +0x3f, 0x10065e7cf\ncall    GameManager__sharedState                                       ; +0x40, 0x10065e7d0\nmov     rcx, rax                                                       ; +0x45, 0x10065e7d5\nmov     eax, [rax+31Ch]                                                ; +0x48, 0x10065e7d8\nsub     eax, [rcx+320h]                                                ; +0x4e, 0x10065e7de\npop     rbp                                                            ; +0x54, 0x10065e7e4\nretn                                                                   ; +0x55, 0x10065e7e5", "xrefs": [], "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"}