{"type": "func", "start": 5373045264, "end": 5373045708, "name": "LevelInfoLayer::onEdit", "pseudocode": "// \n// LevelInfoLayer::onEdit from 0x140422a10 to 0x140422bcc (444 bytes)\n// \n// 3 xrefs:\n// > LevelInfoLayer::onPlay @ 0x1404214e7\n// > LevelInfoLayer::init @ 0x14041cabd\n// > <???> @ 0x1409268a0\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:32:09 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nvoid __fastcall LevelInfoLayer::onEdit(__int64 a1)\n{\n  __int64 v2; // rax\n  _QWORD *AudioFileName; // rdi\n  __int64 v4; // rcx\n  __int64 v5; // rbx\n  __int64 v6; // rdx\n  __int64 v7; // rcx\n  __int64 v8; // r8\n  __int64 v9; // r9\n  struct cocos2d::CCScene *v10; // rdi\n  __int64 v11; // rcx\n  cocos2d::CCObject *v12; // rax\n  struct cocos2d::CCScene *v13; // rbx\n  __int64 v14; // rcx\n  cocos2d::CCDirector *v15; // rax\n  _QWORD v16[5]; // [rsp+50h] [rbp-28h] BYREF\n  void *v17; // [rsp+80h] [rbp+8h]\n  void *v18; // [rsp+90h] [rbp+18h]\n\n  if ( !*(_BYTE *)(a1 + 488) && *(_BYTE *)(a1 + 645) && !*(_BYTE *)(cocos2d::CCDirector::sharedDirector(a1) + 176) )\n  {\n    if ( (unsigned __int8)LevelInfoLayer::shouldDownloadLevel(a1) )\n    {\n      LevelInfoLayer::downloadLevel(a1);\n    }\n    else\n    {\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);\n      *(_BYTE *)(a1 + 488) = 1;\n      v2 = qword_14090BFD0;\n      if ( !qword_14090BFD0 )\n      {\n        v17 = operator new(0x6E8u);\n        qword_14090BFD0 = GameManager::GameManager((__int64)v17);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n        v2 = qword_14090BFD0;\n      }\n      *(_DWORD *)(v2 + 740) = 3;\n      AudioFileName = GJGameLevel::getAudioFileName(*(_QWORD *)(a1 + 504), v16);\n      v4 = qword_14090BF60;\n      if ( !qword_14090BF60 )\n      {\n        v18 = operator new(0x8A8u);\n        qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v18);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);\n        v4 = qword_14090BF60;\n      }\n      FMODAudioEngine::loadMusic(v4, (__int64)AudioFileName, 1.0, 0.0, 1065353216, 1, 0, 0, 0);\n      v5 = *(_QWORD *)(a1 + 504);\n      v10 = (struct cocos2d::CCScene *)cocos2d::CCScene::create(v7, v6, v8, v9);\n      *(_QWORD *)(cocos2d::CCApplication::sharedApplication(v11) + 232) = v10;\n      v12 = LevelEditorLayer::create(v5, 0);\n      (*(void (__fastcall **)(struct cocos2d::CCScene *, cocos2d::CCObject *))(*(_QWORD *)v10 + 464LL))(v10, v12);\n      *((_DWORD *)v10 + 7) = 6;\n      v13 = cocos2d::CCTransitionFade::create(0.5, v10);\n      v15 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14);\n      cocos2d::CCDirector::replaceScene(v15, v13);\n    }\n  }\n}", "assembly": "; \n; LevelInfoLayer::onEdit from 0x140422a10 to 0x140422bcc (444 bytes)\n; \n; 3 xrefs:\n; > LevelInfoLayer::onPlay @ 0x1404214e7\n; > LevelInfoLayer::init @ 0x14041cabd\n; > <???> @ 0x1409268a0\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:32:09 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140422a10\npush    rdi                                                            ; +0x5, 0x140422a15\nsub     rsp, 70h                                                       ; +0x6, 0x140422a16\nmov     rbx, rcx                                                       ; +0xa, 0x140422a1a\ncmp     byte ptr [rcx+1E8h], 0                                         ; +0xd, 0x140422a1d\njnz     loc_140422BBE                                                  ; +0x14, 0x140422a24\ncmp     byte ptr [rcx+285h], 0                                         ; +0x1a, 0x140422a2a\njz      loc_140422BBE                                                  ; +0x21, 0x140422a31\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x27, 0x140422a37\ncmp     byte ptr [rax+0B0h], 0                                         ; +0x2d, 0x140422a3d\njnz     loc_140422BBE                                                  ; +0x34, 0x140422a44\nmov     rcx, rbx                                                       ; +0x3a, 0x140422a4a\ncall    LevelInfoLayer__shouldDownloadLevel                            ; +0x3d, 0x140422a4d\nmov     rcx, rbx                                                       ; +0x42, 0x140422a52\ntest    al, al                                                         ; +0x45, 0x140422a55\njz      short loc_140422A6B                                            ; +0x47, 0x140422a57\nmov     rbx, [rsp+78h+arg_8]                                           ; +0x49, 0x140422a59\nadd     rsp, 70h                                                       ; +0x51, 0x140422a61\npop     rdi                                                            ; +0x55, 0x140422a65\njmp     LevelInfoLayer__downloadLevel                                  ; +0x56, 0x140422a66\nmov     rax, [rbx]                                                     ; +0x5b, 0x140422a6b\nxor     edx, edx                                                       ; +0x5e, 0x140422a6e\ncall    qword ptr [rax+3E0h]                                           ; +0x60, 0x140422a70\nmov     byte ptr [rbx+1E8h], 1                                         ; +0x66, 0x140422a76\nmov     rax, cs:qword_14090BFD0                                        ; +0x6d, 0x140422a7d\ntest    rax, rax                                                       ; +0x74, 0x140422a84\njnz     short loc_140422ABE                                            ; +0x77, 0x140422a87\nmov     ecx, 6E8h; Size                                                ; +0x79, 0x140422a89\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x7e, 0x140422a8e\nmov     [rsp+78h+arg_0], rax                                           ; +0x83, 0x140422a93\nmov     rcx, rax                                                       ; +0x8b, 0x140422a9b\ncall    GameManager__GameManager                                       ; +0x8e, 0x140422a9e\nnop                                                                    ; +0x93, 0x140422aa3\nmov     cs:qword_14090BFD0, rax                                        ; +0x94, 0x140422aa4\nmov     rcx, [rax]                                                     ; +0x9b, 0x140422aab\nmov     rdx, [rcx+48h]                                                 ; +0x9e, 0x140422aae\nmov     rcx, rax                                                       ; +0xa2, 0x140422ab2\ncall    rdx                                                            ; +0xa5, 0x140422ab5\nmov     rax, cs:qword_14090BFD0                                        ; +0xa7, 0x140422ab7\nmov     dword ptr [rax+2E4h], 3                                        ; +0xae, 0x140422abe\nlea     rax, [rsp+78h+var_28]                                          ; +0xb8, 0x140422ac8\nmov     [rsp+78h+arg_0], rax                                           ; +0xbd, 0x140422acd\nlea     rdx, [rsp+78h+var_28]                                          ; +0xc5, 0x140422ad5\nmov     rcx, [rbx+1F8h]                                                ; +0xca, 0x140422ada\ncall    GJGameLevel__getAudioFileName                                  ; +0xd1, 0x140422ae1\nmov     rdi, rax                                                       ; +0xd6, 0x140422ae6\nmov     rcx, cs:qword_14090BF60                                        ; +0xd9, 0x140422ae9\ntest    rcx, rcx                                                       ; +0xe0, 0x140422af0\njnz     short loc_140422B2A                                            ; +0xe3, 0x140422af3\nmov     ecx, 8A8h; Size                                                ; +0xe5, 0x140422af5\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xea, 0x140422afa\nmov     [rsp+78h+arg_10], rax                                          ; +0xef, 0x140422aff\nmov     rcx, rax                                                       ; +0xf7, 0x140422b07\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0xfa, 0x140422b0a\nnop                                                                    ; +0xff, 0x140422b0f\nmov     cs:qword_14090BF60, rax                                        ; +0x100, 0x140422b10\nmov     rcx, [rax]                                                     ; +0x107, 0x140422b17\nmov     rdx, [rcx+48h]                                                 ; +0x10a, 0x140422b1a\nmov     rcx, rax                                                       ; +0x10e, 0x140422b1e\ncall    rdx                                                            ; +0x111, 0x140422b21\nmov     rcx, cs:qword_14090BF60                                        ; +0x113, 0x140422b23\nmov     [rsp+78h+var_38], 0                                            ; +0x11a, 0x140422b2a\nxor     eax, eax                                                       ; +0x11f, 0x140422b2f\nmov     [rsp+78h+var_40], eax                                          ; +0x121, 0x140422b31\nmov     [rsp+78h+var_48], eax                                          ; +0x125, 0x140422b35\nmov     [rsp+78h+var_50], 1                                            ; +0x129, 0x140422b39\nmovss   xmm2, cs:flt_140835080                                         ; +0x12e, 0x140422b3e\nmovss   [rsp+78h+var_58], xmm2                                         ; +0x136, 0x140422b46\nxorps   xmm3, xmm3                                                     ; +0x13c, 0x140422b4c\nmov     rdx, rdi                                                       ; +0x13f, 0x140422b4f\ncall    FMODAudioEngine__loadMusic                                     ; +0x142, 0x140422b52\nmov     rbx, [rbx+1F8h]                                                ; +0x147, 0x140422b57\ncall    cs:?create@CCScene@cocos2d@@SAPEAV12@XZ; cocos2d::CCScene::create(void) ; +0x14e, 0x140422b5e\nmov     rdi, rax                                                       ; +0x154, 0x140422b64\ncall    cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x157, 0x140422b67\nmov     [rax+0E8h], rdi                                                ; +0x15d, 0x140422b6d\nxor     edx, edx                                                       ; +0x164, 0x140422b74\nmov     rcx, rbx                                                       ; +0x166, 0x140422b76\ncall    LevelEditorLayer__create                                       ; +0x169, 0x140422b79\nmov     rcx, [rdi]                                                     ; +0x16e, 0x140422b7e\nmov     r8, [rcx+1D0h]                                                 ; +0x171, 0x140422b81\nmov     rdx, rax                                                       ; +0x178, 0x140422b88\nmov     rcx, rdi                                                       ; +0x17b, 0x140422b8b\ncall    r8                                                             ; +0x17e, 0x140422b8e\nmov     dword ptr [rdi+1Ch], 6                                         ; +0x181, 0x140422b91\nmov     rdx, rdi                                                       ; +0x188, 0x140422b98\nmovss   xmm0, cs:dword_140834F20                                       ; +0x18b, 0x140422b9b\ncall    cs:?create@CCTransitionFade@cocos2d@@SAPEAV12@MPEAVCCScene@2@@Z; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x193, 0x140422ba3\nmov     rbx, rax                                                       ; +0x199, 0x140422ba9\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x19c, 0x140422bac\nmov     rcx, rax                                                       ; +0x1a2, 0x140422bb2\nmov     rdx, rbx                                                       ; +0x1a5, 0x140422bb5\ncall    cs:?replaceScene@CCDirector@cocos2d@@QEAA_NPEAVCCScene@2@@Z; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0x1a8, 0x140422bb8\nmov     rbx, [rsp+78h+arg_8]                                           ; +0x1ae, 0x140422bbe\nadd     rsp, 70h                                                       ; +0x1b6, 0x140422bc6\npop     rdi                                                            ; +0x1ba, 0x140422bca\nretn                                                                   ; +0x1bb, 0x140422bcb", "xrefs": ["LevelInfoLayer::onPlay @ 0x1404214e7", "LevelInfoLayer::init @ 0x14041cabd", "<???> @ 0x1409268a0"], "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"}