{"type": "func", "start": 5369938512, "end": 5369938665, "name": "ColorSelectPopup::updateCustomColorIdx", "pseudocode": "// \n// ColorSelectPopup::updateCustomColorIdx from 0x14012c250 to 0x14012c2e9 (153 bytes)\n// \n// 6 xrefs:\n// > ColorSelectPopup::onUpdateCustomColor @ 0x14012bc39\n// > ColorSelectPopup::textChanged @ 0x14012bd95\n// > ColorSelectPopup::colorSelectClosed @ 0x14012c73c\n// > <???> @ 0x1408987a0\n// > <???> @ 0x1408987b0\n// > <???> @ 0x140916c34\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:27:01 +0000\n// \n\nint __fastcall ColorSelectPopup::updateCustomColorIdx(__int64 a1)\n{\n  int result; // eax\n  __int64 v3; // rcx\n  cocos2d::CCArray *v4; // rcx\n  unsigned int v5; // edi\n  struct cocos2d::CCObject *v6; // rax\n\n  result = *(_DWORD *)(a1 + 1152);\n  if ( result < 1 )\n    result = 1;\n  v3 = *(_QWORD *)(a1 + 680);\n  *(_DWORD *)(a1 + 1152) = result;\n  if ( v3 )\n  {\n    *(_DWORD *)(v3 + 1032) = result;\n  }\n  else\n  {\n    v4 = *(cocos2d::CCArray **)(a1 + 688);\n    if ( v4 )\n    {\n      v5 = 0;\n      result = cocos2d::CCArray::count(v4);\n      if ( result )\n      {\n        do\n        {\n          v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 688), v5++);\n          *((_DWORD *)v6 + 258) = *(_DWORD *)(a1 + 1152);\n          result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 688));\n        }\n        while ( v5 < result );\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; ColorSelectPopup::updateCustomColorIdx from 0x14012c250 to 0x14012c2e9 (153 bytes)\n; \n; 6 xrefs:\n; > ColorSelectPopup::onUpdateCustomColor @ 0x14012bc39\n; > ColorSelectPopup::textChanged @ 0x14012bd95\n; > ColorSelectPopup::colorSelectClosed @ 0x14012c73c\n; > <???> @ 0x1408987a0\n; > <???> @ 0x1408987b0\n; > <???> @ 0x140916c34\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:27:01 +0000\n; \npush    rbx                                                            ; +0x0, 0x14012c250\nsub     rsp, 20h                                                       ; +0x2, 0x14012c252\nmov     eax, [rcx+480h]                                                ; +0x6, 0x14012c256\nmov     rbx, rcx                                                       ; +0xc, 0x14012c25c\nmov     ecx, 1                                                         ; +0xf, 0x14012c25f\ncmp     eax, ecx                                                       ; +0x14, 0x14012c264\ncmovl   eax, ecx                                                       ; +0x16, 0x14012c266\nmov     rcx, [rbx+2A8h]                                                ; +0x19, 0x14012c269\nmov     [rbx+480h], eax                                                ; +0x20, 0x14012c270\ntest    rcx, rcx                                                       ; +0x26, 0x14012c276\njz      short loc_14012C287                                            ; +0x29, 0x14012c279\nmov     [rcx+408h], eax                                                ; +0x2b, 0x14012c27b\nadd     rsp, 20h                                                       ; +0x31, 0x14012c281\npop     rbx                                                            ; +0x35, 0x14012c285\nretn                                                                   ; +0x36, 0x14012c286\nmov     rcx, [rbx+2B0h]                                                ; +0x37, 0x14012c287\ntest    rcx, rcx                                                       ; +0x3e, 0x14012c28e\njz      short loc_14012C2E3                                            ; +0x41, 0x14012c291\nmov     [rsp+28h+arg_0], rdi                                           ; +0x43, 0x14012c293\nxor     edi, edi                                                       ; +0x48, 0x14012c298\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4a, 0x14012c29a\ntest    eax, eax                                                       ; +0x50, 0x14012c2a0\njz      short loc_14012C2DE                                            ; +0x52, 0x14012c2a2\nnop     dword ptr [rax+00h]                                            ; +0x54, 0x14012c2a4\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x58, 0x14012c2a8\nmov     rcx, [rbx+2B0h]                                                ; +0x60, 0x14012c2b0\nmov     edx, edi                                                       ; +0x67, 0x14012c2b7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x69, 0x14012c2b9\nmov     ecx, [rbx+480h]                                                ; +0x6f, 0x14012c2bf\ninc     edi                                                            ; +0x75, 0x14012c2c5\nmov     [rax+408h], ecx                                                ; +0x77, 0x14012c2c7\nmov     rcx, [rbx+2B0h]                                                ; +0x7d, 0x14012c2cd\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x84, 0x14012c2d4\ncmp     edi, eax                                                       ; +0x8a, 0x14012c2da\njb      short loc_14012C2B0                                            ; +0x8c, 0x14012c2dc\nmov     rdi, [rsp+28h+arg_0]                                           ; +0x8e, 0x14012c2de\nadd     rsp, 20h                                                       ; +0x93, 0x14012c2e3\npop     rbx                                                            ; +0x97, 0x14012c2e7\nretn                                                                   ; +0x98, 0x14012c2e8", "xrefs": ["ColorSelectPopup::onUpdateCustomColor @ 0x14012bc39", "ColorSelectPopup::textChanged @ 0x14012bd95", "ColorSelectPopup::colorSelectClosed @ 0x14012c73c", "<???> @ 0x1408987a0", "<???> @ 0x1408987b0", "<???> @ 0x140916c34"], "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"}