{"type": "func", "start": 8152076, "end": 8152308, "name": "EditorUI::onGoToFreeLayer", "pseudocode": "// \n// EditorUI::onGoToFreeLayer from 0x7c640c to 0x7c64f4 (232 bytes)\n// \n// 4 xrefs:\n// > EditorUI::handleEditorAction @ 0xbd77c4\n// > <???> @ 0x7df98\n// > EditorUI::init @ 0x7d0be0\n// > <???> @ 0x1543408\n// \n// This function is hookable on this platform (idp: arm, 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:54:08 +0000\n// \n\n__int64 __fastcall EditorUI::onGoToFreeLayer(EditorUI *this, cocos2d::CCObject *a2)\n{\n  LevelEditorLayer *v3; // x0\n  __int16 NextFreeEditorLayer; // w22\n  _QWORD *v5; // x0\n  _QWORD *v6; // x19\n  void *v7; // x0\n  void *v9[2]; // [xsp+30h] [xbp+30h] BYREF\n  void *v10; // [xsp+40h] [xbp+40h]\n  __int64 v11; // [xsp+48h] [xbp+48h]\n  float v12; // [xsp+50h] [xbp+50h]\n\n  v9[0] = nullptr;\n  v3 = *((LevelEditorLayer **)this + 180);\n  v9[1] = nullptr;\n  v10 = nullptr;\n  v11 = 0;\n  v12 = 1.0;\n  NextFreeEditorLayer = LevelEditorLayer::getNextFreeEditorLayer(v3, (__int64)v9);\n  v5 = v10;\n  if ( v10 )\n  {\n    do\n    {\n      v6 = (_QWORD *)*v5;\n      operator delete(v5);\n      v5 = v6;\n    }\n    while ( v6 );\n  }\n  v7 = v9[0];\n  v9[0] = nullptr;\n  if ( v7 )\n    operator delete(v7);\n  *(_WORD *)(*((_QWORD *)this + 180) + 14210LL) = NextFreeEditorLayer;\n  EditorUI::updateGroupIDLabel(this);\n  return _stack_chk_guard;\n}", "assembly": "; \n; EditorUI::onGoToFreeLayer from 0x7c640c to 0x7c64f4 (232 bytes)\n; \n; 4 xrefs:\n; > EditorUI::handleEditorAction @ 0xbd77c4\n; > <???> @ 0x7df98\n; > EditorUI::init @ 0x7d0be0\n; > <???> @ 0x1543408\n; \n; This function is hookable on this platform (idp: arm, 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:54:08 +0000\n; \nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0x7c640c\nFMOV            S0, #1.0                                               ; +0x4, 0x7c6410\nMOV             X29, SP                                                ; +0x8, 0x7c6414\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0xc, 0x7c6418\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x7c641c\nADD             X1, X29, #0x60+var_30                                  ; +0x14, 0x7c6420\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0x18, 0x7c6424\nMOV             X21, X0                                                ; +0x1c, 0x7c6428\nSTR             XZR, [X29,#0x60+var_30]                                ; +0x20, 0x7c642c\nLDR             X2, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x7c6430\nLDR             X0, [X0,#0x5A0]                                        ; +0x28, 0x7c6434\nSTR             XZR, [X29,#0x60+var_28]                                ; +0x2c, 0x7c6438\nLDR             X2, [X2]                                               ; +0x30, 0x7c643c\nSTR             X2, [X29,#0x60+var_8]                                  ; +0x34, 0x7c6440\nSTR             XZR, [X29,#0x60+var_20]                                ; +0x38, 0x7c6444\nSTR             XZR, [X29,#0x60+var_18]                                ; +0x3c, 0x7c6448\nSTR             S0, [X29,#0x60+var_10]                                 ; +0x40, 0x7c644c\nBL              _ZN16LevelEditorLayer22getNextFreeEditorLayerERKNSt6__ndk113unordered_setIiNS0_4hashIiEENS0_8equal_toIiEENS0_9allocatorIiEEEE; LevelEditorLayer::getNextFreeEditorLayer(std::unordered_set<int> const&) ; +0x44, 0x7c6450\nMOV             W22, W0                                                ; +0x48, 0x7c6454\nLDR             X0, [X29,#0x60+var_20]; void *                         ; +0x4c, 0x7c6458\nCBZ             X0, loc_7C6470                                         ; +0x50, 0x7c645c\nLDR             X19, [X0]                                              ; +0x54, 0x7c6460\nBL              _ZdlPv; operator delete(void *)                        ; +0x58, 0x7c6464\nMOV             X0, X19                                                ; +0x5c, 0x7c6468\nCBNZ            X19, loc_7C6460                                        ; +0x60, 0x7c646c\nLDR             X0, [X29,#0x60+var_30]; void *                         ; +0x64, 0x7c6470\nSTR             XZR, [X29,#0x60+var_30]                                ; +0x68, 0x7c6474\nCBZ             X0, loc_7C6480                                         ; +0x6c, 0x7c6478\nBL              _ZdlPv; operator delete(void *)                        ; +0x70, 0x7c647c\nLDR             X1, [X21,#0x5A0]                                       ; +0x74, 0x7c6480\nMOV             X0, X21; this                                          ; +0x78, 0x7c6484\nADD             X1, X1, #3,LSL#12                                      ; +0x7c, 0x7c6488\nSTRH            W22, [X1,#0x782]                                       ; +0x80, 0x7c648c\nBL              _ZN8EditorUI18updateGroupIDLabelEv; EditorUI::updateGroupIDLabel(void) ; +0x84, 0x7c6490\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x88, 0x7c6494\nLDR             X1, [X29,#0x60+var_8]                                  ; +0x8c, 0x7c6498\nLDR             X0, [X20]                                              ; +0x90, 0x7c649c\nCMP             X1, X0                                                 ; +0x94, 0x7c64a0\nB.NE            loc_7C64F0                                             ; +0x98, 0x7c64a4\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0x9c, 0x7c64a8\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0xa0, 0x7c64ac\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0xa4, 0x7c64b0\nRET                                                                    ; +0xa8, 0x7c64b4\nLDR             X1, [X29,#0x60+var_20]                                 ; +0xac, 0x7c64b8\nMOV             X19, X0                                                ; +0xb0, 0x7c64bc\nCBZ             X1, loc_7C64D8                                         ; +0xb4, 0x7c64c0\nLDR             X20, [X1]                                              ; +0xb8, 0x7c64c4\nMOV             X0, X1; void *                                         ; +0xbc, 0x7c64c8\nBL              _ZdlPv; operator delete(void *)                        ; +0xc0, 0x7c64cc\nMOV             X1, X20                                                ; +0xc4, 0x7c64d0\nCBNZ            X20, loc_7C64C4                                        ; +0xc8, 0x7c64d4\nLDR             X0, [X29,#0x60+var_30]; void *                         ; +0xcc, 0x7c64d8\nSTR             XZR, [X29,#0x60+var_30]                                ; +0xd0, 0x7c64dc\nCBZ             X0, loc_7C64E8                                         ; +0xd4, 0x7c64e0\nBL              _ZdlPv; operator delete(void *)                        ; +0xd8, 0x7c64e4\nMOV             X0, X19                                                ; +0xdc, 0x7c64e8\nBL              _Unwind_Resume                                         ; +0xe0, 0x7c64ec\nBL              .__stack_chk_fail                                      ; +0xe4, 0x7c64f0", "xrefs": ["EditorUI::handleEditorAction @ 0xbd77c4", "<???> @ 0x7df98", "EditorUI::init @ 0x7d0be0", "<???> @ 0x1543408"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}