{"type": "func", "start": 3672040, "end": 3672232, "name": "EditorUI::editColor", "pseudocode": "// \n// EditorUI::editColor from 0x3807e8 to 0x3808a8 (192 bytes)\n// \n// 2 xrefs:\n// > EditorUI::onEditColor @ 0x3809e8\n// > EditorUI::checkLiveColorSelect @ 0x380a08\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 EditorUI::editColor(EditorUI *a1)\n{\n  EffectGameObject *v2; // r0\n  ColorSelectLiveOverlay *v3; // r0\n  GameObject *m_selectedObject; // r5\n  GameObject *v5; // r0\n  ColorAction *v6; // [sp+0h] [bp-10h] BYREF\n  ColorAction *v7; // [sp+4h] [bp-Ch] BYREF\n  EffectGameObject *v8; // [sp+8h] [bp-8h] BYREF\n\n  v6 = nullptr;\n  v7 = nullptr;\n  v8 = nullptr;\n  EditorUI::getEditColorTargets(a1, &v6, &v7, &v8);\n  if ( v6 || v7 || v8 )\n  {\n    EditorUI::closeLiveColorSelect(a1);\n    EditorUI::closeLiveHSVSelect(a1);\n    v2 = v8;\n    a1->m_colorOverlay = nullptr;\n    v3 = v2 ? ColorSelectLiveOverlay::createWithObject(v2) : ColorSelectLiveOverlay::createWithActions(v6, v7);\n    a1->m_colorOverlay = v3;\n    a1->m_colorOverlay->m_delegate = &a1->ColorSelectDelegate;\n    a1->m_colorOverlay->m_scene = a1;\n    a1->m_colorOverlay->show(a1->m_colorOverlay);\n    if ( !v8 )\n    {\n      m_selectedObject = a1->m_selectedObject;\n      if ( m_selectedObject )\n      {\n        GameObject::deselectObject(a1->m_selectedObject);\n      }\n      else if ( cocos2d::CCArray::count(a1->m_selectedObjects) )\n      {\n        while ( (unsigned int)m_selectedObject < cocos2d::CCArray::count(a1->m_selectedObjects) )\n        {\n          v5 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, (unsigned int)m_selectedObject);\n          m_selectedObject = (GameObject *)((char *)m_selectedObject + 1);\n          GameObject::deselectObject(v5);\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; EditorUI::editColor from 0x3807e8 to 0x3808a8 (192 bytes)\n; \n; 2 xrefs:\n; > EditorUI::onEditColor @ 0x3809e8\n; > EditorUI::checkLiveColorSelect @ 0x380a08\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            {R0-R6,LR}                                             ; +0x0, 0x3807e8\nMOV             R1, SP; ColorAction **                                 ; +0x2, 0x3807ea\nLDR             R6, =(__stack_chk_guard_ptr - 0x3807F6)                ; +0x4, 0x3807ec\nADD             R2, SP, #0x10+var_C; ColorAction **                    ; +0x6, 0x3807ee\nMOV             R4, R0                                                 ; +0x8, 0x3807f0\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xa, 0x3807f2\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xc, 0x3807f4\nLDR             R3, [R6]                                               ; +0xe, 0x3807f6\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x10, 0x3807f8\nMOVS            R3, #0                                                 ; +0x12, 0x3807fa\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x14, 0x3807fc\nSTR             R3, [SP,#0x10+var_C]                                   ; +0x16, 0x3807fe\nSTR             R3, [SP,#0x10+var_8]                                   ; +0x18, 0x380800\nADD             R3, SP, #0x10+var_8; EffectGameObject **               ; +0x1a, 0x380802\nBL              _ZN8EditorUI19getEditColorTargetsERP11ColorActionS2_RP16EffectGameObject; EditorUI::getEditColorTargets(ColorAction *&,ColorAction *&,EffectGameObject *&) ; +0x1c, 0x380804\nLDR             R3, [SP,#0x10+var_10]                                  ; +0x20, 0x380808\nCBNZ            R3, loc_380816                                         ; +0x22, 0x38080a\nLDR             R3, [SP,#0x10+var_C]                                   ; +0x24, 0x38080c\nCBNZ            R3, loc_380816                                         ; +0x26, 0x38080e\nLDR             R3, [SP,#0x10+var_8]                                   ; +0x28, 0x380810\nCMP             R3, #0                                                 ; +0x2a, 0x380812\nBEQ             loc_380898                                             ; +0x2c, 0x380814\nMOV             R0, R4; this                                           ; +0x2e, 0x380816\nBL              _ZN8EditorUI20closeLiveColorSelectEv; EditorUI::closeLiveColorSelect(void) ; +0x30, 0x380818\nMOV             R0, R4; this                                           ; +0x34, 0x38081c\nBL              _ZN8EditorUI18closeLiveHSVSelectEv; EditorUI::closeLiveHSVSelect(void) ; +0x36, 0x38081e\nLDR             R0, [SP,#0x10+var_8]; this                             ; +0x3a, 0x380822\nMOVS            R3, #0                                                 ; +0x3c, 0x380824\nSTR.W           R3, [R4,#0x38C]                                        ; +0x3e, 0x380826\nCBZ             R0, loc_380832                                         ; +0x42, 0x38082a\nBL              _ZN22ColorSelectLiveOverlay16createWithObjectEP16EffectGameObject; ColorSelectLiveOverlay::createWithObject(EffectGameObject *) ; +0x44, 0x38082c\nB               loc_38083A                                             ; +0x48, 0x380830\nLDMFD.W         SP, {R0,R1}; ColorAction *                             ; +0x4a, 0x380832\nBL              _ZN22ColorSelectLiveOverlay17createWithActionsEP11ColorActionS1_; ColorSelectLiveOverlay::createWithActions(ColorAction *,ColorAction *) ; +0x4e, 0x380836\nSTR.W           R0, [R4,#0x38C]                                        ; +0x52, 0x38083a\nADD.W           R2, R4, #0x140                                         ; +0x56, 0x38083e\nLDR.W           R3, [R4,#0x38C]                                        ; +0x5a, 0x380842\nSTR.W           R2, [R3,#0x220]                                        ; +0x5e, 0x380846\nLDR.W           R3, [R4,#0x38C]                                        ; +0x62, 0x38084a\nSTR.W           R4, [R3,#0x1C0]                                        ; +0x66, 0x38084e\nLDR.W           R0, [R4,#0x38C]                                        ; +0x6a, 0x380852\nLDR             R3, [R0]                                               ; +0x6e, 0x380856\nLDR.W           R3, [R3,#0x284]                                        ; +0x70, 0x380858\nBLX             R3                                                     ; +0x74, 0x38085c\nLDR             R3, [SP,#0x10+var_8]                                   ; +0x76, 0x38085e\nCBNZ            R3, loc_380898                                         ; +0x78, 0x380860\nLDR.W           R5, [R4,#0x374]                                        ; +0x7a, 0x380862\nCBZ             R5, loc_380870                                         ; +0x7e, 0x380866\nMOV             R0, R5; this                                           ; +0x80, 0x380868\nBL              _ZN10GameObject14deselectObjectEv; GameObject::deselectObject(void) ; +0x82, 0x38086a\nB               loc_380898                                             ; +0x86, 0x38086e\nLDR.W           R0, [R4,#0x260]; this                                  ; +0x88, 0x380870\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x8c, 0x380874\nCBZ             R0, loc_380898                                         ; +0x90, 0x380878\nLDR.W           R0, [R4,#0x260]; this                                  ; +0x92, 0x38087a\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x96, 0x38087e\nCMP             R5, R0                                                 ; +0x9a, 0x380882\nBCS             loc_380898                                             ; +0x9c, 0x380884\nMOV             R1, R5; unsigned int                                   ; +0x9e, 0x380886\nLDR.W           R0, [R4,#0x260]; this                                  ; +0xa0, 0x380888\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xa4, 0x38088c\nADDS            R5, #1                                                 ; +0xa8, 0x380890\nBL              _ZN10GameObject14deselectObjectEv; GameObject::deselectObject(void) ; +0xaa, 0x380892\nB               loc_38087A                                             ; +0xae, 0x380896\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xb0, 0x380898\nLDR             R3, [R6]                                               ; +0xb2, 0x38089a\nCMP             R2, R3                                                 ; +0xb4, 0x38089c\nBEQ             loc_3808A4                                             ; +0xb6, 0x38089e\nBLX             __stack_chk_fail                                       ; +0xb8, 0x3808a0\nADD             SP, SP, #0x10                                          ; +0xbc, 0x3808a4\nPOP             {R4-R6,PC}                                             ; +0xbe, 0x3808a6", "xrefs": ["EditorUI::onEditColor @ 0x3809e8", "EditorUI::checkLiveColorSelect @ 0x380a08"], "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"}