{"type": "func", "start": 5369275792, "end": 5369276322, "name": "CharacterColorPage::updateIconColors", "pseudocode": "// \n// CharacterColorPage::updateIconColors from 0x14008a590 to 0x14008a7a2 (530 bytes)\n// \n// 4 xrefs:\n// > CharacterColorPage::init @ 0x140088a09\n// > CharacterColorPage::toggleGlow @ 0x140088e8c\n// > CharacterColorPage::onPlayerColor @ 0x14008a07e\n// > <???> @ 0x1406c6d2c\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\n// Hidden C++ exception states: #wind=8\nvoid CharacterColorPage::updateIconColors(CharacterColorPage *a1)\n{\n  __int64 v2; // rcx\n  char v3; // bp\n  __int64 v4; // rcx\n  __int64 v5; // rcx\n  unsigned int i; // edi\n  struct cocos2d::CCObject *v7; // rbx\n  __int64 v8; // rcx\n  __int16 v9; // [rsp+50h] [rbp+8h] BYREF\n  char v10; // [rsp+52h] [rbp+Ah]\n  char v11; // [rsp+58h] [rbp+10h] BYREF\n  char v12; // [rsp+60h] [rbp+18h] BYREF\n  void *v13; // [rsp+68h] [rbp+20h]\n\n  v2 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v13 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v13);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v2 = qword_1406C2ED8;\n  }\n  v3 = *(_BYTE *)(v2 + 904);\n  GameManager::colorForIdx((cocos2d::ccColor3B *)v2, (GameManager *)&v11, *(_DWORD *)(v2 + 804) - *(_DWORD *)(v2 + 808));\n  v4 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v13 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v13);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v4 = qword_1406C2ED8;\n  }\n  GameManager::colorForIdx((cocos2d::ccColor3B *)v4, (GameManager *)&v12, *(_DWORD *)(v4 + 816) - *(_DWORD *)(v4 + 820));\n  v5 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v13 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v13);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v5 = qword_1406C2ED8;\n  }\n  GameManager::colorForIdx((cocos2d::ccColor3B *)v5, (GameManager *)&v9, *(_DWORD *)(v5 + 828) - *(_DWORD *)(v5 + 832));\n  for ( i = 0; i < cocos2d::CCArray::count(a1->m_playerObjects); ++i )\n  {\n    v7 = cocos2d::CCArray::objectAtIndex(a1->m_playerObjects, i);\n    (**(void (__fastcall ***)(__int64, char *))&v7[5].m_unknown2)((__int64)&v7[5].m_unknown2, &v11);\n    (**(void (__fastcall ***)(__int64, char *))(*(_QWORD *)&v7[10].m_uOrderOfArrival + 320LL))(\n      *(_QWORD *)&v7[10].m_uOrderOfArrival + 320LL,\n      &v12);\n    SimplePlayer::updateColors((SimplePlayer *)v7);\n    LOBYTE(v7[11].m_nZOrder) = v3;\n    v8 = qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v13 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v13);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v8 = qword_1406C2ED8;\n    }\n    if ( *(_DWORD *)(v8 + 828) - *(_DWORD *)(v8 + 832) < 0 )\n    {\n      LOBYTE(v7[11].m_unknown5) = 0;\n    }\n    else\n    {\n      LOBYTE(v7[11].m_unknown5) = 1;\n      *(_WORD *)((char *)&v7[11].m_unknown5 + 1) = v9;\n      HIBYTE(v7[11].m_unknown5) = v10;\n    }\n    SimplePlayer::updateColors((SimplePlayer *)v7);\n  }\n}", "assembly": "; \n; CharacterColorPage::updateIconColors from 0x14008a590 to 0x14008a7a2 (530 bytes)\n; \n; 4 xrefs:\n; > CharacterColorPage::init @ 0x140088a09\n; > CharacterColorPage::toggleGlow @ 0x140088e8c\n; > CharacterColorPage::onPlayerColor @ 0x14008a07e\n; > <???> @ 0x1406c6d2c\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    rbx                                                            ; +0x0, 0x14008a590\npush    rbp                                                            ; +0x2, 0x14008a592\npush    rsi                                                            ; +0x3, 0x14008a593\npush    rdi                                                            ; +0x4, 0x14008a594\nsub     rsp, 28h                                                       ; +0x5, 0x14008a595\nmov     rsi, rcx                                                       ; +0x9, 0x14008a599\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xc, 0x14008a59c\ntest    rcx, rcx                                                       ; +0x13, 0x14008a5a3\njnz     short loc_14008A5D7                                            ; +0x16, 0x14008a5a6\nmov     ecx, 668h; Size                                                ; +0x18, 0x14008a5a8\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1d, 0x14008a5ad\nmov     [rsp+48h+arg_18], rax                                          ; +0x22, 0x14008a5b2\nmov     rcx, rax                                                       ; +0x27, 0x14008a5b7\ncall    sub_14017AB00                                                  ; +0x2a, 0x14008a5ba\nnop                                                                    ; +0x2f, 0x14008a5bf\nmov     cs:qword_1406C2ED8, rax                                        ; +0x30, 0x14008a5c0\nmov     rdx, [rax]                                                     ; +0x37, 0x14008a5c7\nmov     rcx, rax                                                       ; +0x3a, 0x14008a5ca\ncall    qword ptr [rdx+48h]                                            ; +0x3d, 0x14008a5cd\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x40, 0x14008a5d0\nmovzx   ebp, byte ptr [rcx+388h]                                       ; +0x47, 0x14008a5d7\nmov     r8d, [rcx+324h]                                                ; +0x4e, 0x14008a5de\nsub     r8d, [rcx+328h]                                                ; +0x55, 0x14008a5e5\nlea     rdx, [rsp+48h+arg_8]                                           ; +0x5c, 0x14008a5ec\ncall    GameManager__colorForIdx                                       ; +0x61, 0x14008a5f1\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x66, 0x14008a5f6\ntest    rcx, rcx                                                       ; +0x6d, 0x14008a5fd\njnz     short loc_14008A631                                            ; +0x70, 0x14008a600\nmov     ecx, 668h; Size                                                ; +0x72, 0x14008a602\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x77, 0x14008a607\nmov     [rsp+48h+arg_18], rax                                          ; +0x7c, 0x14008a60c\nmov     rcx, rax                                                       ; +0x81, 0x14008a611\ncall    sub_14017AB00                                                  ; +0x84, 0x14008a614\nnop                                                                    ; +0x89, 0x14008a619\nmov     cs:qword_1406C2ED8, rax                                        ; +0x8a, 0x14008a61a\nmov     rdx, [rax]                                                     ; +0x91, 0x14008a621\nmov     rcx, rax                                                       ; +0x94, 0x14008a624\ncall    qword ptr [rdx+48h]                                            ; +0x97, 0x14008a627\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x9a, 0x14008a62a\nmov     r8d, [rcx+330h]                                                ; +0xa1, 0x14008a631\nsub     r8d, [rcx+334h]                                                ; +0xa8, 0x14008a638\nlea     rdx, [rsp+48h+arg_10]                                          ; +0xaf, 0x14008a63f\ncall    GameManager__colorForIdx                                       ; +0xb4, 0x14008a644\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xb9, 0x14008a649\ntest    rcx, rcx                                                       ; +0xc0, 0x14008a650\njnz     short loc_14008A684                                            ; +0xc3, 0x14008a653\nmov     ecx, 668h; Size                                                ; +0xc5, 0x14008a655\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xca, 0x14008a65a\nmov     [rsp+48h+arg_18], rax                                          ; +0xcf, 0x14008a65f\nmov     rcx, rax                                                       ; +0xd4, 0x14008a664\ncall    sub_14017AB00                                                  ; +0xd7, 0x14008a667\nnop                                                                    ; +0xdc, 0x14008a66c\nmov     cs:qword_1406C2ED8, rax                                        ; +0xdd, 0x14008a66d\nmov     rdx, [rax]                                                     ; +0xe4, 0x14008a674\nmov     rcx, rax                                                       ; +0xe7, 0x14008a677\ncall    qword ptr [rdx+48h]                                            ; +0xea, 0x14008a67a\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xed, 0x14008a67d\nmov     r8d, [rcx+33Ch]                                                ; +0xf4, 0x14008a684\nsub     r8d, [rcx+340h]                                                ; +0xfb, 0x14008a68b\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x102, 0x14008a692\ncall    GameManager__colorForIdx                                       ; +0x107, 0x14008a697\nxor     edi, edi                                                       ; +0x10c, 0x14008a69c\nmov     rcx, [rsi+288h]                                                ; +0x10e, 0x14008a69e\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x115, 0x14008a6a5\ntest    eax, eax                                                       ; +0x11b, 0x14008a6ab\njz      loc_14008A799                                                  ; +0x11d, 0x14008a6ad\nnop     dword ptr [rax+00h]                                            ; +0x123, 0x14008a6b3\nnop     word ptr [rax+rax+00000000h]                                   ; +0x127, 0x14008a6b7\nmov     edx, edi                                                       ; +0x130, 0x14008a6c0\nmov     rcx, [rsi+288h]                                                ; +0x132, 0x14008a6c2\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x139, 0x14008a6c9\nmov     rbx, rax                                                       ; +0x13f, 0x14008a6cf\nlea     rcx, [rax+140h]                                                ; +0x142, 0x14008a6d2\nmov     rax, [rcx]                                                     ; +0x149, 0x14008a6d9\nlea     rdx, [rsp+48h+arg_8]                                           ; +0x14c, 0x14008a6dc\ncall    qword ptr [rax]                                                ; +0x151, 0x14008a6e1\nmov     rcx, [rbx+260h]                                                ; +0x153, 0x14008a6e3\nadd     rcx, 140h                                                      ; +0x15a, 0x14008a6ea\nmov     rax, [rcx]                                                     ; +0x161, 0x14008a6f1\nlea     rdx, [rsp+48h+arg_10]                                          ; +0x164, 0x14008a6f4\ncall    qword ptr [rax]                                                ; +0x169, 0x14008a6f9\nmov     rcx, rbx                                                       ; +0x16b, 0x14008a6fb\ncall    SimplePlayer__updateColors                                     ; +0x16e, 0x14008a6fe\nmov     [rbx+294h], bpl                                                ; +0x173, 0x14008a703\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x17a, 0x14008a70a\ntest    rcx, rcx                                                       ; +0x181, 0x14008a711\njnz     short loc_14008A745                                            ; +0x184, 0x14008a714\nmov     ecx, 668h; Size                                                ; +0x186, 0x14008a716\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x18b, 0x14008a71b\nmov     [rsp+48h+arg_18], rax                                          ; +0x190, 0x14008a720\nmov     rcx, rax                                                       ; +0x195, 0x14008a725\ncall    sub_14017AB00                                                  ; +0x198, 0x14008a728\nnop                                                                    ; +0x19d, 0x14008a72d\nmov     cs:qword_1406C2ED8, rax                                        ; +0x19e, 0x14008a72e\nmov     rdx, [rax]                                                     ; +0x1a5, 0x14008a735\nmov     rcx, rax                                                       ; +0x1a8, 0x14008a738\ncall    qword ptr [rdx+48h]                                            ; +0x1ab, 0x14008a73b\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x1ae, 0x14008a73e\nmov     eax, [rcx+33Ch]                                                ; +0x1b5, 0x14008a745\ncmp     eax, [rcx+340h]                                                ; +0x1bb, 0x14008a74b\njs      short loc_14008A773                                            ; +0x1c1, 0x14008a751\nmov     byte ptr [rbx+29Ch], 1                                         ; +0x1c3, 0x14008a753\nmovzx   eax, [rsp+48h+arg_0]                                           ; +0x1ca, 0x14008a75a\nmov     [rbx+29Dh], ax                                                 ; +0x1cf, 0x14008a75f\nmovzx   eax, [rsp+48h+arg_2]                                           ; +0x1d6, 0x14008a766\nmov     [rbx+29Fh], al                                                 ; +0x1db, 0x14008a76b\njmp     short loc_14008A77A                                            ; +0x1e1, 0x14008a771\nmov     byte ptr [rbx+29Ch], 0                                         ; +0x1e3, 0x14008a773\nmov     rcx, rbx                                                       ; +0x1ea, 0x14008a77a\ncall    SimplePlayer__updateColors                                     ; +0x1ed, 0x14008a77d\ninc     edi                                                            ; +0x1f2, 0x14008a782\nmov     rcx, [rsi+288h]                                                ; +0x1f4, 0x14008a784\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1fb, 0x14008a78b\ncmp     edi, eax                                                       ; +0x201, 0x14008a791\njb      loc_14008A6C0                                                  ; +0x203, 0x14008a793\nadd     rsp, 28h                                                       ; +0x209, 0x14008a799\npop     rdi                                                            ; +0x20d, 0x14008a79d\npop     rsi                                                            ; +0x20e, 0x14008a79e\npop     rbp                                                            ; +0x20f, 0x14008a79f\npop     rbx                                                            ; +0x210, 0x14008a7a0\nretn                                                                   ; +0x211, 0x14008a7a1", "xrefs": ["CharacterColorPage::init @ 0x140088a09", "CharacterColorPage::toggleGlow @ 0x140088e8c", "CharacterColorPage::onPlayerColor @ 0x14008a07e", "<???> @ 0x1406c6d2c"], "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"}