{"type": "func", "start": 5369352976, "end": 5369353501, "name": "CreatorLayer::onMyLevels", "pseudocode": "// \n// CreatorLayer::onMyLevels from 0x14009d310 to 0x14009d51d (525 bytes)\n// \n// 2 xrefs:\n// > CreatorLayer::init @ 0x14009c931\n// > <???> @ 0x1406c7578\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\n// Hidden C++ exception states: #wind=5\nvoid CreatorLayer::onMyLevels(CreatorLayer *a1, cocos2d::CCObject *a2)\n{\n  __int64 v2; // rax\n  GJSearchObject *v3; // rdi\n  GameManager *v4; // rcx\n  int IntGameVariable; // ebx\n  GameManager *v6; // rcx\n  GameManager *v7; // rcx\n  GameManager *v8; // rcx\n  struct cocos2d::CCScene *v9; // rbx\n  __int64 v10; // rdx\n  __int64 v11; // rcx\n  LevelBrowserLayer *v12; // rax\n  struct cocos2d::CCTransitionFade *v13; // rbx\n  __int64 v14; // rcx\n  cocos2d::CCDirector *v15; // rax\n  void *v16; // [rsp+40h] [rbp+18h]\n  void *v17; // [rsp+40h] [rbp+18h]\n  void *v18; // [rsp+40h] [rbp+18h]\n  void *v19; // [rsp+40h] [rbp+18h]\n  void *v20; // [rsp+40h] [rbp+18h]\n\n  v2 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v16 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v16);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v2 = qword_1406C2ED8;\n  }\n  if ( *(_DWORD *)(v2 + 1200) == 102 )\n  {\n    v3 = GJSearchObject::create_2(MyLists);\n  }\n  else\n  {\n    v3 = GJSearchObject::create_2(MyLevels);\n    v4 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v17 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v17);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v4 = (GameManager *)qword_1406C2ED8;\n    }\n    IntGameVariable = 999;\n    if ( GameManager::getIntGameVariable(v4, \"0091\") > 999 )\n      goto LABEL_11;\n    v6 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v18 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v18);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v6 = (GameManager *)qword_1406C2ED8;\n    }\n    if ( GameManager::getIntGameVariable(v6, \"0091\") >= 0 )\n    {\nLABEL_11:\n      v7 = (GameManager *)qword_1406C2ED8;\n      if ( !qword_1406C2ED8 )\n      {\n        v19 = operator new(0x668u);\n        qword_1406C2ED8 = sub_14017AB00(v19);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n        v7 = (GameManager *)qword_1406C2ED8;\n      }\n      if ( GameManager::getIntGameVariable(v7, \"0091\") <= 999 )\n      {\n        v8 = (GameManager *)qword_1406C2ED8;\n        if ( !qword_1406C2ED8 )\n        {\n          v20 = operator new(0x668u);\n          qword_1406C2ED8 = sub_14017AB00(v20);\n          (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n          v8 = (GameManager *)qword_1406C2ED8;\n        }\n        IntGameVariable = GameManager::getIntGameVariable(v8, \"0091\");\n      }\n      v3->m_folder = IntGameVariable;\n    }\n    else\n    {\n      v3->m_folder = 0;\n    }\n  }\n  v9 = (struct cocos2d::CCScene *)cocos2d::CCScene::create();\n  *(_QWORD *)(cocos2d::CCApplication::sharedApplication(v11, v10) + 224) = v9;\n  v12 = LevelBrowserLayer::create(v3);\n  v9->addChild_1(v9, v12);\n  v13 = cocos2d::CCTransitionFade::create(0.5, v9);\n  v15 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14);\n  cocos2d::CCDirector::pushScene(v15, v13);\n}", "assembly": "; \n; CreatorLayer::onMyLevels from 0x14009d310 to 0x14009d51d (525 bytes)\n; \n; 2 xrefs:\n; > CreatorLayer::init @ 0x14009c931\n; > <???> @ 0x1406c7578\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14009d310\npush    rdi                                                            ; +0x5, 0x14009d315\nsub     rsp, 20h                                                       ; +0x6, 0x14009d316\nmov     rax, cs:qword_1406C2ED8                                        ; +0xa, 0x14009d31a\ntest    rax, rax                                                       ; +0x11, 0x14009d321\njnz     short loc_14009D355                                            ; +0x14, 0x14009d324\nmov     ecx, 668h; Size                                                ; +0x16, 0x14009d326\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1b, 0x14009d32b\nmov     [rsp+28h+arg_10], rax                                          ; +0x20, 0x14009d330\nmov     rcx, rax                                                       ; +0x25, 0x14009d335\ncall    sub_14017AB00                                                  ; +0x28, 0x14009d338\nnop                                                                    ; +0x2d, 0x14009d33d\nmov     cs:qword_1406C2ED8, rax                                        ; +0x2e, 0x14009d33e\nmov     rdx, [rax]                                                     ; +0x35, 0x14009d345\nmov     rcx, rax                                                       ; +0x38, 0x14009d348\ncall    qword ptr [rdx+48h]                                            ; +0x3b, 0x14009d34b\nmov     rax, cs:qword_1406C2ED8                                        ; +0x3e, 0x14009d34e\nmov     ecx, [rax+4B0h]                                                ; +0x45, 0x14009d355\ncmp     ecx, 66h ; 'f'                                                 ; +0x4b, 0x14009d35b\njz      loc_14009D4B6                                                  ; +0x4e, 0x14009d35e\nmov     ecx, 62h ; 'b'                                                 ; +0x54, 0x14009d364\ncall    GJSearchObject__create_2                                       ; +0x59, 0x14009d369\nmov     rdi, rax                                                       ; +0x5e, 0x14009d36e\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x61, 0x14009d371\ntest    rcx, rcx                                                       ; +0x68, 0x14009d378\njnz     short loc_14009D3AC                                            ; +0x6b, 0x14009d37b\nmov     ecx, 668h; Size                                                ; +0x6d, 0x14009d37d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x72, 0x14009d382\nmov     [rsp+28h+arg_10], rax                                          ; +0x77, 0x14009d387\nmov     rcx, rax                                                       ; +0x7c, 0x14009d38c\ncall    sub_14017AB00                                                  ; +0x7f, 0x14009d38f\nnop                                                                    ; +0x84, 0x14009d394\nmov     cs:qword_1406C2ED8, rax                                        ; +0x85, 0x14009d395\nmov     rdx, [rax]                                                     ; +0x8c, 0x14009d39c\nmov     rcx, rax                                                       ; +0x8f, 0x14009d39f\ncall    qword ptr [rdx+48h]                                            ; +0x92, 0x14009d3a2\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x95, 0x14009d3a5\nlea     rdx, a0091; \"0091\"                                             ; +0x9c, 0x14009d3ac\ncall    GameManager__getIntGameVariable                                ; +0xa3, 0x14009d3b3\nmov     ebx, 3E7h                                                      ; +0xa8, 0x14009d3b8\ncmp     eax, ebx                                                       ; +0xad, 0x14009d3bd\njg      short loc_14009D419                                            ; +0xaf, 0x14009d3bf\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xb1, 0x14009d3c1\ntest    rcx, rcx                                                       ; +0xb8, 0x14009d3c8\njnz     short loc_14009D3FC                                            ; +0xbb, 0x14009d3cb\nmov     ecx, 668h; Size                                                ; +0xbd, 0x14009d3cd\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xc2, 0x14009d3d2\nmov     [rsp+28h+arg_10], rax                                          ; +0xc7, 0x14009d3d7\nmov     rcx, rax                                                       ; +0xcc, 0x14009d3dc\ncall    sub_14017AB00                                                  ; +0xcf, 0x14009d3df\nnop                                                                    ; +0xd4, 0x14009d3e4\nmov     cs:qword_1406C2ED8, rax                                        ; +0xd5, 0x14009d3e5\nmov     rdx, [rax]                                                     ; +0xdc, 0x14009d3ec\nmov     rcx, rax                                                       ; +0xdf, 0x14009d3ef\ncall    qword ptr [rdx+48h]                                            ; +0xe2, 0x14009d3f2\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xe5, 0x14009d3f5\nlea     rdx, a0091; \"0091\"                                             ; +0xec, 0x14009d3fc\ncall    GameManager__getIntGameVariable                                ; +0xf3, 0x14009d403\ntest    eax, eax                                                       ; +0xf8, 0x14009d408\njns     short loc_14009D419                                            ; +0xfa, 0x14009d40a\nxor     ebx, ebx                                                       ; +0xfc, 0x14009d40c\nmov     [rdi+1C4h], ebx                                                ; +0xfe, 0x14009d40e\njmp     loc_14009D4BE                                                  ; +0x104, 0x14009d414\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x109, 0x14009d419\ntest    rcx, rcx                                                       ; +0x110, 0x14009d420\njnz     short loc_14009D454                                            ; +0x113, 0x14009d423\nmov     ecx, 668h; Size                                                ; +0x115, 0x14009d425\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x11a, 0x14009d42a\nmov     [rsp+28h+arg_10], rax                                          ; +0x11f, 0x14009d42f\nmov     rcx, rax                                                       ; +0x124, 0x14009d434\ncall    sub_14017AB00                                                  ; +0x127, 0x14009d437\nnop                                                                    ; +0x12c, 0x14009d43c\nmov     cs:qword_1406C2ED8, rax                                        ; +0x12d, 0x14009d43d\nmov     rdx, [rax]                                                     ; +0x134, 0x14009d444\nmov     rcx, rax                                                       ; +0x137, 0x14009d447\ncall    qword ptr [rdx+48h]                                            ; +0x13a, 0x14009d44a\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x13d, 0x14009d44d\nlea     rdx, a0091; \"0091\"                                             ; +0x144, 0x14009d454\ncall    GameManager__getIntGameVariable                                ; +0x14b, 0x14009d45b\ncmp     eax, ebx                                                       ; +0x150, 0x14009d460\njg      short loc_14009D4AE                                            ; +0x152, 0x14009d462\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x154, 0x14009d464\ntest    rcx, rcx                                                       ; +0x15b, 0x14009d46b\njnz     short loc_14009D4A0                                            ; +0x15e, 0x14009d46e\nmov     ecx, 668h; Size                                                ; +0x160, 0x14009d470\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x165, 0x14009d475\nmov     [rsp+28h+arg_10], rax                                          ; +0x16a, 0x14009d47a\nmov     rcx, rax                                                       ; +0x16f, 0x14009d47f\ncall    sub_14017AB00                                                  ; +0x172, 0x14009d482\nnop                                                                    ; +0x177, 0x14009d487\nmov     cs:qword_1406C2ED8, rax                                        ; +0x178, 0x14009d488\nmov     r8, [rax]                                                      ; +0x17f, 0x14009d48f\nmov     rcx, rax                                                       ; +0x182, 0x14009d492\ncall    qword ptr [r8+48h]                                             ; +0x185, 0x14009d495\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x189, 0x14009d499\nlea     rdx, a0091; \"0091\"                                             ; +0x190, 0x14009d4a0\ncall    GameManager__getIntGameVariable                                ; +0x197, 0x14009d4a7\nmov     ebx, eax                                                       ; +0x19c, 0x14009d4ac\nmov     [rdi+1C4h], ebx                                                ; +0x19e, 0x14009d4ae\njmp     short loc_14009D4BE                                            ; +0x1a4, 0x14009d4b4\ncall    GJSearchObject__create_2                                       ; +0x1a6, 0x14009d4b6\nmov     rdi, rax                                                       ; +0x1ab, 0x14009d4bb\ncall    cs:?create@CCScene@cocos2d@@SAPEAV12@XZ; cocos2d::CCScene::create(void) ; +0x1ae, 0x14009d4be\nmov     rbx, rax                                                       ; +0x1b4, 0x14009d4c4\ncall    cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x1b7, 0x14009d4c7\nmov     [rax+0E0h], rbx                                                ; +0x1bd, 0x14009d4cd\nmov     rcx, rdi                                                       ; +0x1c4, 0x14009d4d4\ncall    LevelBrowserLayer__create                                      ; +0x1c7, 0x14009d4d7\nmov     r8, [rbx]                                                      ; +0x1cc, 0x14009d4dc\nmov     rdx, rax                                                       ; +0x1cf, 0x14009d4df\nmov     rcx, rbx                                                       ; +0x1d2, 0x14009d4e2\ncall    qword ptr [r8+1C0h]                                            ; +0x1d5, 0x14009d4e5\nmov     rdx, rbx                                                       ; +0x1dc, 0x14009d4ec\nmovss   xmm0, cs:dword_140622B08                                       ; +0x1df, 0x14009d4ef\ncall    cs:?create@CCTransitionFade@cocos2d@@SAPEAV12@MPEAVCCScene@2@@Z; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x1e7, 0x14009d4f7\nmov     rbx, rax                                                       ; +0x1ed, 0x14009d4fd\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1f0, 0x14009d500\nmov     rcx, rax                                                       ; +0x1f6, 0x14009d506\nmov     rdx, rbx                                                       ; +0x1f9, 0x14009d509\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1fc, 0x14009d50c\nadd     rsp, 20h                                                       ; +0x201, 0x14009d511\npop     rdi                                                            ; +0x205, 0x14009d515\njmp     cs:?pushScene@CCDirector@cocos2d@@QEAA_NPEAVCCScene@2@@Z; cocos2d::CCDirector::pushScene(cocos2d::CCScene *) ; +0x206, 0x14009d516", "xrefs": ["CreatorLayer::init @ 0x14009c931", "<???> @ 0x1406c7578"], "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"}