{"type": "func", "start": 5370269168, "end": 5370269593, "name": "EditLevelLayer::onBack", "pseudocode": "// \n// EditLevelLayer::onBack from 0x14017cdf0 to 0x14017cf99 (425 bytes)\n// \n// 4 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x14017c253\n// > EditLevelLayer::keyBackClicked @ 0x14017d289\n// > EditLevelLayer::init @ 0x1401798a4\n// > <???> @ 0x1409187e8\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:27:35 +0000\n// \n\n// Hidden C++ exception states: #wind=5\nchar __fastcall EditLevelLayer::onBack(__int64 a1)\n{\n  struct cocos2d::CCScene *v2; // rbx\n  __int64 v3; // rax\n  __int64 v4; // rdx\n  _QWORD *v5; // rdi\n  __int64 v6; // rax\n  __int64 v7; // rax\n  __int64 v8; // rax\n  struct cocos2d::CCScene *v9; // rbx\n  __int64 v10; // rcx\n  cocos2d::CCDirector *v11; // rax\n  void *v13; // [rsp+20h] [rbp-38h]\n  void *v14; // [rsp+20h] [rbp-38h]\n  void *v15; // [rsp+20h] [rbp-38h]\n  _QWORD v16[4]; // [rsp+28h] [rbp-30h] BYREF\n\n  v2 = nullptr;\n  v3 = cocos2d::CCDirector::sharedDirector(a1);\n  if ( !*(_BYTE *)(v3 + 176) )\n  {\n    EditLevelLayer::closeTextInputs(a1);\n    EditLevelLayer::verifyLevelName(a1);\n    (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);\n    v4 = *(_QWORD *)&qword_14090BFB0;\n    if ( !*(_QWORD *)&qword_14090BFB0 )\n    {\n      v13 = operator new(0x690u);\n      *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v13);\n      (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n      v4 = *(_QWORD *)&qword_14090BFB0;\n    }\n    sub_14003F4F0((__int64)v16, v4 + 1272);\n    v5 = v16;\n    if ( v16[3] > 0xFu )\n      v5 = (_QWORD *)v16[0];\n    if ( !*(_QWORD *)&qword_14090BFB0 )\n    {\n      v14 = operator new(0x690u);\n      *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v14);\n      (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    }\n    v6 = GJSearchObject::createFromKey(v5);\n    if ( v6 )\n      v2 = (struct cocos2d::CCScene *)LevelBrowserLayer::scene(v6);\n    sub_14003D310((__int64)v16);\n    v7 = *(_QWORD *)&qword_14090BFB0;\n    if ( !*(_QWORD *)&qword_14090BFB0 )\n    {\n      v15 = operator new(0x690u);\n      *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v15);\n      (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n      v7 = *(_QWORD *)&qword_14090BFB0;\n    }\n    if ( *(_BYTE *)(v7 + 1344) || !v2 )\n    {\n      *(_BYTE *)(v7 + 1344) = 0;\n      v8 = GJSearchObject::create_2(98);\n      v2 = (struct cocos2d::CCScene *)LevelBrowserLayer::scene(v8);\n    }\n    v9 = cocos2d::CCTransitionFade::create(0.5, v2);\n    v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);\n    LOBYTE(v3) = cocos2d::CCDirector::replaceScene(v11, v9);\n  }\n  return v3;\n}", "assembly": "; \n; EditLevelLayer::onBack from 0x14017cdf0 to 0x14017cf99 (425 bytes)\n; \n; 4 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x14017c253\n; > EditLevelLayer::keyBackClicked @ 0x14017d289\n; > EditLevelLayer::init @ 0x1401798a4\n; > <???> @ 0x1409187e8\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:27:35 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14017cdf0\npush    rdi                                                            ; +0x5, 0x14017cdf5\nsub     rsp, 50h                                                       ; +0x6, 0x14017cdf6\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14017cdfa\nxor     rax, rsp                                                       ; +0x11, 0x14017ce01\nmov     [rsp+58h+var_10], rax                                          ; +0x14, 0x14017ce04\nmov     rdi, rcx                                                       ; +0x19, 0x14017ce09\nxor     ebx, ebx                                                       ; +0x1c, 0x14017ce0c\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1e, 0x14017ce0e\ncmp     [rax+0B0h], bl                                                 ; +0x24, 0x14017ce14\njnz     loc_14017CF81                                                  ; +0x2a, 0x14017ce1a\nmov     rcx, rdi                                                       ; +0x30, 0x14017ce20\ncall    EditLevelLayer__closeTextInputs                                ; +0x33, 0x14017ce23\nmov     rcx, rdi                                                       ; +0x38, 0x14017ce28\ncall    EditLevelLayer__verifyLevelName                                ; +0x3b, 0x14017ce2b\nmov     rax, [rdi]                                                     ; +0x40, 0x14017ce30\nxor     edx, edx                                                       ; +0x43, 0x14017ce33\nmov     rcx, rdi                                                       ; +0x45, 0x14017ce35\ncall    qword ptr [rax+3E0h]                                           ; +0x48, 0x14017ce38\nmov     rdx, cs:qword_14090BFB0                                        ; +0x4e, 0x14017ce3e\ntest    rdx, rdx                                                       ; +0x55, 0x14017ce45\njnz     short loc_14017CE7C                                            ; +0x58, 0x14017ce48\nmov     ecx, 690h; Size                                                ; +0x5a, 0x14017ce4a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x5f, 0x14017ce4f\nmov     [rsp+58h+var_38], rax                                          ; +0x64, 0x14017ce54\nmov     rcx, rax                                                       ; +0x69, 0x14017ce59\ncall    GameLevelManager__GameLevelManager                             ; +0x6c, 0x14017ce5c\nnop                                                                    ; +0x71, 0x14017ce61\nmov     cs:qword_14090BFB0, rax                                        ; +0x72, 0x14017ce62\nmov     rcx, [rax]                                                     ; +0x79, 0x14017ce69\nmov     rdx, [rcx+48h]                                                 ; +0x7c, 0x14017ce6c\nmov     rcx, rax                                                       ; +0x80, 0x14017ce70\ncall    rdx                                                            ; +0x83, 0x14017ce73\nmov     rdx, cs:qword_14090BFB0                                        ; +0x85, 0x14017ce75\nadd     rdx, 4F8h                                                      ; +0x8c, 0x14017ce7c\nlea     rcx, [rsp+58h+var_30]                                          ; +0x93, 0x14017ce83\ncall    sub_14003F4F0                                                  ; +0x98, 0x14017ce88\nnop                                                                    ; +0x9d, 0x14017ce8d\nlea     rdi, [rsp+58h+var_30]                                          ; +0x9e, 0x14017ce8e\ncmp     [rsp+58h+var_18], 0Fh                                          ; +0xa3, 0x14017ce93\ncmova   rdi, [rsp+58h+var_30]                                          ; +0xa9, 0x14017ce99\ncmp     cs:qword_14090BFB0, 0                                          ; +0xaf, 0x14017ce9f\njnz     short loc_14017CED1                                            ; +0xb7, 0x14017cea7\nmov     ecx, 690h; Size                                                ; +0xb9, 0x14017cea9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xbe, 0x14017ceae\nmov     [rsp+58h+var_38], rax                                          ; +0xc3, 0x14017ceb3\nmov     rcx, rax                                                       ; +0xc8, 0x14017ceb8\ncall    GameLevelManager__GameLevelManager                             ; +0xcb, 0x14017cebb\nnop                                                                    ; +0xd0, 0x14017cec0\nmov     cs:qword_14090BFB0, rax                                        ; +0xd1, 0x14017cec1\nmov     rdx, [rax]                                                     ; +0xd8, 0x14017cec8\nmov     rcx, rax                                                       ; +0xdb, 0x14017cecb\ncall    qword ptr [rdx+48h]                                            ; +0xde, 0x14017cece\nmov     rcx, rdi                                                       ; +0xe1, 0x14017ced1\ncall    GJSearchObject__createFromKey                                  ; +0xe4, 0x14017ced4\ntest    rax, rax                                                       ; +0xe9, 0x14017ced9\njz      short loc_14017CEE9                                            ; +0xec, 0x14017cedc\nmov     rcx, rax                                                       ; +0xee, 0x14017cede\ncall    LevelBrowserLayer__scene                                       ; +0xf1, 0x14017cee1\nmov     rbx, rax                                                       ; +0xf6, 0x14017cee6\nlea     rcx, [rsp+58h+var_30]                                          ; +0xf9, 0x14017cee9\ncall    sub_14003D310                                                  ; +0xfe, 0x14017ceee\nmov     rax, cs:qword_14090BFB0                                        ; +0x103, 0x14017cef3\ntest    rax, rax                                                       ; +0x10a, 0x14017cefa\njnz     short loc_14017CF31                                            ; +0x10d, 0x14017cefd\nmov     ecx, 690h; Size                                                ; +0x10f, 0x14017ceff\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x114, 0x14017cf04\nmov     [rsp+58h+var_38], rax                                          ; +0x119, 0x14017cf09\nmov     rcx, rax                                                       ; +0x11e, 0x14017cf0e\ncall    GameLevelManager__GameLevelManager                             ; +0x121, 0x14017cf11\nnop                                                                    ; +0x126, 0x14017cf16\nmov     cs:qword_14090BFB0, rax                                        ; +0x127, 0x14017cf17\nmov     rcx, [rax]                                                     ; +0x12e, 0x14017cf1e\nmov     rdx, [rcx+48h]                                                 ; +0x131, 0x14017cf21\nmov     rcx, rax                                                       ; +0x135, 0x14017cf25\ncall    rdx                                                            ; +0x138, 0x14017cf28\nmov     rax, cs:qword_14090BFB0                                        ; +0x13a, 0x14017cf2a\ncmp     byte ptr [rax+540h], 0                                         ; +0x141, 0x14017cf31\njnz     short loc_14017CF3F                                            ; +0x148, 0x14017cf38\ntest    rbx, rbx                                                       ; +0x14a, 0x14017cf3a\njnz     short loc_14017CF5B                                            ; +0x14d, 0x14017cf3d\nmov     byte ptr [rax+540h], 0                                         ; +0x14f, 0x14017cf3f\nmov     ecx, 62h ; 'b'                                                 ; +0x156, 0x14017cf46\ncall    GJSearchObject__create_2                                       ; +0x15b, 0x14017cf4b\nmov     rcx, rax                                                       ; +0x160, 0x14017cf50\ncall    LevelBrowserLayer__scene                                       ; +0x163, 0x14017cf53\nmov     rbx, rax                                                       ; +0x168, 0x14017cf58\nmov     rdx, rbx                                                       ; +0x16b, 0x14017cf5b\nmovss   xmm0, cs:dword_140834F20                                       ; +0x16e, 0x14017cf5e\ncall    cs:?create@CCTransitionFade@cocos2d@@SAPEAV12@MPEAVCCScene@2@@Z; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x176, 0x14017cf66\nmov     rbx, rax                                                       ; +0x17c, 0x14017cf6c\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x17f, 0x14017cf6f\nmov     rcx, rax                                                       ; +0x185, 0x14017cf75\nmov     rdx, rbx                                                       ; +0x188, 0x14017cf78\ncall    cs:?replaceScene@CCDirector@cocos2d@@QEAA_NPEAVCCScene@2@@Z; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0x18b, 0x14017cf7b\nmov     rcx, [rsp+58h+var_10]                                          ; +0x191, 0x14017cf81\nxor     rcx, rsp; StackCookie                                          ; +0x196, 0x14017cf86\ncall    __security_check_cookie                                        ; +0x199, 0x14017cf89\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x19e, 0x14017cf8e\nadd     rsp, 50h                                                       ; +0x1a3, 0x14017cf93\npop     rdi                                                            ; +0x1a7, 0x14017cf97\nretn                                                                   ; +0x1a8, 0x14017cf98", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x14017c253", "EditLevelLayer::keyBackClicked @ 0x14017d289", "EditLevelLayer::init @ 0x1401798a4", "<???> @ 0x1409187e8"], "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"}