{"type": "func", "start": 8793988, "end": 8794112, "name": "ColorSelectPopup::updateCustomColorIdx", "pseudocode": "// \n// ColorSelectPopup::updateCustomColorIdx from 0x862f84 to 0x863000 (124 bytes)\n// \n// 4 xrefs:\n// > ColorSelectPopup::onUpdateCustomColor @ 0x8638fc\n// > ColorSelectPopup::colorSelectClosed @ 0x863ae8\n// > ColorSelectPopup::textChanged @ 0x867d3c\n// > <???> @ 0x905b0\n// \n// This function is hookable on this platform (idp: arm, 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:55:37 +0000\n// \n\n__int64 __fastcall ColorSelectPopup::updateCustomColorIdx(__int64 this)\n{\n  __int64 v1; // x19\n  __int64 v2; // x1\n  unsigned int v3; // w20\n  bool v4; // cf\n  unsigned int v5; // w1\n\n  v1 = this;\n  LODWORD(this) = *(_DWORD *)(this + 1168);\n  v2 = *(_QWORD *)(v1 + 680);\n  if ( (int)this <= 0 )\n    this = 1;\n  else\n    this = (unsigned int)this;\n  *(_DWORD *)(v1 + 1168) = this;\n  if ( v2 )\n  {\n    *(_DWORD *)(v2 + 1024) = this;\n  }\n  else\n  {\n    this = *(_QWORD *)(v1 + 688);\n    if ( this )\n    {\n      v3 = 0;\n      while ( 1 )\n      {\n        this = cocos2d::CCArray::count((cocos2d::CCArray *)this);\n        v4 = v3 >= (unsigned int)this;\n        v5 = v3++;\n        if ( v4 )\n          break;\n        *(_DWORD *)(cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v1 + 688), v5) + 1024) = *(_DWORD *)(v1 + 1168);\n        this = *(_QWORD *)(v1 + 688);\n      }\n    }\n  }\n  return this;\n}", "assembly": "; \n; ColorSelectPopup::updateCustomColorIdx from 0x862f84 to 0x863000 (124 bytes)\n; \n; 4 xrefs:\n; > ColorSelectPopup::onUpdateCustomColor @ 0x8638fc\n; > ColorSelectPopup::colorSelectClosed @ 0x863ae8\n; > ColorSelectPopup::textChanged @ 0x867d3c\n; > <???> @ 0x905b0\n; \n; This function is hookable on this platform (idp: arm, 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:55:37 +0000\n; \nSTP             X29, X30, [SP,#-0x20+var_s0]!                          ; +0x0, 0x862f84\nMOV             X29, SP                                                ; +0x4, 0x862f88\nSTP             X19, X20, [SP,#var_s10]                                ; +0x8, 0x862f8c\nMOV             X19, X0                                                ; +0xc, 0x862f90\nLDR             W0, [X0,#0x490]                                        ; +0x10, 0x862f94\nLDR             X1, [X19,#0x2A8]                                       ; +0x14, 0x862f98\nCMP             W0, WZR                                                ; +0x18, 0x862f9c\nCSINC           W0, W0, WZR, GT                                        ; +0x1c, 0x862fa0\nSTR             W0, [X19,#0x490]                                       ; +0x20, 0x862fa4\nCBZ             X1, loc_862FBC                                         ; +0x24, 0x862fa8\nSTR             W0, [X1,#0x400]                                        ; +0x28, 0x862fac\nLDP             X19, X20, [SP,#var_s10]                                ; +0x2c, 0x862fb0\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x30, 0x862fb4\nRET                                                                    ; +0x34, 0x862fb8\nLDR             X0, [X19,#0x2B0]                                       ; +0x38, 0x862fbc\nCBZ             X0, loc_862FB0                                         ; +0x3c, 0x862fc0\nMOV             W20, #0                                                ; +0x40, 0x862fc4\nB               loc_862FE0                                             ; +0x44, 0x862fc8\nLDR             X0, [X19,#0x2B0]; this                                 ; +0x48, 0x862fcc\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x4c, 0x862fd0\nLDR             W1, [X19,#0x490]                                       ; +0x50, 0x862fd4\nSTR             W1, [X0,#0x400]                                        ; +0x54, 0x862fd8\nLDR             X0, [X19,#0x2B0]; this                                 ; +0x58, 0x862fdc\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x5c, 0x862fe0\nCMP             W20, W0                                                ; +0x60, 0x862fe4\nMOV             W1, W20; unsigned int                                  ; +0x64, 0x862fe8\nADD             W20, W20, #1                                           ; +0x68, 0x862fec\nB.CC            loc_862FCC                                             ; +0x6c, 0x862ff0\nLDP             X19, X20, [SP,#var_s10]                                ; +0x70, 0x862ff4\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x74, 0x862ff8\nRET                                                                    ; +0x78, 0x862ffc", "xrefs": ["ColorSelectPopup::onUpdateCustomColor @ 0x8638fc", "ColorSelectPopup::colorSelectClosed @ 0x863ae8", "ColorSelectPopup::textChanged @ 0x867d3c", "<???> @ 0x905b0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}