{"type": "func", "start": 4295011152, "end": 4295011288, "name": "EditorUI::onGoToFreeLayer", "pseudocode": "// \n// EditorUI::onGoToFreeLayer from 0x10000ab50 to 0x10000abd8 (136 bytes)\n// \n// 2 xrefs:\n// > EditorUI::handleEditorAction @ 0x10060cc99\n// > EditorUI::init @ 0x100007490\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:49 +0000\n// \n\n__int64 __fastcall EditorUI::onGoToFreeLayer(__int64 a1)\n{\n  __int64 v2; // rdi\n  __int16 NextFreeEditorLayer; // r14\n  _QWORD *v4; // rdi\n  _QWORD *v5; // r15\n  void *v6; // rdi\n  void *v8[2]; // [rsp+0h] [rbp-40h] BYREF\n  void *__p[2]; // [rsp+10h] [rbp-30h]\n  int v10; // [rsp+20h] [rbp-20h]\n\n  v2 = *(_QWORD *)(a1 + 1440);\n  *(_OWORD *)__p = 0;\n  *(_OWORD *)v8 = 0;\n  v10 = 1065353216;\n  NextFreeEditorLayer = LevelEditorLayer::getNextFreeEditorLayer(v2, v8);\n  v4 = __p[0];\n  if ( __p[0] )\n  {\n    do\n    {\n      v5 = (_QWORD *)*v4;\n      operator delete(v4);\n      v4 = v5;\n    }\n    while ( v5 );\n  }\n  v6 = v8[0];\n  v8[0] = nullptr;\n  if ( v6 )\n    operator delete(v6);\n  *(_WORD *)(*(_QWORD *)(a1 + 1440) + 14210LL) = NextFreeEditorLayer;\n  return EditorUI::updateGroupIDLabel(a1);\n}", "assembly": "; \n; EditorUI::onGoToFreeLayer from 0x10000ab50 to 0x10000abd8 (136 bytes)\n; \n; 2 xrefs:\n; > EditorUI::handleEditorAction @ 0x10060cc99\n; > EditorUI::init @ 0x100007490\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:49 +0000\n; \npush    rbp                                                            ; +0x0, 0x10000ab50\nmov     rbp, rsp                                                       ; +0x1, 0x10000ab51\npush    r15                                                            ; +0x4, 0x10000ab54\npush    r14                                                            ; +0x6, 0x10000ab56\npush    rbx                                                            ; +0x8, 0x10000ab58\nsub     rsp, 28h                                                       ; +0x9, 0x10000ab59\nmov     rbx, rdi                                                       ; +0xd, 0x10000ab5d\nmov     rdi, [rdi+5A0h]                                                ; +0x10, 0x10000ab60\nxorps   xmm0, xmm0                                                     ; +0x17, 0x10000ab67\nmovaps  xmmword ptr [rbp+__p], xmm0                                    ; +0x1a, 0x10000ab6a\nmovaps  xmmword ptr [rbp+var_40], xmm0                                 ; +0x1e, 0x10000ab6e\nmov     [rbp+var_20], 3F800000h                                        ; +0x22, 0x10000ab72\nlea     rsi, [rbp+var_40]                                              ; +0x29, 0x10000ab79\ncall    LevelEditorLayer__getNextFreeEditorLayer                       ; +0x2d, 0x10000ab7d\nmov     r14d, eax                                                      ; +0x32, 0x10000ab82\nmov     rdi, [rbp+__p]; __p                                            ; +0x35, 0x10000ab85\ntest    rdi, rdi                                                       ; +0x39, 0x10000ab89\njz      short loc_10000ABA0                                            ; +0x3c, 0x10000ab8c\nxchg    ax, ax                                                         ; +0x3e, 0x10000ab8e\nmov     r15, [rdi]                                                     ; +0x40, 0x10000ab90\ncall    __ZdlPv; operator delete(void *)                               ; +0x43, 0x10000ab93\nmov     rdi, r15                                                       ; +0x48, 0x10000ab98\ntest    r15, r15                                                       ; +0x4b, 0x10000ab9b\njnz     short loc_10000AB90                                            ; +0x4e, 0x10000ab9e\nmov     rdi, [rbp+var_40]; __p                                         ; +0x50, 0x10000aba0\nmov     [rbp+var_40], 0                                                ; +0x54, 0x10000aba4\ntest    rdi, rdi                                                       ; +0x5c, 0x10000abac\njz      short loc_10000ABB6                                            ; +0x5f, 0x10000abaf\ncall    __ZdlPv; operator delete(void *)                               ; +0x61, 0x10000abb1\nmov     rax, [rbx+5A0h]                                                ; +0x66, 0x10000abb6\nmov     [rax+3782h], r14w                                              ; +0x6d, 0x10000abbd\nmov     rdi, rbx                                                       ; +0x75, 0x10000abc5\ncall    EditorUI__updateGroupIDLabel                                   ; +0x78, 0x10000abc8\nadd     rsp, 28h                                                       ; +0x7d, 0x10000abcd\npop     rbx                                                            ; +0x81, 0x10000abd1\npop     r14                                                            ; +0x82, 0x10000abd2\npop     r15                                                            ; +0x84, 0x10000abd4\npop     rbp                                                            ; +0x86, 0x10000abd6\nretn                                                                   ; +0x87, 0x10000abd7", "xrefs": ["EditorUI::handleEditorAction @ 0x10060cc99", "EditorUI::init @ 0x100007490"], "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"}