{"type": "func", "start": 4302557296, "end": 4302557640, "name": "CharacterColorPage::updateIconColors", "pseudocode": "// \n// CharacterColorPage::updateIconColors from 0x10073d070 to 0x10073d1c8 (344 bytes)\n// \n// 3 xrefs:\n// > CharacterColorPage::init @ 0x10073cb61\n// > CharacterColorPage::toggleGlow @ 0x10073d5de\n// > CharacterColorPage::onPlayerColor @ 0x10073dd53\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 12:36:27 +0000\n// \n\n__int64 __fastcall CharacterColorPage::updateIconColors(__int64 a1)\n{\n  char v1; // r15\n  __int64 v2; // r14\n  __int64 v3; // rax\n  __int64 v4; // rax\n  __int64 v5; // r14\n  __int64 v6; // rax\n  __int64 v7; // rax\n  __int64 v8; // rax\n  __int64 v9; // rax\n  __int64 v10; // rax\n  __int64 result; // rax\n  unsigned int v12; // r14d\n  _BYTE *v13; // r13\n  __int64 v14; // rax\n  __int16 v15; // [rsp+Ch] [rbp-34h] BYREF\n  char v16; // [rsp+Eh] [rbp-32h]\n  __int16 v17; // [rsp+10h] [rbp-30h]\n  char v18; // [rsp+12h] [rbp-2Eh]\n  __int16 v19; // [rsp+14h] [rbp-2Ch] BYREF\n  char v20; // [rsp+16h] [rbp-2Ah]\n\n  v1 = *(_BYTE *)(GameManager::sharedState() + 912);\n  v2 = GameManager::sharedState();\n  v3 = GameManager::sharedState();\n  v4 = GameManager::colorForIdx(v2, *(_DWORD *)(v3 + 812) - *(_DWORD *)(v3 + 816));\n  v15 = v4;\n  v16 = BYTE2(v4);\n  v5 = GameManager::sharedState();\n  v6 = GameManager::sharedState();\n  v7 = GameManager::colorForIdx(v5, *(_DWORD *)(v6 + 824) - *(_DWORD *)(v6 + 828));\n  v17 = v7;\n  v18 = BYTE2(v7);\n  v8 = GameManager::sharedState();\n  LODWORD(v5) = *(_DWORD *)(v8 + 836) - *(_DWORD *)(v8 + 840);\n  v9 = GameManager::sharedState();\n  v10 = GameManager::colorForIdx(v9, v5);\n  v19 = v10;\n  v20 = BYTE2(v10);\n  result = sub_1007FEF90(*(_QWORD *)(a1 + 672));\n  if ( (_DWORD)result )\n  {\n    v12 = 0;\n    do\n    {\n      v13 = (_BYTE *)sub_1007FEFE0(*(_QWORD *)(a1 + 672), v12);\n      (*(void (__fastcall **)(_BYTE *, __int16 *))(*(_QWORD *)v13 + 960LL))(v13, &v15);\n      SimplePlayer::setSecondColor((__int64)v13);\n      v13[660] = v1;\n      v14 = GameManager::sharedState();\n      if ( *(_DWORD *)(v14 + 836) < *(_DWORD *)(v14 + 840) )\n        SimplePlayer::disableCustomGlowColor((__int64)v13);\n      else\n        SimplePlayer::enableCustomGlowColor((__int64)v13, (__int64)&v19);\n      SimplePlayer::updateColors((__int64)v13);\n      ++v12;\n      result = sub_1007FEF90(*(_QWORD *)(a1 + 672));\n    }\n    while ( v12 < (unsigned int)result );\n  }\n  return result;\n}", "assembly": "; \n; CharacterColorPage::updateIconColors from 0x10073d070 to 0x10073d1c8 (344 bytes)\n; \n; 3 xrefs:\n; > CharacterColorPage::init @ 0x10073cb61\n; > CharacterColorPage::toggleGlow @ 0x10073d5de\n; > CharacterColorPage::onPlayerColor @ 0x10073dd53\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 12:36:27 +0000\n; \npush    rbp                                                            ; +0x0, 0x10073d070\nmov     rbp, rsp                                                       ; +0x1, 0x10073d071\npush    r15                                                            ; +0x4, 0x10073d074\npush    r14                                                            ; +0x6, 0x10073d076\npush    r13                                                            ; +0x8, 0x10073d078\npush    r12                                                            ; +0xa, 0x10073d07a\npush    rbx                                                            ; +0xc, 0x10073d07c\nsub     rsp, 18h                                                       ; +0xd, 0x10073d07d\nmov     rbx, rdi                                                       ; +0x11, 0x10073d081\ncall    GameManager__sharedState                                       ; +0x14, 0x10073d084\nmovzx   r15d, byte ptr [rax+390h]                                      ; +0x19, 0x10073d089\ncall    GameManager__sharedState                                       ; +0x21, 0x10073d091\nmov     r14, rax                                                       ; +0x26, 0x10073d096\ncall    GameManager__sharedState                                       ; +0x29, 0x10073d099\nmov     esi, [rax+32Ch]                                                ; +0x2e, 0x10073d09e\nsub     esi, [rax+330h]                                                ; +0x34, 0x10073d0a4\nmov     rdi, r14                                                       ; +0x3a, 0x10073d0aa\ncall    GameManager__colorForIdx                                       ; +0x3d, 0x10073d0ad\nmov     [rbp+var_34], ax                                               ; +0x42, 0x10073d0b2\nshr     eax, 10h                                                       ; +0x46, 0x10073d0b6\nmov     [rbp+var_32], al                                               ; +0x49, 0x10073d0b9\ncall    GameManager__sharedState                                       ; +0x4c, 0x10073d0bc\nmov     r14, rax                                                       ; +0x51, 0x10073d0c1\ncall    GameManager__sharedState                                       ; +0x54, 0x10073d0c4\nmov     esi, [rax+338h]                                                ; +0x59, 0x10073d0c9\nsub     esi, [rax+33Ch]                                                ; +0x5f, 0x10073d0cf\nmov     rdi, r14                                                       ; +0x65, 0x10073d0d5\ncall    GameManager__colorForIdx                                       ; +0x68, 0x10073d0d8\nmov     [rbp+var_30], ax                                               ; +0x6d, 0x10073d0dd\nshr     eax, 10h                                                       ; +0x71, 0x10073d0e1\nmov     [rbp+var_2E], al                                               ; +0x74, 0x10073d0e4\ncall    GameManager__sharedState                                       ; +0x77, 0x10073d0e7\nmov     r14d, [rax+344h]                                               ; +0x7c, 0x10073d0ec\nsub     r14d, [rax+348h]                                               ; +0x83, 0x10073d0f3\ncall    GameManager__sharedState                                       ; +0x8a, 0x10073d0fa\nmov     rdi, rax                                                       ; +0x8f, 0x10073d0ff\nmov     esi, r14d                                                      ; +0x92, 0x10073d102\ncall    GameManager__colorForIdx                                       ; +0x95, 0x10073d105\nmov     [rbp+var_2C], ax                                               ; +0x9a, 0x10073d10a\nshr     eax, 10h                                                       ; +0x9e, 0x10073d10e\nmov     [rbp+var_2A], al                                               ; +0xa1, 0x10073d111\nmov     rdi, [rbx+2A0h]                                                ; +0xa4, 0x10073d114\ncall    sub_1007FEF90                                                  ; +0xab, 0x10073d11b\ntest    eax, eax                                                       ; +0xb0, 0x10073d120\njz      loc_10073D1B9                                                  ; +0xb2, 0x10073d122\nxor     r14d, r14d                                                     ; +0xb8, 0x10073d128\nlea     r12, [rbp+var_30]                                              ; +0xbb, 0x10073d12b\njmp     short loc_10073D164                                            ; +0xbf, 0x10073d12f\nalign 20h                                                              ; +0xc1, 0x10073d131\nmov     rdi, r13                                                       ; +0xd0, 0x10073d140\ncall    SimplePlayer__disableCustomGlowColor                           ; +0xd3, 0x10073d143\nmov     rdi, r13                                                       ; +0xd8, 0x10073d148\ncall    SimplePlayer__updateColors                                     ; +0xdb, 0x10073d14b\ninc     r14d                                                           ; +0xe0, 0x10073d150\nmov     rdi, [rbx+2A0h]                                                ; +0xe3, 0x10073d153\ncall    sub_1007FEF90                                                  ; +0xea, 0x10073d15a\ncmp     r14d, eax                                                      ; +0xef, 0x10073d15f\njnb     short loc_10073D1B9                                            ; +0xf2, 0x10073d162\nmov     rdi, [rbx+2A0h]                                                ; +0xf4, 0x10073d164\nmov     esi, r14d                                                      ; +0xfb, 0x10073d16b\ncall    sub_1007FEFE0                                                  ; +0xfe, 0x10073d16e\nmov     r13, rax                                                       ; +0x103, 0x10073d173\nmov     rax, [rax]                                                     ; +0x106, 0x10073d176\nmov     rdi, r13                                                       ; +0x109, 0x10073d179\nlea     rsi, [rbp+var_34]                                              ; +0x10c, 0x10073d17c\ncall    qword ptr [rax+3C0h]                                           ; +0x110, 0x10073d180\nmov     rdi, r13                                                       ; +0x116, 0x10073d186\nmov     rsi, r12                                                       ; +0x119, 0x10073d189\ncall    SimplePlayer__setSecondColor                                   ; +0x11c, 0x10073d18c\nmov     [r13+294h], r15b                                               ; +0x121, 0x10073d191\ncall    GameManager__sharedState                                       ; +0x128, 0x10073d198\nmov     ecx, [rax+344h]                                                ; +0x12d, 0x10073d19d\ncmp     ecx, [rax+348h]                                                ; +0x133, 0x10073d1a3\njl      short loc_10073D140                                            ; +0x139, 0x10073d1a9\nmov     rdi, r13                                                       ; +0x13b, 0x10073d1ab\nlea     rsi, [rbp+var_2C]                                              ; +0x13e, 0x10073d1ae\ncall    SimplePlayer__enableCustomGlowColor                            ; +0x142, 0x10073d1b2\njmp     short loc_10073D148                                            ; +0x147, 0x10073d1b7\nadd     rsp, 18h                                                       ; +0x149, 0x10073d1b9\npop     rbx                                                            ; +0x14d, 0x10073d1bd\npop     r12                                                            ; +0x14e, 0x10073d1be\npop     r13                                                            ; +0x150, 0x10073d1c0\npop     r14                                                            ; +0x152, 0x10073d1c2\npop     r15                                                            ; +0x154, 0x10073d1c4\npop     rbp                                                            ; +0x156, 0x10073d1c6\nretn                                                                   ; +0x157, 0x10073d1c7", "xrefs": ["CharacterColorPage::init @ 0x10073cb61", "CharacterColorPage::toggleGlow @ 0x10073d5de", "CharacterColorPage::onPlayerColor @ 0x10073dd53"], "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"}