{"type": "func", "start": 4039824, "end": 4039898, "name": "ColorSelectPopup::updateCustomColorIdx", "pseudocode": "// \n// ColorSelectPopup::updateCustomColorIdx from 0x3da490 to 0x3da4da (74 bytes)\n// \n// 3 xrefs:\n// > ColorSelectPopup::onUpdateCustomColor @ 0x3da5cc\n// > ColorSelectPopup::colorSelectClosed @ 0x3da788\n// > ColorSelectPopup::textChanged @ 0x3dd06c\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\nvoid ColorSelectPopup::updateCustomColorIdx(ColorSelectPopup *a1)\n{\n  int m_colorID; // r3\n  EffectGameObject *m_gameObject; // r4\n  int v4; // r0\n\n  m_colorID = a1->m_colorID;\n  m_gameObject = a1->m_gameObject;\n  if ( m_colorID < 1 )\n    m_colorID = 1;\n  a1->m_colorID = m_colorID;\n  if ( m_gameObject )\n  {\n    m_gameObject->m_targetColor = m_colorID;\n  }\n  else if ( a1->m_gameObjects )\n  {\n    while ( (unsigned int)m_gameObject < cocos2d::CCArray::count(a1->m_gameObjects) )\n    {\n      v4 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, (unsigned int)m_gameObject);\n      m_gameObject = (EffectGameObject *)((char *)m_gameObject + 1);\n      *(_DWORD *)(v4 + 880) = a1->m_colorID;\n    }\n  }\n}", "assembly": "; \n; ColorSelectPopup::updateCustomColorIdx from 0x3da490 to 0x3da4da (74 bytes)\n; \n; 3 xrefs:\n; > ColorSelectPopup::onUpdateCustomColor @ 0x3da5cc\n; > ColorSelectPopup::colorSelectClosed @ 0x3da788\n; > ColorSelectPopup::textChanged @ 0x3dd06c\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            {R3-R5,LR}                                             ; +0x0, 0x3da490\nMOV             R5, R0                                                 ; +0x2, 0x3da492\nLDR.W           R3, [R0,#0x300]                                        ; +0x4, 0x3da494\nLDR.W           R4, [R0,#0x1FC]                                        ; +0x8, 0x3da498\nCMP             R3, #1                                                 ; +0xc, 0x3da49c\nIT LT                                                                  ; +0xe, 0x3da49e\nMOVLT           R3, #1                                                 ; +0x10, 0x3da4a0\nSTR.W           R3, [R0,#0x300]                                        ; +0x12, 0x3da4a2\nCBZ             R4, loc_3DA4AE                                         ; +0x16, 0x3da4a6\nSTR.W           R3, [R4,#0x370]                                        ; +0x18, 0x3da4a8\nPOP             {R3-R5,PC}                                             ; +0x1c, 0x3da4ac\nLDR.W           R3, [R0,#0x200]                                        ; +0x1e, 0x3da4ae\nCBNZ            R3, loc_3DA4B6                                         ; +0x22, 0x3da4b2\nPOP             {R3-R5,PC}                                             ; +0x24, 0x3da4b4\nLDR.W           R0, [R5,#0x200]; this                                  ; +0x26, 0x3da4b6\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2a, 0x3da4ba\nCMP             R4, R0                                                 ; +0x2e, 0x3da4be\nBCS             locret_3DA4D8                                          ; +0x30, 0x3da4c0\nMOV             R1, R4; unsigned int                                   ; +0x32, 0x3da4c2\nLDR.W           R0, [R5,#0x200]; this                                  ; +0x34, 0x3da4c4\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x38, 0x3da4c8\nLDR.W           R3, [R5,#0x300]                                        ; +0x3c, 0x3da4cc\nADDS            R4, #1                                                 ; +0x40, 0x3da4d0\nSTR.W           R3, [R0,#0x370]                                        ; +0x42, 0x3da4d2\nB               loc_3DA4B6                                             ; +0x46, 0x3da4d6\nPOP             {R3-R5,PC}                                             ; +0x48, 0x3da4d8", "xrefs": ["ColorSelectPopup::onUpdateCustomColor @ 0x3da5cc", "ColorSelectPopup::colorSelectClosed @ 0x3da788", "ColorSelectPopup::textChanged @ 0x3dd06c"], "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"}