{"type": "func", "start": 5369376384, "end": 5369376917, "name": "CharacterColorPage::updateIconColors", "pseudocode": "// \n// CharacterColorPage::updateIconColors from 0x1400a2e80 to 0x1400a3095 (533 bytes)\n// \n// 4 xrefs:\n// > CharacterColorPage::init @ 0x1400a1291\n// > CharacterColorPage::toggleGlow @ 0x1400a16ff\n// > CharacterColorPage::onPlayerColor @ 0x1400a296d\n// > <???> @ 0x1409130f4\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:26:07 +0000\n// \n\n// Hidden C++ exception states: #wind=8\nunsigned int __fastcall CharacterColorPage::updateIconColors(__int64 a1)\n{\n  __int64 v2; // rcx\n  char v3; // bp\n  __int64 v4; // rcx\n  __int64 v5; // rcx\n  unsigned int v6; // edi\n  unsigned int result; // eax\n  struct cocos2d::CCObject *v8; // rbx\n  __int64 v9; // rcx\n  __int16 v10; // [rsp+50h] [rbp+8h] BYREF\n  char v11; // [rsp+52h] [rbp+Ah]\n  char v12; // [rsp+58h] [rbp+10h] BYREF\n  char v13; // [rsp+60h] [rbp+18h] BYREF\n  void *v14; // [rsp+68h] [rbp+20h]\n\n  v2 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v14 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v14);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v2 = qword_14090BFD0;\n  }\n  v3 = *(_BYTE *)(v2 + 944);\n  GameManager::colorForIdx(v2, &v12, (unsigned int)(*(_DWORD *)(v2 + 844) - *(_DWORD *)(v2 + 848)));\n  v4 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v14 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v14);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v4 = qword_14090BFD0;\n  }\n  GameManager::colorForIdx(v4, &v13, (unsigned int)(*(_DWORD *)(v4 + 856) - *(_DWORD *)(v4 + 860)));\n  v5 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v14 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v14);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v5 = qword_14090BFD0;\n  }\n  GameManager::colorForIdx(v5, &v10, (unsigned int)(*(_DWORD *)(v5 + 868) - *(_DWORD *)(v5 + 872)));\n  v6 = 0;\n  result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 680));\n  if ( result )\n  {\n    do\n    {\n      v8 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 680), v6);\n      (**((void (__fastcall ***)(__int64, char *))v8 + 40))((__int64)v8 + 320, &v12);\n      (**(void (__fastcall ***)(__int64, char *))(*((_QWORD *)v8 + 76) + 320LL))(*((_QWORD *)v8 + 76) + 320LL, &v13);\n      SimplePlayer::updateColors(v8);\n      *((_BYTE *)v8 + 660) = v3;\n      v9 = qword_14090BFD0;\n      if ( !qword_14090BFD0 )\n      {\n        v14 = operator new(0x6E8u);\n        qword_14090BFD0 = GameManager::GameManager(v14);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n        v9 = qword_14090BFD0;\n      }\n      if ( *(_DWORD *)(v9 + 868) - *(_DWORD *)(v9 + 872) < 0 )\n      {\n        *((_BYTE *)v8 + 668) = 0;\n      }\n      else\n      {\n        *((_BYTE *)v8 + 668) = 1;\n        *(_WORD *)((char *)v8 + 669) = v10;\n        *((_BYTE *)v8 + 671) = v11;\n      }\n      SimplePlayer::updateColors(v8);\n      ++v6;\n      result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 680));\n    }\n    while ( v6 < result );\n  }\n  return result;\n}", "assembly": "; \n; CharacterColorPage::updateIconColors from 0x1400a2e80 to 0x1400a3095 (533 bytes)\n; \n; 4 xrefs:\n; > CharacterColorPage::init @ 0x1400a1291\n; > CharacterColorPage::toggleGlow @ 0x1400a16ff\n; > CharacterColorPage::onPlayerColor @ 0x1400a296d\n; > <???> @ 0x1409130f4\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:26:07 +0000\n; \npush    rbx                                                            ; +0x0, 0x1400a2e80\npush    rbp                                                            ; +0x2, 0x1400a2e82\npush    rsi                                                            ; +0x3, 0x1400a2e83\npush    rdi                                                            ; +0x4, 0x1400a2e84\nsub     rsp, 28h                                                       ; +0x5, 0x1400a2e85\nmov     rsi, rcx                                                       ; +0x9, 0x1400a2e89\nmov     rcx, cs:qword_14090BFD0                                        ; +0xc, 0x1400a2e8c\ntest    rcx, rcx                                                       ; +0x13, 0x1400a2e93\njnz     short loc_1400A2ECA                                            ; +0x16, 0x1400a2e96\nmov     ecx, 6E8h; Size                                                ; +0x18, 0x1400a2e98\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1d, 0x1400a2e9d\nmov     [rsp+48h+arg_18], rax                                          ; +0x22, 0x1400a2ea2\nmov     rcx, rax                                                       ; +0x27, 0x1400a2ea7\ncall    GameManager__GameManager                                       ; +0x2a, 0x1400a2eaa\nnop                                                                    ; +0x2f, 0x1400a2eaf\nmov     cs:qword_14090BFD0, rax                                        ; +0x30, 0x1400a2eb0\nmov     rcx, [rax]                                                     ; +0x37, 0x1400a2eb7\nmov     rdx, [rcx+48h]                                                 ; +0x3a, 0x1400a2eba\nmov     rcx, rax                                                       ; +0x3e, 0x1400a2ebe\ncall    rdx                                                            ; +0x41, 0x1400a2ec1\nmov     rcx, cs:qword_14090BFD0                                        ; +0x43, 0x1400a2ec3\nmovzx   ebp, byte ptr [rcx+3B0h]                                       ; +0x4a, 0x1400a2eca\nmov     r8d, [rcx+34Ch]                                                ; +0x51, 0x1400a2ed1\nsub     r8d, [rcx+350h]                                                ; +0x58, 0x1400a2ed8\nlea     rdx, [rsp+48h+arg_8]                                           ; +0x5f, 0x1400a2edf\ncall    GameManager__colorForIdx                                       ; +0x64, 0x1400a2ee4\nmov     rcx, cs:qword_14090BFD0                                        ; +0x69, 0x1400a2ee9\ntest    rcx, rcx                                                       ; +0x70, 0x1400a2ef0\njnz     short loc_1400A2F27                                            ; +0x73, 0x1400a2ef3\nmov     ecx, 6E8h; Size                                                ; +0x75, 0x1400a2ef5\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x7a, 0x1400a2efa\nmov     [rsp+48h+arg_18], rax                                          ; +0x7f, 0x1400a2eff\nmov     rcx, rax                                                       ; +0x84, 0x1400a2f04\ncall    GameManager__GameManager                                       ; +0x87, 0x1400a2f07\nnop                                                                    ; +0x8c, 0x1400a2f0c\nmov     cs:qword_14090BFD0, rax                                        ; +0x8d, 0x1400a2f0d\nmov     rcx, [rax]                                                     ; +0x94, 0x1400a2f14\nmov     rdx, [rcx+48h]                                                 ; +0x97, 0x1400a2f17\nmov     rcx, rax                                                       ; +0x9b, 0x1400a2f1b\ncall    rdx                                                            ; +0x9e, 0x1400a2f1e\nmov     rcx, cs:qword_14090BFD0                                        ; +0xa0, 0x1400a2f20\nmov     r8d, [rcx+358h]                                                ; +0xa7, 0x1400a2f27\nsub     r8d, [rcx+35Ch]                                                ; +0xae, 0x1400a2f2e\nlea     rdx, [rsp+48h+arg_10]                                          ; +0xb5, 0x1400a2f35\ncall    GameManager__colorForIdx                                       ; +0xba, 0x1400a2f3a\nmov     rcx, cs:qword_14090BFD0                                        ; +0xbf, 0x1400a2f3f\ntest    rcx, rcx                                                       ; +0xc6, 0x1400a2f46\njnz     short loc_1400A2F7D                                            ; +0xc9, 0x1400a2f49\nmov     ecx, 6E8h; Size                                                ; +0xcb, 0x1400a2f4b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xd0, 0x1400a2f50\nmov     [rsp+48h+arg_18], rax                                          ; +0xd5, 0x1400a2f55\nmov     rcx, rax                                                       ; +0xda, 0x1400a2f5a\ncall    GameManager__GameManager                                       ; +0xdd, 0x1400a2f5d\nnop                                                                    ; +0xe2, 0x1400a2f62\nmov     cs:qword_14090BFD0, rax                                        ; +0xe3, 0x1400a2f63\nmov     rcx, [rax]                                                     ; +0xea, 0x1400a2f6a\nmov     rdx, [rcx+48h]                                                 ; +0xed, 0x1400a2f6d\nmov     rcx, rax                                                       ; +0xf1, 0x1400a2f71\ncall    rdx                                                            ; +0xf4, 0x1400a2f74\nmov     rcx, cs:qword_14090BFD0                                        ; +0xf6, 0x1400a2f76\nmov     r8d, [rcx+364h]                                                ; +0xfd, 0x1400a2f7d\nsub     r8d, [rcx+368h]                                                ; +0x104, 0x1400a2f84\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x10b, 0x1400a2f8b\ncall    GameManager__colorForIdx                                       ; +0x110, 0x1400a2f90\nxor     edi, edi                                                       ; +0x115, 0x1400a2f95\nmov     rcx, [rsi+2A8h]                                                ; +0x117, 0x1400a2f97\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x11e, 0x1400a2f9e\ntest    eax, eax                                                       ; +0x124, 0x1400a2fa4\njz      loc_1400A308C                                                  ; +0x126, 0x1400a2fa6\nnop     dword ptr [rax+00h]                                            ; +0x12c, 0x1400a2fac\nmov     edx, edi                                                       ; +0x130, 0x1400a2fb0\nmov     rcx, [rsi+2A8h]                                                ; +0x132, 0x1400a2fb2\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x139, 0x1400a2fb9\nmov     rbx, rax                                                       ; +0x13f, 0x1400a2fbf\nlea     rcx, [rax+140h]                                                ; +0x142, 0x1400a2fc2\nmov     rax, [rcx]                                                     ; +0x149, 0x1400a2fc9\nlea     rdx, [rsp+48h+arg_8]                                           ; +0x14c, 0x1400a2fcc\ncall    qword ptr [rax]                                                ; +0x151, 0x1400a2fd1\nmov     rcx, [rbx+260h]                                                ; +0x153, 0x1400a2fd3\nadd     rcx, 140h                                                      ; +0x15a, 0x1400a2fda\nmov     rax, [rcx]                                                     ; +0x161, 0x1400a2fe1\nlea     rdx, [rsp+48h+arg_10]                                          ; +0x164, 0x1400a2fe4\ncall    qword ptr [rax]                                                ; +0x169, 0x1400a2fe9\nmov     rcx, rbx                                                       ; +0x16b, 0x1400a2feb\ncall    SimplePlayer__updateColors                                     ; +0x16e, 0x1400a2fee\nmov     [rbx+294h], bpl                                                ; +0x173, 0x1400a2ff3\nmov     rcx, cs:qword_14090BFD0                                        ; +0x17a, 0x1400a2ffa\ntest    rcx, rcx                                                       ; +0x181, 0x1400a3001\njnz     short loc_1400A3038                                            ; +0x184, 0x1400a3004\nmov     ecx, 6E8h; Size                                                ; +0x186, 0x1400a3006\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x18b, 0x1400a300b\nmov     [rsp+48h+arg_18], rax                                          ; +0x190, 0x1400a3010\nmov     rcx, rax                                                       ; +0x195, 0x1400a3015\ncall    GameManager__GameManager                                       ; +0x198, 0x1400a3018\nnop                                                                    ; +0x19d, 0x1400a301d\nmov     cs:qword_14090BFD0, rax                                        ; +0x19e, 0x1400a301e\nmov     rcx, [rax]                                                     ; +0x1a5, 0x1400a3025\nmov     rdx, [rcx+48h]                                                 ; +0x1a8, 0x1400a3028\nmov     rcx, rax                                                       ; +0x1ac, 0x1400a302c\ncall    rdx                                                            ; +0x1af, 0x1400a302f\nmov     rcx, cs:qword_14090BFD0                                        ; +0x1b1, 0x1400a3031\nmov     eax, [rcx+364h]                                                ; +0x1b8, 0x1400a3038\ncmp     eax, [rcx+368h]                                                ; +0x1be, 0x1400a303e\njs      short loc_1400A3066                                            ; +0x1c4, 0x1400a3044\nmov     byte ptr [rbx+29Ch], 1                                         ; +0x1c6, 0x1400a3046\nmovzx   eax, [rsp+48h+arg_0]                                           ; +0x1cd, 0x1400a304d\nmov     [rbx+29Dh], ax                                                 ; +0x1d2, 0x1400a3052\nmovzx   eax, [rsp+48h+arg_2]                                           ; +0x1d9, 0x1400a3059\nmov     [rbx+29Fh], al                                                 ; +0x1de, 0x1400a305e\njmp     short loc_1400A306D                                            ; +0x1e4, 0x1400a3064\nmov     byte ptr [rbx+29Ch], 0                                         ; +0x1e6, 0x1400a3066\nmov     rcx, rbx                                                       ; +0x1ed, 0x1400a306d\ncall    SimplePlayer__updateColors                                     ; +0x1f0, 0x1400a3070\ninc     edi                                                            ; +0x1f5, 0x1400a3075\nmov     rcx, [rsi+2A8h]                                                ; +0x1f7, 0x1400a3077\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1fe, 0x1400a307e\ncmp     edi, eax                                                       ; +0x204, 0x1400a3084\njb      loc_1400A2FB0                                                  ; +0x206, 0x1400a3086\nadd     rsp, 28h                                                       ; +0x20c, 0x1400a308c\npop     rdi                                                            ; +0x210, 0x1400a3090\npop     rsi                                                            ; +0x211, 0x1400a3091\npop     rbp                                                            ; +0x212, 0x1400a3092\npop     rbx                                                            ; +0x213, 0x1400a3093\nretn                                                                   ; +0x214, 0x1400a3094", "xrefs": ["CharacterColorPage::init @ 0x1400a1291", "CharacterColorPage::toggleGlow @ 0x1400a16ff", "CharacterColorPage::onPlayerColor @ 0x1400a296d", "<???> @ 0x1409130f4"], "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"}