{"type": "func", "start": 4298929452, "end": 4298929804, "name": "EditorUI::onDeleteSelected", "pseudocode": "// \n// EditorUI::onDeleteSelected from 0x1003c752c to 0x1003c768c (352 bytes)\n// \n// 3 xrefs:\n// > EditorUI::keyDown @ 0x1003f9cb4\n// > EditorUI::init @ 0x1003c5928\n// > EditorUI::setupDeleteMenu @ 0x1003c7c8c\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::onDeleteSelected(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  EditorUI *v3; // x0\n  cocos2d::CCArray *v4; // x20\n  unsigned int v5; // w21\n  EditorUI *v6; // x0\n  char v7; // w22\n  unsigned int v8; // w21\n  GameObject *v9; // x1\n  UndoObject *v10; // x0\n  GameObject *m_selectedObject; // x1\n  UndoObject *v12; // x0\n\n  v3 = (EditorUI *)sub_10024A36C((__int64)a1->m_selectedObjects);\n  if ( (_DWORD)v3 )\n  {\n    v4 = (cocos2d::CCArray *)sub_10024A15C();\n    if ( (unsigned int)sub_10024A36C((__int64)a1->m_selectedObjects) )\n    {\n      v5 = 0;\n      do\n      {\n        v6 = (EditorUI *)sub_10024A388((__int64)a1->m_selectedObjects, v5);\n        if ( EditorUI::shouldDeleteObject(v6, (GameObject *)v6) )\n          sub_10024A2D0((__int64)v4);\n        ++v5;\n      }\n      while ( v5 < (unsigned int)sub_10024A36C((__int64)a1->m_selectedObjects) );\n    }\n    if ( (unsigned int)sub_10024A36C((__int64)v4) )\n    {\n      v7 = 0;\n      v8 = 0;\n      do\n      {\n        v9 = (GameObject *)sub_10024A388((__int64)v4, v8);\n        v7 |= v9->m_objectID == 747;\n        EditorUI::deleteObject(a1, v9, 1);\n        ++v8;\n      }\n      while ( v8 < (unsigned int)sub_10024A36C((__int64)v4) );\n      v10 = UndoObject::createWithArray(v4, DeleteMulti);\n      LevelEditorLayer::addToUndoList(a1->m_editorLayer, v10, 0);\n      if ( (v7 & 1) != 0 )\n        EditorUI::deselectTargetPortals(a1);\n    }\n    else\n    {\n      v12 = UndoObject::createWithArray(v4, DeleteMulti);\n      LevelEditorLayer::addToUndoList(a1->m_editorLayer, v12, 0);\n    }\n  }\n  else\n  {\n    m_selectedObject = a1->m_selectedObject;\n    if ( m_selectedObject && EditorUI::shouldDeleteObject(v3, m_selectedObject) )\n      EditorUI::deleteObject(a1, a1->m_selectedObject, 0);\n  }\n  EditorUI::updateObjectInfoLabel(a1);\n  ((void (__fastcall *)(EditorUI *))a1->updateScaleControl)(a1);\n  EditorUI::updateButtons(a1);\n}", "assembly": "; \n; EditorUI::onDeleteSelected from 0x1003c752c to 0x1003c768c (352 bytes)\n; \n; 3 xrefs:\n; > EditorUI::keyDown @ 0x1003f9cb4\n; > EditorUI::init @ 0x1003c5928\n; > EditorUI::setupDeleteMenu @ 0x1003c7c8c\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             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1003c752c\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1003c7530\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1003c7534\nADD             X29, SP, #0x20                                         ; +0xc, 0x1003c7538\nMOV             X19, X0                                                ; +0x10, 0x1003c753c\nLDR             X0, [X0,#0x328]                                        ; +0x14, 0x1003c7540\nBL              sub_10024A36C                                          ; +0x18, 0x1003c7544\nCBZ             W0, loc_1003C7620                                      ; +0x1c, 0x1003c7548\nBL              sub_10024A15C                                          ; +0x20, 0x1003c754c\nMOV             X20, X0                                                ; +0x24, 0x1003c7550\nLDR             X0, [X19,#0x328]                                       ; +0x28, 0x1003c7554\nBL              sub_10024A36C                                          ; +0x2c, 0x1003c7558\nCBZ             W0, loc_1003C75A0                                      ; +0x30, 0x1003c755c\nMOV             W21, #0                                                ; +0x34, 0x1003c7560\nLDR             X0, [X19,#0x328]                                       ; +0x38, 0x1003c7564\nMOV             X1, X21                                                ; +0x3c, 0x1003c7568\nBL              sub_10024A388                                          ; +0x40, 0x1003c756c\nMOV             X22, X0                                                ; +0x44, 0x1003c7570\nMOV             X1, X0                                                 ; +0x48, 0x1003c7574\nBL              EditorUI__shouldDeleteObject                           ; +0x4c, 0x1003c7578\nCBZ             W0, loc_1003C758C                                      ; +0x50, 0x1003c757c\nMOV             X0, X20                                                ; +0x54, 0x1003c7580\nMOV             X1, X22                                                ; +0x58, 0x1003c7584\nBL              sub_10024A2D0                                          ; +0x5c, 0x1003c7588\nADD             W21, W21, #1                                           ; +0x60, 0x1003c758c\nLDR             X0, [X19,#0x328]                                       ; +0x64, 0x1003c7590\nBL              sub_10024A36C                                          ; +0x68, 0x1003c7594\nCMP             W21, W0                                                ; +0x6c, 0x1003c7598\nB.CC            loc_1003C7564                                          ; +0x70, 0x1003c759c\nMOV             X0, X20                                                ; +0x74, 0x1003c75a0\nBL              sub_10024A36C                                          ; +0x78, 0x1003c75a4\nCBZ             W0, loc_1003C7644                                      ; +0x7c, 0x1003c75a8\nMOV             W22, #0                                                ; +0x80, 0x1003c75ac\nMOV             W21, #0                                                ; +0x84, 0x1003c75b0\nMOV             X0, X20                                                ; +0x88, 0x1003c75b4\nMOV             X1, X21                                                ; +0x8c, 0x1003c75b8\nBL              sub_10024A388                                          ; +0x90, 0x1003c75bc\nMOV             X1, X0                                                 ; +0x94, 0x1003c75c0\nLDR             W8, [X0,#0x404]                                        ; +0x98, 0x1003c75c4\nCMP             W8, #0x2EB                                             ; +0x9c, 0x1003c75c8\nCSET            W8, EQ                                                 ; +0xa0, 0x1003c75cc\nORR             W22, W8, W22                                           ; +0xa4, 0x1003c75d0\nMOV             X0, X19                                                ; +0xa8, 0x1003c75d4\nMOV             W2, #1                                                 ; +0xac, 0x1003c75d8\nBL              EditorUI__deleteObject                                 ; +0xb0, 0x1003c75dc\nADD             W21, W21, #1                                           ; +0xb4, 0x1003c75e0\nMOV             X0, X20                                                ; +0xb8, 0x1003c75e4\nBL              sub_10024A36C                                          ; +0xbc, 0x1003c75e8\nCMP             W21, W0                                                ; +0xc0, 0x1003c75ec\nB.CC            loc_1003C75B4                                          ; +0xc4, 0x1003c75f0\nMOV             X0, X20                                                ; +0xc8, 0x1003c75f4\nMOV             W1, #4                                                 ; +0xcc, 0x1003c75f8\nBL              UndoObject__createWithArray                            ; +0xd0, 0x1003c75fc\nMOV             X1, X0                                                 ; +0xd4, 0x1003c7600\nLDR             X0, [X19,#0x4E8]                                       ; +0xd8, 0x1003c7604\nMOV             W2, #0                                                 ; +0xdc, 0x1003c7608\nBL              LevelEditorLayer__addToUndoList                        ; +0xe0, 0x1003c760c\nTBZ             W22, #0, loc_1003C7660                                 ; +0xe4, 0x1003c7610\nMOV             X0, X19                                                ; +0xe8, 0x1003c7614\nBL              EditorUI__deselectTargetPortals                        ; +0xec, 0x1003c7618\nB               loc_1003C7660                                          ; +0xf0, 0x1003c761c\nLDR             X1, [X19,#0x520]                                       ; +0xf4, 0x1003c7620\nCBZ             X1, loc_1003C7660                                      ; +0xf8, 0x1003c7624\nBL              EditorUI__shouldDeleteObject                           ; +0xfc, 0x1003c7628\nCBZ             W0, loc_1003C7660                                      ; +0x100, 0x1003c762c\nLDR             X1, [X19,#0x520]                                       ; +0x104, 0x1003c7630\nMOV             X0, X19                                                ; +0x108, 0x1003c7634\nMOV             W2, #0                                                 ; +0x10c, 0x1003c7638\nBL              EditorUI__deleteObject                                 ; +0x110, 0x1003c763c\nB               loc_1003C7660                                          ; +0x114, 0x1003c7640\nMOV             X0, X20                                                ; +0x118, 0x1003c7644\nMOV             W1, #4                                                 ; +0x11c, 0x1003c7648\nBL              UndoObject__createWithArray                            ; +0x120, 0x1003c764c\nMOV             X1, X0                                                 ; +0x124, 0x1003c7650\nLDR             X0, [X19,#0x4E8]                                       ; +0x128, 0x1003c7654\nMOV             W2, #0                                                 ; +0x12c, 0x1003c7658\nBL              LevelEditorLayer__addToUndoList                        ; +0x130, 0x1003c765c\nMOV             X0, X19                                                ; +0x134, 0x1003c7660\nBL              EditorUI__updateObjectInfoLabel                        ; +0x138, 0x1003c7664\nLDR             X8, [X19]                                              ; +0x13c, 0x1003c7668\nLDR             X8, [X8,#0x530]                                        ; +0x140, 0x1003c766c\nMOV             X0, X19                                                ; +0x144, 0x1003c7670\nBLR             X8                                                     ; +0x148, 0x1003c7674\nMOV             X0, X19                                                ; +0x14c, 0x1003c7678\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x150, 0x1003c767c\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x154, 0x1003c7680\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x158, 0x1003c7684\nB               EditorUI__updateButtons                                ; +0x15c, 0x1003c7688", "xrefs": ["EditorUI::keyDown @ 0x1003f9cb4", "EditorUI::init @ 0x1003c5928", "EditorUI::setupDeleteMenu @ 0x1003c7c8c"], "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"}