{"type": "func", "start": 4295016784, "end": 4295017155, "name": "EditorUI::onDeleteSelected", "pseudocode": "// \n// EditorUI::onDeleteSelected from 0x10000c150 to 0x10000c2c3 (371 bytes)\n// \n// 3 xrefs:\n// > EditorUI::keyDown @ 0x100050af1\n// > EditorUI::init @ 0x100009f65\n// > EditorUI::setupDeleteMenu @ 0x10000cacc\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  cocos2d::CCArray *m_selectedObjects; // rdi\n  cocos2d::CCArray *v4; // r14\n  unsigned int v5; // r15d\n  cocos2d::CCArray *v6; // rdi\n  GameObject *v7; // r12\n  char v8; // r12\n  unsigned int v9; // r15d\n  GameObject *v10; // rax\n  UndoObject *v11; // rsi\n  GameObject *m_selectedObject; // rsi\n  UndoObject *v13; // rsi\n\n  m_selectedObjects = a1->m_selectedObjects;\n  if ( (unsigned int)sub_100720070(m_selectedObjects) )\n  {\n    v4 = (cocos2d::CCArray *)sub_10071F9E0(m_selectedObjects, a2);\n    if ( (unsigned int)sub_100720070(a1->m_selectedObjects) )\n    {\n      v5 = 0;\n      do\n      {\n        v6 = a1->m_selectedObjects;\n        v7 = (GameObject *)sub_1007200C0(v6, v5);\n        if ( EditorUI::shouldDeleteObject((EditorUI *)v6, v7) )\n          sub_10071FCD0(v4, v7);\n        ++v5;\n      }\n      while ( v5 < (unsigned int)sub_100720070(a1->m_selectedObjects) );\n    }\n    if ( (unsigned int)sub_100720070(v4) )\n    {\n      v8 = 0;\n      v9 = 0;\n      do\n      {\n        v10 = (GameObject *)sub_1007200C0(v4, v9);\n        v8 |= v10->m_objectID == 747;\n        EditorUI::deleteObject(a1, v10, 1);\n        ++v9;\n      }\n      while ( v9 < (unsigned int)sub_100720070(v4) );\n      v11 = UndoObject::createWithArray(v4, DeleteMulti);\n      LevelEditorLayer::addToUndoList(a1->m_editorLayer, v11, 0);\n      if ( (v8 & 1) != 0 )\n        EditorUI::deselectTargetPortals(a1);\n    }\n    else\n    {\n      v13 = UndoObject::createWithArray(v4, DeleteMulti);\n      LevelEditorLayer::addToUndoList(a1->m_editorLayer, v13, 0);\n    }\n  }\n  else\n  {\n    m_selectedObject = a1->m_selectedObject;\n    if ( m_selectedObject && EditorUI::shouldDeleteObject((EditorUI *)m_selectedObjects, 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 0x10000c150 to 0x10000c2c3 (371 bytes)\n; \n; 3 xrefs:\n; > EditorUI::keyDown @ 0x100050af1\n; > EditorUI::init @ 0x100009f65\n; > EditorUI::setupDeleteMenu @ 0x10000cacc\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    rbp                                                            ; +0x0, 0x10000c150\nmov     rbp, rsp                                                       ; +0x1, 0x10000c151\npush    r15                                                            ; +0x4, 0x10000c154\npush    r14                                                            ; +0x6, 0x10000c156\npush    r12                                                            ; +0x8, 0x10000c158\npush    rbx                                                            ; +0xa, 0x10000c15a\nmov     rbx, rdi                                                       ; +0xb, 0x10000c15b\nmov     rdi, [rdi+328h]                                                ; +0xe, 0x10000c15e\ncall    sub_100720070                                                  ; +0x15, 0x10000c165\ntest    eax, eax                                                       ; +0x1a, 0x10000c16a\njz      loc_10000C259                                                  ; +0x1c, 0x10000c16c\ncall    sub_10071F9E0                                                  ; +0x22, 0x10000c172\nmov     r14, rax                                                       ; +0x27, 0x10000c177\nmov     rdi, [rbx+328h]                                                ; +0x2a, 0x10000c17a\ncall    sub_100720070                                                  ; +0x31, 0x10000c181\ntest    eax, eax                                                       ; +0x36, 0x10000c186\njz      short loc_10000C1CF                                            ; +0x38, 0x10000c188\nxor     r15d, r15d                                                     ; +0x3a, 0x10000c18a\njmp     short loc_10000C1A4                                            ; +0x3d, 0x10000c18d\nalign 10h                                                              ; +0x3f, 0x10000c18f\ninc     r15d                                                           ; +0x40, 0x10000c190\nmov     rdi, [rbx+328h]                                                ; +0x43, 0x10000c193\ncall    sub_100720070                                                  ; +0x4a, 0x10000c19a\ncmp     r15d, eax                                                      ; +0x4f, 0x10000c19f\njnb     short loc_10000C1CF                                            ; +0x52, 0x10000c1a2\nmov     rdi, [rbx+328h]                                                ; +0x54, 0x10000c1a4\nmov     esi, r15d                                                      ; +0x5b, 0x10000c1ab\ncall    sub_1007200C0                                                  ; +0x5e, 0x10000c1ae\nmov     r12, rax                                                       ; +0x63, 0x10000c1b3\nmov     rsi, rax                                                       ; +0x66, 0x10000c1b6\ncall    EditorUI__shouldDeleteObject                                   ; +0x69, 0x10000c1b9\ntest    al, al                                                         ; +0x6e, 0x10000c1be\njz      short loc_10000C190                                            ; +0x70, 0x10000c1c0\nmov     rdi, r14                                                       ; +0x72, 0x10000c1c2\nmov     rsi, r12                                                       ; +0x75, 0x10000c1c5\ncall    sub_10071FCD0                                                  ; +0x78, 0x10000c1c8\njmp     short loc_10000C190                                            ; +0x7d, 0x10000c1cd\nmov     rdi, r14                                                       ; +0x7f, 0x10000c1cf\ncall    sub_100720070                                                  ; +0x82, 0x10000c1d2\ntest    eax, eax                                                       ; +0x87, 0x10000c1d7\njz      loc_10000C281                                                  ; +0x89, 0x10000c1d9\nxor     r12d, r12d                                                     ; +0x8f, 0x10000c1df\nxor     r15d, r15d                                                     ; +0x92, 0x10000c1e2\nnop     word ptr [rax+rax+00000000h]                                   ; +0x95, 0x10000c1e5\nmov     rdi, r14                                                       ; +0xa0, 0x10000c1f0\nmov     esi, r15d                                                      ; +0xa3, 0x10000c1f3\ncall    sub_1007200C0                                                  ; +0xa6, 0x10000c1f6\ncmp     dword ptr [rax+404h], 2EBh                                     ; +0xab, 0x10000c1fb\nsetz    cl                                                             ; +0xb5, 0x10000c205\nor      r12b, cl                                                       ; +0xb8, 0x10000c208\nmov     rdi, rbx                                                       ; +0xbb, 0x10000c20b\nmov     rsi, rax                                                       ; +0xbe, 0x10000c20e\nmov     edx, 1                                                         ; +0xc1, 0x10000c211\ncall    EditorUI__deleteObject                                         ; +0xc6, 0x10000c216\ninc     r15d                                                           ; +0xcb, 0x10000c21b\nmov     rdi, r14                                                       ; +0xce, 0x10000c21e\ncall    sub_100720070                                                  ; +0xd1, 0x10000c221\ncmp     r15d, eax                                                      ; +0xd6, 0x10000c226\njb      short loc_10000C1F0                                            ; +0xd9, 0x10000c229\nmov     rdi, r14                                                       ; +0xdb, 0x10000c22b\nmov     esi, 4                                                         ; +0xde, 0x10000c22e\ncall    UndoObject__createWithArray                                    ; +0xe3, 0x10000c233\nmov     rdi, [rbx+4E8h]                                                ; +0xe8, 0x10000c238\nmov     rsi, rax                                                       ; +0xef, 0x10000c23f\nxor     edx, edx                                                       ; +0xf2, 0x10000c242\ncall    LevelEditorLayer__addToUndoList                                ; +0xf4, 0x10000c244\ntest    r12b, 1                                                        ; +0xf9, 0x10000c249\njz      short loc_10000C29F                                            ; +0xfd, 0x10000c24d\nmov     rdi, rbx                                                       ; +0xff, 0x10000c24f\ncall    EditorUI__deselectTargetPortals                                ; +0x102, 0x10000c252\njmp     short loc_10000C29F                                            ; +0x107, 0x10000c257\nmov     rsi, [rbx+520h]                                                ; +0x109, 0x10000c259\ntest    rsi, rsi                                                       ; +0x110, 0x10000c260\njz      short loc_10000C29F                                            ; +0x113, 0x10000c263\ncall    EditorUI__shouldDeleteObject                                   ; +0x115, 0x10000c265\ntest    al, al                                                         ; +0x11a, 0x10000c26a\njz      short loc_10000C29F                                            ; +0x11c, 0x10000c26c\nmov     rsi, [rbx+520h]                                                ; +0x11e, 0x10000c26e\nmov     rdi, rbx                                                       ; +0x125, 0x10000c275\nxor     edx, edx                                                       ; +0x128, 0x10000c278\ncall    EditorUI__deleteObject                                         ; +0x12a, 0x10000c27a\njmp     short loc_10000C29F                                            ; +0x12f, 0x10000c27f\nmov     rdi, r14                                                       ; +0x131, 0x10000c281\nmov     esi, 4                                                         ; +0x134, 0x10000c284\ncall    UndoObject__createWithArray                                    ; +0x139, 0x10000c289\nmov     rdi, [rbx+4E8h]                                                ; +0x13e, 0x10000c28e\nmov     rsi, rax                                                       ; +0x145, 0x10000c295\nxor     edx, edx                                                       ; +0x148, 0x10000c298\ncall    LevelEditorLayer__addToUndoList                                ; +0x14a, 0x10000c29a\nmov     rdi, rbx                                                       ; +0x14f, 0x10000c29f\ncall    EditorUI__updateObjectInfoLabel                                ; +0x152, 0x10000c2a2\nmov     rax, [rbx]                                                     ; +0x157, 0x10000c2a7\nmov     rdi, rbx                                                       ; +0x15a, 0x10000c2aa\ncall    qword ptr [rax+530h]                                           ; +0x15d, 0x10000c2ad\nmov     rdi, rbx                                                       ; +0x163, 0x10000c2b3\npop     rbx                                                            ; +0x166, 0x10000c2b6\npop     r12                                                            ; +0x167, 0x10000c2b7\npop     r14                                                            ; +0x169, 0x10000c2b9\npop     r15                                                            ; +0x16b, 0x10000c2bb\npop     rbp                                                            ; +0x16d, 0x10000c2bd\njmp     EditorUI__updateButtons                                        ; +0x16e, 0x10000c2be", "xrefs": ["EditorUI::keyDown @ 0x100050af1", "EditorUI::init @ 0x100009f65", "EditorUI::setupDeleteMenu @ 0x10000cacc"], "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"}