{"type": "func", "start": 5107914, "end": 5107988, "name": "ColorSelectPopup::updateCustomColorIdx", "pseudocode": "// \n// ColorSelectPopup::updateCustomColorIdx from 0x4df0ca to 0x4df114 (74 bytes)\n// \n// 3 xrefs:\n// > ColorSelectPopup::onUpdateCustomColor @ 0x4df800\n// > ColorSelectPopup::colorSelectClosed @ 0x4df8a0\n// > ColorSelectPopup::textChanged @ 0x4e21b0\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:50:59 +0000\n// \n\n_DWORD *__fastcall ColorSelectPopup::updateCustomColorIdx(_DWORD *this)\n{\n  _DWORD *v1; // r5\n  int v2; // r3\n  unsigned int v3; // r4\n  int v4; // r0\n\n  v1 = this;\n  v2 = *(this + 200);\n  v3 = *(this + 132);\n  if ( v2 < 1 )\n    v2 = 1;\n  *(this + 200) = v2;\n  if ( v3 )\n  {\n    *(_DWORD *)(v3 + 888) = v2;\n  }\n  else if ( *(this + 133) )\n  {\n    while ( 1 )\n    {\n      this = (_DWORD *)cocos2d::CCArray::count((cocos2d::CCArray *)v1[133]);\n      if ( v3 >= (unsigned int)this )\n        break;\n      v4 = cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)v1[133], v3++);\n      *(_DWORD *)(v4 + 888) = v1[200];\n    }\n  }\n  return this;\n}", "assembly": "; \n; ColorSelectPopup::updateCustomColorIdx from 0x4df0ca to 0x4df114 (74 bytes)\n; \n; 3 xrefs:\n; > ColorSelectPopup::onUpdateCustomColor @ 0x4df800\n; > ColorSelectPopup::colorSelectClosed @ 0x4df8a0\n; > ColorSelectPopup::textChanged @ 0x4e21b0\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:50:59 +0000\n; \nPUSH            {R3-R5,LR}                                             ; +0x0, 0x4df0ca\nMOV             R5, R0                                                 ; +0x2, 0x4df0cc\nLDR.W           R3, [R0,#0x320]                                        ; +0x4, 0x4df0ce\nLDR.W           R4, [R0,#0x210]                                        ; +0x8, 0x4df0d2\nCMP             R3, #1                                                 ; +0xc, 0x4df0d6\nIT LT                                                                  ; +0xe, 0x4df0d8\nMOVLT           R3, #1                                                 ; +0x10, 0x4df0da\nSTR.W           R3, [R0,#0x320]                                        ; +0x12, 0x4df0dc\nCBZ             R4, loc_4DF0E8                                         ; +0x16, 0x4df0e0\nSTR.W           R3, [R4,#0x378]                                        ; +0x18, 0x4df0e2\nPOP             {R3-R5,PC}                                             ; +0x1c, 0x4df0e6\nLDR.W           R3, [R0,#0x214]                                        ; +0x1e, 0x4df0e8\nCBNZ            R3, loc_4DF0F0                                         ; +0x22, 0x4df0ec\nPOP             {R3-R5,PC}                                             ; +0x24, 0x4df0ee\nLDR.W           R0, [R5,#0x214]; this                                  ; +0x26, 0x4df0f0\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2a, 0x4df0f4\nCMP             R4, R0                                                 ; +0x2e, 0x4df0f8\nBCS             locret_4DF112                                          ; +0x30, 0x4df0fa\nMOV             R1, R4; unsigned int                                   ; +0x32, 0x4df0fc\nLDR.W           R0, [R5,#0x214]; this                                  ; +0x34, 0x4df0fe\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x38, 0x4df102\nLDR.W           R3, [R5,#0x320]                                        ; +0x3c, 0x4df106\nADDS            R4, #1                                                 ; +0x40, 0x4df10a\nSTR.W           R3, [R0,#0x378]                                        ; +0x42, 0x4df10c\nB               loc_4DF0F0                                             ; +0x46, 0x4df110\nPOP             {R3-R5,PC}                                             ; +0x48, 0x4df112", "xrefs": ["ColorSelectPopup::onUpdateCustomColor @ 0x4df800", "ColorSelectPopup::colorSelectClosed @ 0x4df8a0", "ColorSelectPopup::textChanged @ 0x4e21b0"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}