{"type": "func", "start": 8318864, "end": 8319184, "name": "EditLevelLayer::onEdit", "pseudocode": "// \n// EditLevelLayer::onEdit from 0x7eef90 to 0x7ef0d0 (320 bytes)\n// \n// 4 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x7f1cd4\n// > <???> @ 0xe24e0\n// > EditLevelLayer::init @ 0x7f0a9c\n// > <???> @ 0x1546cd8\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:34 +0000\n// \n\n__int64 __fastcall EditLevelLayer::onEdit(cocos2d::CCArray **this, cocos2d::CCObject *a2)\n{\n  GameManager *v4; // x0\n  FMODAudioEngine *v5; // x0\n  __int64 v6; // x23\n  cocos2d::CCDirector *v7; // x0\n  cocos2d::CCDirector *v8; // x21\n  AppDelegate *v9; // x0\n  cocos2d::CCScene *v10; // x1\n  cocos2d::CCScene *v11; // x0\n  cocos2d::CCDirector *v12[3]; // [xsp+50h] [xbp+50h] BYREF\n\n  if ( !*(_BYTE *)(cocos2d::CCDirector::sharedDirector(_stack_chk_guard) + 176) && !*((_BYTE *)this + 496) )\n  {\n    EditLevelLayer::closeTextInputs(this);\n    v4 = (GameManager *)(*((__int64 (__fastcall **)(cocos2d::CCArray **, _QWORD))*this + 134))(this, 0);\n    *((_BYTE *)this + 496) = 1;\n    *(_DWORD *)(GameManager::sharedState(v4) + 708) = 3;\n    v5 = (FMODAudioEngine *)EditLevelLayer::verifyLevelName((EditLevelLayer *)this);\n    v6 = FMODAudioEngine::sharedEngine(v5);\n    GJGameLevel::getAudioFileName((__int64 *)v12, *(this + 59));\n    FMODAudioEngine::loadMusic(v6, (char *)v12, 1u, 0, 0, 0, 1.0, 0.0, 1.0);\n    v7 = (cocos2d::CCDirector *)LOBYTE(v12[0]);\n    if ( ((__int64)v12[0] & 1) != 0 )\n      operator delete(v12[2]);\n    v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);\n    v9 = LevelEditorLayer::scene(*(this + 59), nullptr);\n    v11 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create(v9, 0.5, v10);\n    cocos2d::CCDirector::replaceScene(v8, v11);\n  }\n  return _stack_chk_guard;\n}", "assembly": "; \n; EditLevelLayer::onEdit from 0x7eef90 to 0x7ef0d0 (320 bytes)\n; \n; 4 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x7f1cd4\n; > <???> @ 0xe24e0\n; > EditLevelLayer::init @ 0x7f0a9c\n; > <???> @ 0x1546cd8\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:34 +0000\n; \nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0x7eef90\nMOV             X29, SP                                                ; +0x4, 0x7eef94\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x8, 0x7eef98\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x7eef9c\nMOV             X20, X0                                                ; +0x10, 0x7eefa0\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x14, 0x7eefa4\nSTR             X23, [SP,#0x70+var_40]                                 ; +0x18, 0x7eefa8\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x7eefac\nLDR             X0, [X0]; this                                         ; +0x20, 0x7eefb0\nSTR             X0, [X29,#0x70+var_8]                                  ; +0x24, 0x7eefb4\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x28, 0x7eefb8\nLDRB            W0, [X0,#0xB0]                                         ; +0x2c, 0x7eefbc\nCBNZ            W0, loc_7EEFCC                                         ; +0x30, 0x7eefc0\nLDRB            W0, [X20,#0x1F0]                                       ; +0x34, 0x7eefc4\nCBZ             W0, loc_7EEFF4                                         ; +0x38, 0x7eefc8\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x3c, 0x7eefcc\nLDR             X1, [X29,#0x70+var_8]                                  ; +0x40, 0x7eefd0\nLDR             X0, [X19]                                              ; +0x44, 0x7eefd4\nCMP             X1, X0                                                 ; +0x48, 0x7eefd8\nB.NE            loc_7EF0B0                                             ; +0x4c, 0x7eefdc\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0x50, 0x7eefe0\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0x54, 0x7eefe4\nLDR             X23, [SP,#0x70+var_40]                                 ; +0x58, 0x7eefe8\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x5c, 0x7eefec\nRET                                                                    ; +0x60, 0x7eeff0\nMOV             X0, X20; this                                          ; +0x64, 0x7eeff4\nMOV             W22, #1                                                ; +0x68, 0x7eeff8\nADD             X21, X29, #0x70+var_20                                 ; +0x6c, 0x7eeffc\nBL              _ZN14EditLevelLayer15closeTextInputsEv; EditLevelLayer::closeTextInputs(void) ; +0x70, 0x7ef000\nLDR             X2, [X20]                                              ; +0x74, 0x7ef004\nMOV             W1, #0                                                 ; +0x78, 0x7ef008\nMOV             X0, X20                                                ; +0x7c, 0x7ef00c\nLDR             X2, [X2,#0x430]                                        ; +0x80, 0x7ef010\nBLR             X2                                                     ; +0x84, 0x7ef014\nSTRB            W22, [X20,#0x1F0]                                      ; +0x88, 0x7ef018\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x8c, 0x7ef01c\nMOV             W1, #3                                                 ; +0x90, 0x7ef020\nSTR             W1, [X0,#0x2C4]                                        ; +0x94, 0x7ef024\nMOV             X0, X20; this                                          ; +0x98, 0x7ef028\nBL              _ZN14EditLevelLayer15verifyLevelNameEv; EditLevelLayer::verifyLevelName(void) ; +0x9c, 0x7ef02c\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0xa0, 0x7ef030\nMOV             X23, X0                                                ; +0xa4, 0x7ef034\nLDR             X0, [X20,#0x1D8]; this                                 ; +0xa8, 0x7ef038\nMOV             X8, X21                                                ; +0xac, 0x7ef03c\nSTR             X21, [X29,#0x70+var_28]                                ; +0xb0, 0x7ef040\nBL              _ZN11GJGameLevel16getAudioFileNameEv; GJGameLevel::getAudioFileName(void) ; +0xb4, 0x7ef044\nFMOV            S0, #1.0                                               ; +0xb8, 0x7ef048\nLDR             X1, [X29,#0x70+var_28]                                 ; +0xbc, 0x7ef04c\nFMOV            S1, WZR                                                ; +0xc0, 0x7ef050\nMOV             X0, X23; int                                           ; +0xc4, 0x7ef054\nFMOV            S2, S0                                                 ; +0xc8, 0x7ef058\nMOV             W2, W22                                                ; +0xcc, 0x7ef05c\nMOV             W3, #0                                                 ; +0xd0, 0x7ef060\nMOV             W4, #0                                                 ; +0xd4, 0x7ef064\nMOV             W5, #0                                                 ; +0xd8, 0x7ef068\nBL              _ZN15FMODAudioEngine9loadMusicENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEfffbiib; FMODAudioEngine::loadMusic(std::string,float,float,float,bool,int,int,bool) ; +0xdc, 0x7ef06c\nLDRB            W0, [X29,#0x70+var_20]; this                           ; +0xe0, 0x7ef070\nTBNZ            W0, #0, loc_7EF0A4                                     ; +0xe4, 0x7ef074\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0xe8, 0x7ef078\nMOV             X21, X0                                                ; +0xec, 0x7ef07c\nLDR             X0, [X20,#0x1D8]; this                                 ; +0xf0, 0x7ef080\nMOV             W1, #0; GJGameLevel *                                  ; +0xf4, 0x7ef084\nBL              _ZN16LevelEditorLayer5sceneEP11GJGameLevelb; LevelEditorLayer::scene(GJGameLevel *,bool) ; +0xf8, 0x7ef088\nFMOV            S0, #0.5; float                                        ; +0xfc, 0x7ef08c\nBL              _ZN7cocos2d16CCTransitionFade6createEfPNS_7CCSceneE; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x100, 0x7ef090\nMOV             X1, X0; lpsrc                                          ; +0x104, 0x7ef094\nMOV             X0, X21; this                                          ; +0x108, 0x7ef098\nBL              _ZN7cocos2d10CCDirector12replaceSceneEPNS_7CCSceneE; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0x10c, 0x7ef09c\nB               loc_7EEFCC                                             ; +0x110, 0x7ef0a0\nLDR             X0, [X29,#0x70+var_10]; void *                         ; +0x114, 0x7ef0a4\nBL              _ZdlPv; operator delete(void *)                        ; +0x118, 0x7ef0a8\nB               loc_7EF078                                             ; +0x11c, 0x7ef0ac\nBL              .__stack_chk_fail                                      ; +0x120, 0x7ef0b0\nLDRB            W1, [X29,#0x70+var_20]                                 ; +0x124, 0x7ef0b4\nMOV             X19, X0                                                ; +0x128, 0x7ef0b8\nTBZ             W1, #0, loc_7EF0C8                                     ; +0x12c, 0x7ef0bc\nLDR             X0, [X29,#0x70+var_10]; void *                         ; +0x130, 0x7ef0c0\nBL              _ZdlPv; operator delete(void *)                        ; +0x134, 0x7ef0c4\nMOV             X0, X19                                                ; +0x138, 0x7ef0c8\nBL              _Unwind_Resume                                         ; +0x13c, 0x7ef0cc", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x7f1cd4", "<???> @ 0xe24e0", "EditLevelLayer::init @ 0x7f0a9c", "<???> @ 0x1546cd8"], "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"}