{"type": "func", "start": 4295926336, "end": 4295926564, "name": "EditLevelLayer::onEdit", "pseudocode": "// \n// EditLevelLayer::onEdit from 0x1000ea240 to 0x1000ea324 (228 bytes)\n// \n// 2 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x1000ec1b8\n// > EditLevelLayer::init @ 0x1000e9770\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall EditLevelLayer::onEdit(EditLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  FMODAudioEngine *v3; // x20\n  cocos2d::CCDirector *v4; // x20\n  cocos2d::CCScene *v5; // x0\n  cocos2d::CCTransitionFade *v6; // x0\n  void *__p[2]; // [xsp+8h] [xbp-28h] BYREF\n  char v8; // [xsp+1Fh] [xbp-11h]\n\n  if ( !cocos2d::CCDirector::sharedDirector()->m_bIsTransitioning && !a1->m_exiting )\n  {\n    EditLevelLayer::closeTextInputs(a1);\n    ((void (__fastcall *)(EditLevelLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);\n    a1->m_exiting = 1;\n    GameManager::sharedState()->m_sceneEnum = 3;\n    EditLevelLayer::verifyLevelName(a1);\n    v3 = FMODAudioEngine::sharedEngine();\n    GJGameLevel::getAudioFileName((__int64)a1->m_level, __p);\n    FMODAudioEngine::loadMusic(v3, __p, 1, 0, 0, 0, 1.0, 0.0, 1.0);\n    if ( v8 < 0 )\n      operator delete(__p[0]);\n    v4 = cocos2d::CCDirector::sharedDirector();\n    v5 = LevelEditorLayer::scene(a1->m_level, 0);\n    v6 = cocos2d::CCTransitionFade::create_1(0.5, v5);\n    cocos2d::CCDirector::replaceScene(v4, v6);\n  }\n}", "assembly": "; \n; EditLevelLayer::onEdit from 0x1000ea240 to 0x1000ea324 (228 bytes)\n; \n; 2 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x1000ec1b8\n; > EditLevelLayer::init @ 0x1000e9770\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x40                                          ; +0x0, 0x1000ea240\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x4, 0x1000ea244\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x8, 0x1000ea248\nADD             X29, SP, #0x30                                         ; +0xc, 0x1000ea24c\nMOV             X19, X0                                                ; +0x10, 0x1000ea250\nBL              cocos2d__CCDirector__sharedDirector                    ; +0x14, 0x1000ea254\nLDRB            W8, [X0,#0xA8]                                         ; +0x18, 0x1000ea258\nTBNZ            W8, #0, loc_1000EA314                                  ; +0x1c, 0x1000ea25c\nLDRB            W8, [X19,#0x1E0]                                       ; +0x20, 0x1000ea260\nTBNZ            W8, #0, loc_1000EA314                                  ; +0x24, 0x1000ea264\nMOV             X0, X19                                                ; +0x28, 0x1000ea268\nBL              EditLevelLayer__closeTextInputs                        ; +0x2c, 0x1000ea26c\nLDR             X8, [X19]                                              ; +0x30, 0x1000ea270\nLDR             X8, [X8,#0x420]                                        ; +0x34, 0x1000ea274\nMOV             X0, X19                                                ; +0x38, 0x1000ea278\nMOV             W1, #0                                                 ; +0x3c, 0x1000ea27c\nBLR             X8                                                     ; +0x40, 0x1000ea280\nMOV             W8, #1                                                 ; +0x44, 0x1000ea284\nSTRB            W8, [X19,#0x1E0]                                       ; +0x48, 0x1000ea288\nBL              GameManager__sharedState                               ; +0x4c, 0x1000ea28c\nMOV             W8, #3                                                 ; +0x50, 0x1000ea290\nSTR             W8, [X0,#0x29C]                                        ; +0x54, 0x1000ea294\nMOV             X0, X19                                                ; +0x58, 0x1000ea298\nBL              EditLevelLayer__verifyLevelName                        ; +0x5c, 0x1000ea29c\nBL              FMODAudioEngine__sharedEngine                          ; +0x60, 0x1000ea2a0\nMOV             X20, X0                                                ; +0x64, 0x1000ea2a4\nLDR             X0, [X19,#0x1C8]                                       ; +0x68, 0x1000ea2a8\nADD             X8, SP, #0x30+__p                                      ; +0x6c, 0x1000ea2ac\nBL              GJGameLevel__getAudioFileName                          ; +0x70, 0x1000ea2b0\nADD             X1, SP, #0x30+__p                                      ; +0x74, 0x1000ea2b4\nFMOV            S0, #1.0                                               ; +0x78, 0x1000ea2b8\nFMOV            S1, WZR                                                ; +0x7c, 0x1000ea2bc\nFMOV            S2, #1.0                                               ; +0x80, 0x1000ea2c0\nMOV             X0, X20                                                ; +0x84, 0x1000ea2c4\nMOV             W2, #1                                                 ; +0x88, 0x1000ea2c8\nMOV             W3, #0                                                 ; +0x8c, 0x1000ea2cc\nMOV             W4, #0                                                 ; +0x90, 0x1000ea2d0\nMOV             W5, #0                                                 ; +0x94, 0x1000ea2d4\nBL              FMODAudioEngine__loadMusic                             ; +0x98, 0x1000ea2d8\nLDRSB           W8, [SP,#0x30+var_11]                                  ; +0x9c, 0x1000ea2dc\nTBZ             W8, #0x1F, loc_1000EA2EC                               ; +0xa0, 0x1000ea2e0\nLDR             X0, [SP,#0x30+__p]; __p                                ; +0xa4, 0x1000ea2e4\nBL              __ZdlPv; operator delete(void *)                       ; +0xa8, 0x1000ea2e8\nBL              cocos2d__CCDirector__sharedDirector                    ; +0xac, 0x1000ea2ec\nMOV             X20, X0                                                ; +0xb0, 0x1000ea2f0\nLDR             X0, [X19,#0x1C8]                                       ; +0xb4, 0x1000ea2f4\nMOV             W1, #0                                                 ; +0xb8, 0x1000ea2f8\nBL              LevelEditorLayer__scene                                ; +0xbc, 0x1000ea2fc\nFMOV            S0, #0.5                                               ; +0xc0, 0x1000ea300\nBL              cocos2d__CCTransitionFade__create_1                    ; +0xc4, 0x1000ea304\nMOV             X1, X0; lpsrc                                          ; +0xc8, 0x1000ea308\nMOV             X0, X20; int                                           ; +0xcc, 0x1000ea30c\nBL              cocos2d__CCDirector__replaceScene                      ; +0xd0, 0x1000ea310\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xd4, 0x1000ea314\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xd8, 0x1000ea318\nADD             SP, SP, #0x40 ; '@'                                    ; +0xdc, 0x1000ea31c\nRET                                                                    ; +0xe0, 0x1000ea320", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x1000ec1b8", "EditLevelLayer::init @ 0x1000e9770"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}