{"type": "func", "start": 4299086728, "end": 4299087020, "name": "EditorUI::editColor", "pseudocode": "// \n// EditorUI::editColor from 0x1003edb88 to 0x1003edcac (292 bytes)\n// \n// 2 xrefs:\n// > EditorUI::onEditColor @ 0x1003e4870\n// > EditorUI::checkLiveColorSelect @ 0x1003eda84\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 __fastcall EditorUI::editColor(EditorUI *a1)\n{\n  ColorAction *v2; // x21\n  ColorAction *v3; // x22\n  EffectGameObject *v4; // x20\n  bool v5; // zf\n  ColorSelectLiveOverlay *m_colorOverlay; // x0\n  HSVLiveOverlay *m_hsvOverlay; // x0\n  ColorSelectLiveOverlay *v9; // x0\n  GameObject *m_selectedObject; // x0\n  unsigned int v11; // w20\n  GameObject *v12; // x0\n  EffectGameObject *v13; // [xsp+8h] [xbp-38h] BYREF\n  ColorAction *v14; // [xsp+10h] [xbp-30h] BYREF\n  ColorAction *v15; // [xsp+18h] [xbp-28h] BYREF\n\n  v14 = nullptr;\n  v15 = nullptr;\n  v13 = nullptr;\n  EditorUI::getEditColorTargets(a1, &v15, &v14, &v13);\n  v3 = v14;\n  v2 = v15;\n  v4 = v13;\n  if ( v15 )\n    v5 = 0;\n  else\n    v5 = v14 == nullptr;\n  if ( !v5 || v13 != nullptr )\n  {\n    m_colorOverlay = a1->m_colorOverlay;\n    if ( m_colorOverlay )\n    {\n      ColorSelectLiveOverlay::closeColorSelect(m_colorOverlay, nullptr);\n      a1->m_colorOverlay = nullptr;\n    }\n    m_hsvOverlay = a1->m_hsvOverlay;\n    if ( m_hsvOverlay )\n    {\n      HSVLiveOverlay::closeColorSelect(m_hsvOverlay, nullptr);\n      a1->m_hsvOverlay = nullptr;\n    }\n    a1->m_colorOverlay = nullptr;\n    if ( v4 )\n      v9 = ColorSelectLiveOverlay::createWithObject(v4);\n    else\n      v9 = ColorSelectLiveOverlay::createWithActions(v2, v3);\n    a1->m_colorOverlay = v9;\n    v9->m_delegate = &a1->ColorSelectDelegate;\n    v9->m_scene = a1;\n    ((void (__fastcall *)(ColorSelectLiveOverlay *))v9->show)(v9);\n    if ( !v4 )\n    {\n      m_selectedObject = a1->m_selectedObject;\n      if ( m_selectedObject )\n      {\n        GameObject::deselectObject(m_selectedObject);\n      }\n      else if ( (unsigned int)sub_10024A36C((__int64)a1->m_selectedObjects)\n             && (unsigned int)sub_10024A36C((__int64)a1->m_selectedObjects) )\n      {\n        v11 = 0;\n        do\n        {\n          v12 = (GameObject *)sub_10024A388((__int64)a1->m_selectedObjects, v11);\n          GameObject::deselectObject(v12);\n          ++v11;\n        }\n        while ( v11 < (unsigned int)sub_10024A36C((__int64)a1->m_selectedObjects) );\n      }\n    }\n  }\n}", "assembly": "; \n; EditorUI::editColor from 0x1003edb88 to 0x1003edcac (292 bytes)\n; \n; 2 xrefs:\n; > EditorUI::onEditColor @ 0x1003e4870\n; > EditorUI::checkLiveColorSelect @ 0x1003eda84\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\nSUB             SP, SP, #0x50                                          ; +0x0, 0x1003edb88\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x1003edb8c\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x1003edb90\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x1003edb94\nADD             X29, SP, #0x40                                         ; +0x10, 0x1003edb98\nMOV             X19, X0                                                ; +0x14, 0x1003edb9c\nSTP             XZR, XZR, [SP,#0x40+var_30]                            ; +0x18, 0x1003edba0\nSTR             XZR, [SP,#0x40+var_38]                                 ; +0x1c, 0x1003edba4\nADD             X1, SP, #0x40+var_28                                   ; +0x20, 0x1003edba8\nADD             X2, SP, #0x40+var_30                                   ; +0x24, 0x1003edbac\nADD             X3, SP, #0x40+var_38                                   ; +0x28, 0x1003edbb0\nBL              EditorUI__getEditColorTargets                          ; +0x2c, 0x1003edbb4\nLDP             X22, X21, [SP,#0x40+var_30]                            ; +0x30, 0x1003edbb8\nLDR             X20, [SP,#0x40+var_38]                                 ; +0x34, 0x1003edbbc\nCMP             X21, #0                                                ; +0x38, 0x1003edbc0\nCCMP            X22, #0, #0, EQ                                        ; +0x3c, 0x1003edbc4\nCCMP            X20, #0, #0, EQ                                        ; +0x40, 0x1003edbc8\nB.EQ            loc_1003EDC38                                          ; +0x44, 0x1003edbcc\nLDR             X0, [X19,#0x548]                                       ; +0x48, 0x1003edbd0\nCBZ             X0, loc_1003EDBE4                                      ; +0x4c, 0x1003edbd4\nMOV             X1, #0                                                 ; +0x50, 0x1003edbd8\nBL              ColorSelectLiveOverlay__closeColorSelect               ; +0x54, 0x1003edbdc\nSTR             XZR, [X19,#0x548]                                      ; +0x58, 0x1003edbe0\nLDR             X0, [X19,#0x550]                                       ; +0x5c, 0x1003edbe4\nCBZ             X0, loc_1003EDBF8                                      ; +0x60, 0x1003edbe8\nMOV             X1, #0                                                 ; +0x64, 0x1003edbec\nBL              HSVLiveOverlay__closeColorSelect                       ; +0x68, 0x1003edbf0\nSTR             XZR, [X19,#0x550]                                      ; +0x6c, 0x1003edbf4\nSTR             XZR, [X19,#0x548]                                      ; +0x70, 0x1003edbf8\nCBZ             X20, loc_1003EDC0C                                     ; +0x74, 0x1003edbfc\nMOV             X0, X20                                                ; +0x78, 0x1003edc00\nBL              ColorSelectLiveOverlay__createWithObject               ; +0x7c, 0x1003edc04\nB               loc_1003EDC18                                          ; +0x80, 0x1003edc08\nMOV             X0, X21                                                ; +0x84, 0x1003edc0c\nMOV             X1, X22                                                ; +0x88, 0x1003edc10\nBL              ColorSelectLiveOverlay__createWithActions              ; +0x8c, 0x1003edc14\nSTR             X0, [X19,#0x548]                                       ; +0x90, 0x1003edc18\nADD             X8, X19, #0x1A0                                        ; +0x94, 0x1003edc1c\nSTR             X8, [X0,#0x2C0]                                        ; +0x98, 0x1003edc20\nSTR             X19, [X0,#0x230]                                       ; +0x9c, 0x1003edc24\nLDR             X8, [X0]                                               ; +0xa0, 0x1003edc28\nLDR             X8, [X8,#0x508]                                        ; +0xa4, 0x1003edc2c\nBLR             X8                                                     ; +0xa8, 0x1003edc30\nCBZ             X20, loc_1003EDC4C                                     ; +0xac, 0x1003edc34\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0xb0, 0x1003edc38\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xb4, 0x1003edc3c\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0xb8, 0x1003edc40\nADD             SP, SP, #0x50 ; 'P'                                    ; +0xbc, 0x1003edc44\nRET                                                                    ; +0xc0, 0x1003edc48\nLDR             X0, [X19,#0x520]                                       ; +0xc4, 0x1003edc4c\nCBZ             X0, loc_1003EDC68                                      ; +0xc8, 0x1003edc50\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0xcc, 0x1003edc54\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xd0, 0x1003edc58\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0xd4, 0x1003edc5c\nADD             SP, SP, #0x50 ; 'P'                                    ; +0xd8, 0x1003edc60\nB               GameObject__deselectObject                             ; +0xdc, 0x1003edc64\nLDR             X0, [X19,#0x328]                                       ; +0xe0, 0x1003edc68\nBL              sub_10024A36C                                          ; +0xe4, 0x1003edc6c\nCBZ             W0, loc_1003EDC38                                      ; +0xe8, 0x1003edc70\nLDR             X0, [X19,#0x328]                                       ; +0xec, 0x1003edc74\nBL              sub_10024A36C                                          ; +0xf0, 0x1003edc78\nCBZ             W0, loc_1003EDC38                                      ; +0xf4, 0x1003edc7c\nMOV             W20, #0                                                ; +0xf8, 0x1003edc80\nLDR             X0, [X19,#0x328]                                       ; +0xfc, 0x1003edc84\nMOV             X1, X20                                                ; +0x100, 0x1003edc88\nBL              sub_10024A388                                          ; +0x104, 0x1003edc8c\nBL              GameObject__deselectObject                             ; +0x108, 0x1003edc90\nADD             W20, W20, #1                                           ; +0x10c, 0x1003edc94\nLDR             X0, [X19,#0x328]                                       ; +0x110, 0x1003edc98\nBL              sub_10024A36C                                          ; +0x114, 0x1003edc9c\nCMP             W20, W0                                                ; +0x118, 0x1003edca0\nB.CC            loc_1003EDC84                                          ; +0x11c, 0x1003edca4\nB               loc_1003EDC38                                          ; +0x120, 0x1003edca8", "xrefs": ["EditorUI::onEditColor @ 0x1003e4870", "EditorUI::checkLiveColorSelect @ 0x1003eda84"], "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"}