{"type": "func", "start": 4295000672, "end": 4295001342, "name": "EditorUI::onDeleteSelected", "pseudocode": "// \n// EditorUI::onDeleteSelected from 0x100008260 to 0x1000084fe (670 bytes)\n// \n// 3 xrefs:\n// > EditorUI::handleEditorAction @ 0x10060c711\n// > EditorUI::init @ 0x100006075\n// > EditorUI::setupDeleteMenu @ 0x10063b3e4\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:18:48 +0000\n// \n\n__int64 __fastcall EditorUI::onDeleteSelected(_QWORD *a1)\n{\n  __int64 v2; // rdi\n  __int64 v3; // rax\n  __int64 v4; // rdi\n  __int64 v5; // r14\n  unsigned int v6; // r15d\n  __int64 v7; // rdi\n  __int64 v8; // r12\n  char v9; // r13\n  unsigned int v10; // r15d\n  __int64 v11; // r12\n  __int64 v12; // rax\n  __int64 v13; // r14\n  __int64 v14; // rax\n\n  v2 = a1[112];\n  if ( (unsigned int)sub_1007FEF90(v2) )\n  {\n    v3 = EditorSFXManager::sharedState(v2);\n    EditorSFXManager::playAction_1(v3, 102);\n    v4 = a1[180] + 14704LL;\n    EditorBuildStats::noteAction(v4);\n    v5 = sub_1007FE900(v4);\n    if ( (unsigned int)sub_1007FEF90(a1[112]) )\n    {\n      v6 = 0;\n      do\n      {\n        v7 = a1[112];\n        v8 = sub_1007FEFE0(v7, v6);\n        if ( (unsigned __int8)EditorUI::shouldDeleteObject(v7) )\n          sub_1007FEBF0(v5, v8);\n        ++v6;\n      }\n      while ( v6 < (unsigned int)sub_1007FEF90(a1[112]) );\n    }\n    if ( (unsigned int)sub_1007FEF90(v5) )\n    {\n      v9 = 0;\n      v10 = 0;\n      do\n      {\n        v11 = sub_1007FEFE0(v5, v10);\n        v9 |= *(_DWORD *)(v11 + 1028) == 747;\n        *(_BYTE *)(v11 + 1132) = *(_BYTE *)(v11 + 1133);\n        EditorUI::deselectObject(a1, v11);\n        LevelEditorLayer::removeObject(a1[180], v11, 1);\n        EditorUI::deactivateRotationControl(a1);\n        EditorUI::deactivateScaleControl(a1);\n        sub_100611790(a1);\n        ++v10;\n      }\n      while ( v10 < (unsigned int)sub_1007FEF90(v5) );\n      *(_DWORD *)(a1[180] + 14712LL) += sub_1007FEF90(v5);\n      v12 = UndoObject::createWithArray(v5, 4);\n      LevelEditorLayer::addToUndoList(a1[180], v12, 0);\n      if ( (v9 & 1) != 0 )\n        sub_1005B94E0(a1);\n    }\n    else\n    {\n      *(_DWORD *)(a1[180] + 14712LL) += sub_1007FEF90(v5);\n      v14 = UndoObject::createWithArray(v5, 4);\n      LevelEditorLayer::addToUndoList(a1[180], v14, 0);\n    }\n  }\n  else if ( a1[187] )\n  {\n    if ( (unsigned __int8)EditorUI::shouldDeleteObject(v2) )\n    {\n      EditorBuildStats::noteAction(a1[180] + 14704LL);\n      v13 = a1[187];\n      if ( v13 )\n      {\n        *(_BYTE *)(v13 + 1132) = *(_BYTE *)(v13 + 1133);\n        EditorUI::deselectObject(a1, v13);\n        LevelEditorLayer::removeObject(a1[180], v13, 0);\n        EditorUI::deactivateRotationControl(a1);\n        EditorUI::deactivateScaleControl(a1);\n        sub_100611790(a1);\n      }\n    }\n  }\n  if ( !a1[187] && !(unsigned int)sub_1007FEF90(a1[112]) )\n  {\n    EditorUI::deactivateRotationControl(a1);\n    EditorUI::deactivateScaleControl(a1);\n    sub_100611790(a1);\n  }\n  EditorUI::updateObjectInfoLabel(a1);\n  (*(void (__fastcall **)(_QWORD *))(*a1 + 1352LL))(a1);\n  return EditorUI::updateButtons(a1);\n}", "assembly": "; \n; EditorUI::onDeleteSelected from 0x100008260 to 0x1000084fe (670 bytes)\n; \n; 3 xrefs:\n; > EditorUI::handleEditorAction @ 0x10060c711\n; > EditorUI::init @ 0x100006075\n; > EditorUI::setupDeleteMenu @ 0x10063b3e4\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:18:48 +0000\n; \npush    rbp                                                            ; +0x0, 0x100008260\nmov     rbp, rsp                                                       ; +0x1, 0x100008261\npush    r15                                                            ; +0x4, 0x100008264\npush    r14                                                            ; +0x6, 0x100008266\npush    r13                                                            ; +0x8, 0x100008268\npush    r12                                                            ; +0xa, 0x10000826a\npush    rbx                                                            ; +0xc, 0x10000826c\npush    rax                                                            ; +0xd, 0x10000826d\nmov     rbx, rdi                                                       ; +0xe, 0x10000826e\nmov     rdi, [rdi+380h]                                                ; +0x11, 0x100008271\ncall    sub_1007FEF90                                                  ; +0x18, 0x100008278\ntest    eax, eax                                                       ; +0x1d, 0x10000827d\njz      loc_1000083F0                                                  ; +0x1f, 0x10000827f\ncall    EditorSFXManager__sharedState                                  ; +0x25, 0x100008285\nmov     rdi, rax                                                       ; +0x2a, 0x10000828a\nmov     esi, 66h ; 'f'                                                 ; +0x2d, 0x10000828d\ncall    EditorSFXManager__playAction_1                                 ; +0x32, 0x100008292\nmov     edi, 3970h                                                     ; +0x37, 0x100008297\nadd     rdi, [rbx+5A0h]                                                ; +0x3c, 0x10000829c\ncall    EditorBuildStats__noteAction                                   ; +0x43, 0x1000082a3\ncall    sub_1007FE900                                                  ; +0x48, 0x1000082a8\nmov     r14, rax                                                       ; +0x4d, 0x1000082ad\nmov     rdi, [rbx+380h]                                                ; +0x50, 0x1000082b0\ncall    sub_1007FEF90                                                  ; +0x57, 0x1000082b7\ntest    eax, eax                                                       ; +0x5c, 0x1000082bc\njz      short loc_10000830F                                            ; +0x5e, 0x1000082be\nxor     r15d, r15d                                                     ; +0x60, 0x1000082c0\njmp     short loc_1000082E4                                            ; +0x63, 0x1000082c3\nalign 10h                                                              ; +0x65, 0x1000082c5\ninc     r15d                                                           ; +0x70, 0x1000082d0\nmov     rdi, [rbx+380h]                                                ; +0x73, 0x1000082d3\ncall    sub_1007FEF90                                                  ; +0x7a, 0x1000082da\ncmp     r15d, eax                                                      ; +0x7f, 0x1000082df\njnb     short loc_10000830F                                            ; +0x82, 0x1000082e2\nmov     rdi, [rbx+380h]                                                ; +0x84, 0x1000082e4\nmov     esi, r15d                                                      ; +0x8b, 0x1000082eb\ncall    sub_1007FEFE0                                                  ; +0x8e, 0x1000082ee\nmov     r12, rax                                                       ; +0x93, 0x1000082f3\nmov     rsi, rax                                                       ; +0x96, 0x1000082f6\ncall    EditorUI__shouldDeleteObject                                   ; +0x99, 0x1000082f9\ntest    al, al                                                         ; +0x9e, 0x1000082fe\njz      short loc_1000082D0                                            ; +0xa0, 0x100008300\nmov     rdi, r14                                                       ; +0xa2, 0x100008302\nmov     rsi, r12                                                       ; +0xa5, 0x100008305\ncall    sub_1007FEBF0                                                  ; +0xa8, 0x100008308\njmp     short loc_1000082D0                                            ; +0xad, 0x10000830d\nmov     rdi, r14                                                       ; +0xaf, 0x10000830f\ncall    sub_1007FEF90                                                  ; +0xb2, 0x100008312\ntest    eax, eax                                                       ; +0xb7, 0x100008317\njz      loc_10000846F                                                  ; +0xb9, 0x100008319\nxor     r13d, r13d                                                     ; +0xbf, 0x10000831f\nxor     r15d, r15d                                                     ; +0xc2, 0x100008322\nnop     word ptr [rax+rax+00000000h]                                   ; +0xc5, 0x100008325\nmov     rdi, r14                                                       ; +0xd0, 0x100008330\nmov     esi, r15d                                                      ; +0xd3, 0x100008333\ncall    sub_1007FEFE0                                                  ; +0xd6, 0x100008336\nmov     r12, rax                                                       ; +0xdb, 0x10000833b\ncmp     dword ptr [rax+404h], 2EBh                                     ; +0xde, 0x10000833e\nsetz    al                                                             ; +0xe8, 0x100008348\nor      r13b, al                                                       ; +0xeb, 0x10000834b\nmovzx   eax, byte ptr [r12+46Dh]                                       ; +0xee, 0x10000834e\nmov     [r12+46Ch], al                                                 ; +0xf7, 0x100008357\nmov     rdi, rbx                                                       ; +0xff, 0x10000835f\nmov     rsi, r12                                                       ; +0x102, 0x100008362\ncall    EditorUI__deselectObject                                       ; +0x105, 0x100008365\nmov     rdi, [rbx+5A0h]                                                ; +0x10a, 0x10000836a\nmov     rsi, r12                                                       ; +0x111, 0x100008371\nmov     edx, 1                                                         ; +0x114, 0x100008374\ncall    LevelEditorLayer__removeObject                                 ; +0x119, 0x100008379\nmov     rdi, rbx                                                       ; +0x11e, 0x10000837e\ncall    EditorUI__deactivateRotationControl                            ; +0x121, 0x100008381\nmov     rdi, rbx                                                       ; +0x126, 0x100008386\ncall    EditorUI__deactivateScaleControl                               ; +0x129, 0x100008389\nmov     rdi, rbx                                                       ; +0x12e, 0x10000838e\ncall    sub_100611790                                                  ; +0x131, 0x100008391\ninc     r15d                                                           ; +0x136, 0x100008396\nmov     rdi, r14                                                       ; +0x139, 0x100008399\ncall    sub_1007FEF90                                                  ; +0x13c, 0x10000839c\ncmp     r15d, eax                                                      ; +0x141, 0x1000083a1\njb      short loc_100008330                                            ; +0x144, 0x1000083a4\nmov     rdi, r14                                                       ; +0x146, 0x1000083a6\ncall    sub_1007FEF90                                                  ; +0x149, 0x1000083a9\nmov     rcx, [rbx+5A0h]                                                ; +0x14e, 0x1000083ae\nadd     [rcx+3978h], eax                                               ; +0x155, 0x1000083b5\nmov     rdi, r14                                                       ; +0x15b, 0x1000083bb\nmov     esi, 4                                                         ; +0x15e, 0x1000083be\ncall    UndoObject__createWithArray                                    ; +0x163, 0x1000083c3\nmov     rdi, [rbx+5A0h]                                                ; +0x168, 0x1000083c8\nmov     rsi, rax                                                       ; +0x16f, 0x1000083cf\nxor     edx, edx                                                       ; +0x172, 0x1000083d2\ncall    LevelEditorLayer__addToUndoList                                ; +0x174, 0x1000083d4\ntest    r13b, 1                                                        ; +0x179, 0x1000083d9\njz      loc_1000084A2                                                  ; +0x17d, 0x1000083dd\nmov     rdi, rbx                                                       ; +0x183, 0x1000083e3\ncall    sub_1005B94E0                                                  ; +0x186, 0x1000083e6\njmp     loc_1000084A2                                                  ; +0x18b, 0x1000083eb\nmov     rsi, [rbx+5D8h]                                                ; +0x190, 0x1000083f0\ntest    rsi, rsi                                                       ; +0x197, 0x1000083f7\njz      loc_1000084A2                                                  ; +0x19a, 0x1000083fa\ncall    EditorUI__shouldDeleteObject                                   ; +0x1a0, 0x100008400\ntest    al, al                                                         ; +0x1a5, 0x100008405\njz      loc_1000084A2                                                  ; +0x1a7, 0x100008407\nmov     edi, 3970h                                                     ; +0x1ad, 0x10000840d\nadd     rdi, [rbx+5A0h]                                                ; +0x1b2, 0x100008412\ncall    EditorBuildStats__noteAction                                   ; +0x1b9, 0x100008419\nmov     r14, [rbx+5D8h]                                                ; +0x1be, 0x10000841e\ntest    r14, r14                                                       ; +0x1c5, 0x100008425\njz      short loc_1000084A2                                            ; +0x1c8, 0x100008428\nmovzx   eax, byte ptr [r14+46Dh]                                       ; +0x1ca, 0x10000842a\nmov     [r14+46Ch], al                                                 ; +0x1d2, 0x100008432\nmov     rdi, rbx                                                       ; +0x1d9, 0x100008439\nmov     rsi, r14                                                       ; +0x1dc, 0x10000843c\ncall    EditorUI__deselectObject                                       ; +0x1df, 0x10000843f\nmov     rdi, [rbx+5A0h]                                                ; +0x1e4, 0x100008444\nmov     rsi, r14                                                       ; +0x1eb, 0x10000844b\nxor     edx, edx                                                       ; +0x1ee, 0x10000844e\ncall    LevelEditorLayer__removeObject                                 ; +0x1f0, 0x100008450\nmov     rdi, rbx                                                       ; +0x1f5, 0x100008455\ncall    EditorUI__deactivateRotationControl                            ; +0x1f8, 0x100008458\nmov     rdi, rbx                                                       ; +0x1fd, 0x10000845d\ncall    EditorUI__deactivateScaleControl                               ; +0x200, 0x100008460\nmov     rdi, rbx                                                       ; +0x205, 0x100008465\ncall    sub_100611790                                                  ; +0x208, 0x100008468\njmp     short loc_1000084A2                                            ; +0x20d, 0x10000846d\nmov     rdi, r14                                                       ; +0x20f, 0x10000846f\ncall    sub_1007FEF90                                                  ; +0x212, 0x100008472\nmov     rcx, [rbx+5A0h]                                                ; +0x217, 0x100008477\nadd     [rcx+3978h], eax                                               ; +0x21e, 0x10000847e\nmov     rdi, r14                                                       ; +0x224, 0x100008484\nmov     esi, 4                                                         ; +0x227, 0x100008487\ncall    UndoObject__createWithArray                                    ; +0x22c, 0x10000848c\nmov     rdi, [rbx+5A0h]                                                ; +0x231, 0x100008491\nmov     rsi, rax                                                       ; +0x238, 0x100008498\nxor     edx, edx                                                       ; +0x23b, 0x10000849b\ncall    LevelEditorLayer__addToUndoList                                ; +0x23d, 0x10000849d\ncmp     qword ptr [rbx+5D8h], 0                                        ; +0x242, 0x1000084a2\njnz     short loc_1000084D4                                            ; +0x24a, 0x1000084aa\nmov     rdi, [rbx+380h]                                                ; +0x24c, 0x1000084ac\ncall    sub_1007FEF90                                                  ; +0x253, 0x1000084b3\ntest    eax, eax                                                       ; +0x258, 0x1000084b8\njnz     short loc_1000084D4                                            ; +0x25a, 0x1000084ba\nmov     rdi, rbx                                                       ; +0x25c, 0x1000084bc\ncall    EditorUI__deactivateRotationControl                            ; +0x25f, 0x1000084bf\nmov     rdi, rbx                                                       ; +0x264, 0x1000084c4\ncall    EditorUI__deactivateScaleControl                               ; +0x267, 0x1000084c7\nmov     rdi, rbx                                                       ; +0x26c, 0x1000084cc\ncall    sub_100611790                                                  ; +0x26f, 0x1000084cf\nmov     rdi, rbx                                                       ; +0x274, 0x1000084d4\ncall    EditorUI__updateObjectInfoLabel                                ; +0x277, 0x1000084d7\nmov     rax, [rbx]                                                     ; +0x27c, 0x1000084dc\nmov     rdi, rbx                                                       ; +0x27f, 0x1000084df\ncall    qword ptr [rax+548h]                                           ; +0x282, 0x1000084e2\nmov     rdi, rbx                                                       ; +0x288, 0x1000084e8\nadd     rsp, 8                                                         ; +0x28b, 0x1000084eb\npop     rbx                                                            ; +0x28f, 0x1000084ef\npop     r12                                                            ; +0x290, 0x1000084f0\npop     r13                                                            ; +0x292, 0x1000084f2\npop     r14                                                            ; +0x294, 0x1000084f4\npop     r15                                                            ; +0x296, 0x1000084f6\npop     rbp                                                            ; +0x298, 0x1000084f8\njmp     EditorUI__updateButtons                                        ; +0x299, 0x1000084f9", "xrefs": ["EditorUI::handleEditorAction @ 0x10060c711", "EditorUI::init @ 0x100006075", "EditorUI::setupDeleteMenu @ 0x10063b3e4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}