{"type": "func", "start": 6873508, "end": 6873816, "name": "EditorUI::editColor", "pseudocode": "// \n// EditorUI::editColor from 0x68e1a4 to 0x68e2d8 (308 bytes)\n// \n// 3 xrefs:\n// > EditorUI::onEditColor @ 0x68e508\n// > EditorUI::checkLiveColorSelect @ 0x68e554\n// > <???> @ 0x913f8\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  ColorSelectLiveOverlay *v2; // x0\n  GameObject *m_selectedObject; // x0\n  unsigned int v4; // w21\n  unsigned int v5; // w1\n  GameObject *v6; // x0\n  __int128 v7; // [xsp+30h] [xbp+30h] BYREF\n  EffectGameObject *v8; // [xsp+40h] [xbp+40h] BYREF\n\n  v7 = 0u;\n  v8 = nullptr;\n  EditorUI::getEditColorTargets(a1, (ColorAction **)&v7, (ColorAction **)&v7 + 1, &v8);\n  if ( v7 != 0 || v8 )\n  {\n    EditorUI::closeLiveColorSelect(a1);\n    EditorUI::closeLiveHSVSelect(a1);\n    a1->m_colorOverlay = nullptr;\n    v2 = v8\n       ? ColorSelectLiveOverlay::createWithObject(v8)\n       : ColorSelectLiveOverlay::createWithActions((ColorAction *)v7, *((ColorAction **)&v7 + 1));\n    a1->m_colorOverlay = v2;\n    v2->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(m_selectedObject);\n      }\n      else\n      {\n        v4 = 0;\n        if ( (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) )\n        {\n          while ( v4 < (unsigned int)cocos2d::CCArray::count(a1->m_selectedObjects) )\n          {\n            v5 = v4++;\n            v6 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, v5);\n            GameObject::deselectObject(v6);\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; EditorUI::editColor from 0x68e1a4 to 0x68e2d8 (308 bytes)\n; \n; 3 xrefs:\n; > EditorUI::onEditColor @ 0x68e508\n; > EditorUI::checkLiveColorSelect @ 0x68e554\n; > <???> @ 0x913f8\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x68e1a4\nMOV             X29, SP                                                ; +0x4, 0x68e1a8\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x68e1ac\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x68e1b0\nADD             X1, X29, #0x50+var_20; ColorAction **                  ; +0x10, 0x68e1b4\nADD             X2, X29, #0x50+var_20+8; ColorAction **                ; +0x14, 0x68e1b8\nADD             X3, X29, #0x50+var_10; EffectGameObject **             ; +0x18, 0x68e1bc\nMOV             X19, X0                                                ; +0x1c, 0x68e1c0\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x20, 0x68e1c4\nLDR             X4, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x68e1c8\nSTR             XZR, [X29,#0x50+var_20]                                ; +0x28, 0x68e1cc\nSTR             XZR, [X29,#0x50+var_20+8]                              ; +0x2c, 0x68e1d0\nLDR             X4, [X4]                                               ; +0x30, 0x68e1d4\nSTR             XZR, [X29,#0x50+var_10]                                ; +0x34, 0x68e1d8\nSTR             X4, [X29,#0x50+var_8]                                  ; +0x38, 0x68e1dc\nBL              _ZN8EditorUI19getEditColorTargetsERP11ColorActionS2_RP16EffectGameObject; EditorUI::getEditColorTargets(ColorAction *&,ColorAction *&,EffectGameObject *&) ; +0x3c, 0x68e1e0\nLDR             X0, [X29,#0x50+var_20]                                 ; +0x40, 0x68e1e4\nCBZ             X0, loc_68E260                                         ; +0x44, 0x68e1e8\nMOV             X0, X19; this                                          ; +0x48, 0x68e1ec\nBL              _ZN8EditorUI20closeLiveColorSelectEv; EditorUI::closeLiveColorSelect(void) ; +0x4c, 0x68e1f0\nMOV             X0, X19; this                                          ; +0x50, 0x68e1f4\nBL              _ZN8EditorUI18closeLiveHSVSelectEv; EditorUI::closeLiveHSVSelect(void) ; +0x54, 0x68e1f8\nSTR             XZR, [X19,#0x558]                                      ; +0x58, 0x68e1fc\nLDR             X0, [X29,#0x50+var_10]; this                           ; +0x5c, 0x68e200\nCBZ             X0, loc_68E284                                         ; +0x60, 0x68e204\nBL              _ZN22ColorSelectLiveOverlay16createWithObjectEP16EffectGameObject; ColorSelectLiveOverlay::createWithObject(EffectGameObject *) ; +0x64, 0x68e208\nSTR             X0, [X19,#0x558]                                       ; +0x68, 0x68e20c\nADD             X1, X19, #0x1A0                                        ; +0x6c, 0x68e210\nSTR             X1, [X0,#0x2C0]                                        ; +0x70, 0x68e214\nLDR             X0, [X19,#0x558]                                       ; +0x74, 0x68e218\nSTR             X19, [X0,#0x230]                                       ; +0x78, 0x68e21c\nLDR             X1, [X19,#0x558]                                       ; +0x7c, 0x68e220\nMOV             X0, X1                                                 ; +0x80, 0x68e224\nLDR             X1, [X1]                                               ; +0x84, 0x68e228\nLDR             X1, [X1,#0x508]                                        ; +0x88, 0x68e22c\nBLR             X1                                                     ; +0x8c, 0x68e230\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x90, 0x68e234\nCBZ             X0, loc_68E274                                         ; +0x94, 0x68e238\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x98, 0x68e23c\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x9c, 0x68e240\nLDR             X0, [X20]                                              ; +0xa0, 0x68e244\nCMP             X1, X0                                                 ; +0xa4, 0x68e248\nB.NE            loc_68E2D4                                             ; +0xa8, 0x68e24c\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xac, 0x68e250\nLDR             X21, [SP,#0x50+var_30]                                 ; +0xb0, 0x68e254\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xb4, 0x68e258\nRET                                                                    ; +0xb8, 0x68e25c\nLDR             X0, [X29,#0x50+var_20+8]                               ; +0xbc, 0x68e260\nCBNZ            X0, loc_68E1EC                                         ; +0xc0, 0x68e264\nLDR             X0, [X29,#0x50+var_10]                                 ; +0xc4, 0x68e268\nCBNZ            X0, loc_68E1EC                                         ; +0xc8, 0x68e26c\nB               loc_68E23C                                             ; +0xcc, 0x68e270\nLDR             X0, [X19,#0x530]; this                                 ; +0xd0, 0x68e274\nCBZ             X0, loc_68E298                                         ; +0xd4, 0x68e278\nBL              _ZN10GameObject14deselectObjectEv; GameObject::deselectObject(void) ; +0xd8, 0x68e27c\nB               loc_68E23C                                             ; +0xdc, 0x68e280\nLDR             X0, [X29,#0x50+var_20]; this                           ; +0xe0, 0x68e284\nLDR             X1, [X29,#0x50+var_20+8]; ColorAction *                ; +0xe4, 0x68e288\nBL              _ZN22ColorSelectLiveOverlay17createWithActionsEP11ColorActionS1_; ColorSelectLiveOverlay::createWithActions(ColorAction *,ColorAction *) ; +0xe8, 0x68e28c\nSTR             X0, [X19,#0x558]                                       ; +0xec, 0x68e290\nB               loc_68E210                                             ; +0xf0, 0x68e294\nLDR             X0, [X19,#0x338]; this                                 ; +0xf4, 0x68e298\nMOV             W21, #0                                                ; +0xf8, 0x68e29c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xfc, 0x68e2a0\nCBNZ            W0, loc_68E2C0                                         ; +0x100, 0x68e2a4\nB               loc_68E23C                                             ; +0x104, 0x68e2a8\nLDR             X0, [X19,#0x338]; this                                 ; +0x108, 0x68e2ac\nMOV             W1, W21; unsigned int                                  ; +0x10c, 0x68e2b0\nADD             W21, W21, #1                                           ; +0x110, 0x68e2b4\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x114, 0x68e2b8\nBL              _ZN10GameObject14deselectObjectEv; GameObject::deselectObject(void) ; +0x118, 0x68e2bc\nLDR             X0, [X19,#0x338]; this                                 ; +0x11c, 0x68e2c0\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x120, 0x68e2c4\nCMP             W21, W0                                                ; +0x124, 0x68e2c8\nB.CC            loc_68E2AC                                             ; +0x128, 0x68e2cc\nB               loc_68E23C                                             ; +0x12c, 0x68e2d0\nBL              .__stack_chk_fail                                      ; +0x130, 0x68e2d4", "xrefs": ["EditorUI::onEditColor @ 0x68e508", "EditorUI::checkLiveColorSelect @ 0x68e554", "<???> @ 0x913f8"], "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"}