{"type": "func", "start": 5370482480, "end": 5370482630, "name": "EditorUI::onDeleteStartPos", "pseudocode": "// \n// EditorUI::onDeleteStartPos from 0x1401b0f30 to 0x1401b0fc6 (150 bytes)\n// \n// 2 xrefs:\n// > EditorUI::setupDeleteMenu @ 0x1401f459b\n// > <???> @ 0x140919f10\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 11:27:55 +0000\n// \n\n__int64 __fastcall EditorUI::onDeleteStartPos(__int64 a1)\n{\n  __int64 v2; // rcx\n  int v3; // ebx\n  __int64 v4; // rdx\n  int v5; // ecx\n  __int64 result; // rax\n  int v7; // eax\n  int v8; // ecx\n\n  EditorUI::deselectAll();\n  v2 = *(_QWORD *)(a1 + 1512);\n  v3 = *(_DWORD *)(v2 + 14928) - *(_DWORD *)(v2 + 14932);\n  LevelEditorLayer::removeAllObjectsOfType(v2, 31);\n  *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 15416LL) += v3\n                                                 + *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 14932LL)\n                                                 - *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 14928LL);\n  v4 = *(_QWORD *)(a1 + 1512) + 15408LL;\n  v5 = *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 15504LL);\n  result = *(unsigned int *)(*(_QWORD *)(a1 + 1512) + 15440LL);\n  if ( v5 >= 0 )\n  {\n    v7 = result - v5;\n    v8 = 0;\n    if ( v7 > 1 )\n    {\n      do\n      {\n        if ( v8 >= 7 )\n          break;\n        v7 = (unsigned int)v7 >> 1;\n        ++v8;\n      }\n      while ( (unsigned int)v7 > 1 );\n    }\n    ++*(_DWORD *)(v4 + 4LL * v8 + 64);\n    result = *(unsigned int *)(v4 + 32);\n  }\n  *(_DWORD *)(v4 + 96) = result;\n  return result;\n}", "assembly": "; \n; EditorUI::onDeleteStartPos from 0x1401b0f30 to 0x1401b0fc6 (150 bytes)\n; \n; 2 xrefs:\n; > EditorUI::setupDeleteMenu @ 0x1401f459b\n; > <???> @ 0x140919f10\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 11:27:55 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1401b0f30\npush    rdi                                                            ; +0x5, 0x1401b0f35\nsub     rsp, 20h                                                       ; +0x6, 0x1401b0f36\nmov     rdi, rcx                                                       ; +0xa, 0x1401b0f3a\ncall    EditorUI__deselectAll                                          ; +0xd, 0x1401b0f3d\nmov     rcx, [rdi+5E8h]                                                ; +0x12, 0x1401b0f42\nmov     edx, 1Fh                                                       ; +0x19, 0x1401b0f49\nmov     ebx, [rcx+3A50h]                                               ; +0x1e, 0x1401b0f4e\nsub     ebx, [rcx+3A54h]                                               ; +0x24, 0x1401b0f54\ncall    LevelEditorLayer__removeAllObjectsOfType                       ; +0x2a, 0x1401b0f5a\nmov     rdx, [rdi+5E8h]                                                ; +0x2f, 0x1401b0f5f\nmov     eax, [rdx+3A54h]                                               ; +0x36, 0x1401b0f66\nsub     eax, [rdx+3A50h]                                               ; +0x3c, 0x1401b0f6c\nadd     eax, ebx                                                       ; +0x42, 0x1401b0f72\nadd     [rdx+3C38h], eax                                               ; +0x44, 0x1401b0f74\nmov     rdx, [rdi+5E8h]                                                ; +0x4a, 0x1401b0f7a\nadd     rdx, 3C30h                                                     ; +0x51, 0x1401b0f81\nmov     ecx, [rdx+60h]                                                 ; +0x58, 0x1401b0f88\nmov     eax, [rdx+20h]                                                 ; +0x5b, 0x1401b0f8b\ntest    ecx, ecx                                                       ; +0x5e, 0x1401b0f8e\njs      short loc_1401B0FB8                                            ; +0x60, 0x1401b0f90\nsub     eax, ecx                                                       ; +0x62, 0x1401b0f92\nxor     ecx, ecx                                                       ; +0x64, 0x1401b0f94\ncmp     eax, 1                                                         ; +0x66, 0x1401b0f96\njle     short loc_1401B0FAE                                            ; +0x69, 0x1401b0f99\nnop     dword ptr [rax+rax+00h]                                        ; +0x6b, 0x1401b0f9b\ncmp     ecx, 7                                                         ; +0x70, 0x1401b0fa0\njge     short loc_1401B0FAE                                            ; +0x73, 0x1401b0fa3\nshr     eax, 1                                                         ; +0x75, 0x1401b0fa5\ninc     ecx                                                            ; +0x77, 0x1401b0fa7\ncmp     eax, 1                                                         ; +0x79, 0x1401b0fa9\nja      short loc_1401B0FA0                                            ; +0x7c, 0x1401b0fac\nmovsxd  rax, ecx                                                       ; +0x7e, 0x1401b0fae\ninc     dword ptr [rdx+rax*4+40h]                                      ; +0x81, 0x1401b0fb1\nmov     eax, [rdx+20h]                                                 ; +0x85, 0x1401b0fb5\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x88, 0x1401b0fb8\nmov     [rdx+60h], eax                                                 ; +0x8d, 0x1401b0fbd\nadd     rsp, 20h                                                       ; +0x90, 0x1401b0fc0\npop     rdi                                                            ; +0x94, 0x1401b0fc4\nretn                                                                   ; +0x95, 0x1401b0fc5", "xrefs": ["EditorUI::setupDeleteMenu @ 0x1401f459b", "<???> @ 0x140919f10"], "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"}