{"type": "func", "start": 4734960, "end": 4735152, "name": "EditorUI::editColor", "pseudocode": "// \n// EditorUI::editColor from 0x483ff0 to 0x4840b0 (192 bytes)\n// \n// 2 xrefs:\n// > EditorUI::onEditColor @ 0x484290\n// > EditorUI::checkLiveColorSelect @ 0x6f4450\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:49:24 +0000\n// \n\nGameManager *__fastcall EditorUI::editColor(cocos2d::CCArray **this, int a2, int a3, EffectGameObject *a4)\n{\n  GameManager *result; // r0\n  EffectGameObject *v6; // r1\n  ColorAction *v7; // r2\n  ColorSelectLiveOverlay *v8; // r0\n  cocos2d::CCArray *v9; // r0\n  int v10; // r1\n  unsigned int v11; // r5\n  GameObject *v12; // r0\n  int v13; // r1\n  ColorAction *v14; // [sp+0h] [bp-10h] BYREF\n  ColorAction *v15; // [sp+4h] [bp-Ch] BYREF\n  EffectGameObject *v16[2]; // [sp+8h] [bp-8h] BYREF\n\n  v16[1] = a4;\n  v14 = nullptr;\n  v15 = nullptr;\n  v16[0] = nullptr;\n  result = EditorUI::getEditColorTargets((EditorUI *)this, &v14, &v15, v16);\n  if ( v14 || v15 || v16[0] )\n  {\n    EditorUI::closeLiveColorSelect((EditorUI *)this);\n    EditorUI::closeLiveHSVSelect((EditorUI *)this);\n    v8 = v16[0];\n    *(this + 256) = nullptr;\n    v9 = (cocos2d::CCArray *)(v8\n                            ? ColorSelectLiveOverlay::createWithObject(v8, v6)\n                            : ColorSelectLiveOverlay::createWithActions(v14, v15, v7));\n    *(this + 256) = v9;\n    *((_DWORD *)*(this + 256) + 142) = this + 80;\n    *((_DWORD *)*(this + 256) + 113) = this;\n    result = (GameManager *)(*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 256) + 656))(*(this + 256));\n    if ( !v16[0] )\n    {\n      v11 = (unsigned int)*(this + 249);\n      if ( v11 )\n      {\n        return (GameManager *)GameObject::deselectObject(*(this + 249), v10);\n      }\n      else\n      {\n        result = (GameManager *)cocos2d::CCArray::count(*(this + 167));\n        if ( result )\n        {\n          while ( 1 )\n          {\n            result = (GameManager *)cocos2d::CCArray::count(*(this + 167));\n            if ( v11 >= (unsigned int)result )\n              break;\n            v12 = (GameObject *)cocos2d::CCArray::objectAtIndex(*(this + 167), v11++);\n            GameObject::deselectObject(v12, v13);\n          }\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::editColor from 0x483ff0 to 0x4840b0 (192 bytes)\n; \n; 2 xrefs:\n; > EditorUI::onEditColor @ 0x484290\n; > EditorUI::checkLiveColorSelect @ 0x6f4450\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:49:24 +0000\n; \nPUSH            {R0-R6,LR}                                             ; +0x0, 0x483ff0\nMOV             R1, SP; ColorAction **                                 ; +0x2, 0x483ff2\nLDR             R6, =(__stack_chk_guard_ptr - 0x483FFE)                ; +0x4, 0x483ff4\nADD             R2, SP, #0x10+var_C; ColorAction **                    ; +0x6, 0x483ff6\nMOV             R4, R0                                                 ; +0x8, 0x483ff8\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xa, 0x483ffa\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xc, 0x483ffc\nLDR             R3, [R6]                                               ; +0xe, 0x483ffe\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x10, 0x484000\nMOVS            R3, #0                                                 ; +0x12, 0x484002\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x14, 0x484004\nSTR             R3, [SP,#0x10+var_C]                                   ; +0x16, 0x484006\nSTR             R3, [SP,#0x10+var_8]                                   ; +0x18, 0x484008\nADD             R3, SP, #0x10+var_8; EffectGameObject **               ; +0x1a, 0x48400a\nBL              _ZN8EditorUI19getEditColorTargetsERP11ColorActionS2_RP16EffectGameObject; EditorUI::getEditColorTargets(ColorAction *&,ColorAction *&,EffectGameObject *&) ; +0x1c, 0x48400c\nLDR             R3, [SP,#0x10+var_10]                                  ; +0x20, 0x484010\nCBNZ            R3, loc_48401E                                         ; +0x22, 0x484012\nLDR             R3, [SP,#0x10+var_C]                                   ; +0x24, 0x484014\nCBNZ            R3, loc_48401E                                         ; +0x26, 0x484016\nLDR             R3, [SP,#0x10+var_8]                                   ; +0x28, 0x484018\nCMP             R3, #0                                                 ; +0x2a, 0x48401a\nBEQ             loc_4840A0                                             ; +0x2c, 0x48401c\nMOV             R0, R4; this                                           ; +0x2e, 0x48401e\nBL              _ZN8EditorUI20closeLiveColorSelectEv; EditorUI::closeLiveColorSelect(void) ; +0x30, 0x484020\nMOV             R0, R4; this                                           ; +0x34, 0x484024\nBL              _ZN8EditorUI18closeLiveHSVSelectEv; EditorUI::closeLiveHSVSelect(void) ; +0x36, 0x484026\nLDR             R0, [SP,#0x10+var_8]; this                             ; +0x3a, 0x48402a\nMOVS            R3, #0                                                 ; +0x3c, 0x48402c\nSTR.W           R3, [R4,#0x400]                                        ; +0x3e, 0x48402e\nCBZ             R0, loc_48403A                                         ; +0x42, 0x484032\nBL              _ZN22ColorSelectLiveOverlay16createWithObjectEP16EffectGameObject; ColorSelectLiveOverlay::createWithObject(EffectGameObject *) ; +0x44, 0x484034\nB               loc_484042                                             ; +0x48, 0x484038\nLDMFD.W         SP, {R0,R1}; ColorAction *                             ; +0x4a, 0x48403a\nBL              _ZN22ColorSelectLiveOverlay17createWithActionsEP11ColorActionS1_; ColorSelectLiveOverlay::createWithActions(ColorAction *,ColorAction *) ; +0x4e, 0x48403e\nSTR.W           R0, [R4,#0x400]                                        ; +0x52, 0x484042\nADD.W           R2, R4, #0x140                                         ; +0x56, 0x484046\nLDR.W           R3, [R4,#0x400]                                        ; +0x5a, 0x48404a\nSTR.W           R2, [R3,#0x238]                                        ; +0x5e, 0x48404e\nLDR.W           R3, [R4,#0x400]                                        ; +0x62, 0x484052\nSTR.W           R4, [R3,#0x1C4]                                        ; +0x66, 0x484056\nLDR.W           R0, [R4,#0x400]                                        ; +0x6a, 0x48405a\nLDR             R3, [R0]                                               ; +0x6e, 0x48405e\nLDR.W           R3, [R3,#0x290]                                        ; +0x70, 0x484060\nBLX             R3                                                     ; +0x74, 0x484064\nLDR             R3, [SP,#0x10+var_8]                                   ; +0x76, 0x484066\nCBNZ            R3, loc_4840A0                                         ; +0x78, 0x484068\nLDR.W           R5, [R4,#0x3E4]                                        ; +0x7a, 0x48406a\nCBZ             R5, loc_484078                                         ; +0x7e, 0x48406e\nMOV             R0, R5; this                                           ; +0x80, 0x484070\nBL              _ZN10GameObject14deselectObjectEv; GameObject::deselectObject(void) ; +0x82, 0x484072\nB               loc_4840A0                                             ; +0x86, 0x484076\nLDR.W           R0, [R4,#0x29C]; this                                  ; +0x88, 0x484078\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x8c, 0x48407c\nCBZ             R0, loc_4840A0                                         ; +0x90, 0x484080\nLDR.W           R0, [R4,#0x29C]; this                                  ; +0x92, 0x484082\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x96, 0x484086\nCMP             R5, R0                                                 ; +0x9a, 0x48408a\nBCS             loc_4840A0                                             ; +0x9c, 0x48408c\nMOV             R1, R5; unsigned int                                   ; +0x9e, 0x48408e\nLDR.W           R0, [R4,#0x29C]; this                                  ; +0xa0, 0x484090\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xa4, 0x484094\nADDS            R5, #1                                                 ; +0xa8, 0x484098\nBL              _ZN10GameObject14deselectObjectEv; GameObject::deselectObject(void) ; +0xaa, 0x48409a\nB               loc_484082                                             ; +0xae, 0x48409e\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xb0, 0x4840a0\nLDR             R3, [R6]                                               ; +0xb2, 0x4840a2\nCMP             R2, R3                                                 ; +0xb4, 0x4840a4\nBEQ             loc_4840AC                                             ; +0xb6, 0x4840a6\nBLX             __stack_chk_fail                                       ; +0xb8, 0x4840a8\nADD             SP, SP, #0x10                                          ; +0xbc, 0x4840ac\nPOP             {R4-R6,PC}                                             ; +0xbe, 0x4840ae", "xrefs": ["EditorUI::onEditColor @ 0x484290", "EditorUI::checkLiveColorSelect @ 0x6f4450"], "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"}