{"type": "func", "start": 4297601040, "end": 4297601259, "name": "CreatorLayer::onSavedLevels", "pseudocode": "// \n// CreatorLayer::onSavedLevels from 0x100283010 to 0x1002830eb (219 bytes)\n// \n// 1 xrefs:\n// > CreatorLayer::init @ 0x1002822e8\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 12:27:44 +0000\n// \n\n__int64 __fastcall CreatorLayer::onSavedLevels(__int64 a1, __int64 a2, __int64 a3)\n{\n  __int64 v3; // rdx\n  __int64 v4; // rax\n  double v5; // xmm0_8\n  __int64 v6; // rax\n  __int64 v7; // rdi\n  __int64 v8; // rbx\n  __int64 v9; // rdx\n  __int64 v10; // rax\n  __int64 v11; // rdi\n  __int64 v12; // rdx\n  int v13; // eax\n  __int64 v14; // rax\n  int v15; // eax\n  __int64 v16; // rax\n  __int64 v17; // rdx\n  int v18; // eax\n  int v19; // ecx\n  int v20; // eax\n  __int64 v21; // rax\n  __int64 v22; // r14\n  __int64 v23; // rax\n  char *v24; // rax\n\n  GameManager::sharedState(a1, a2, a3);\n  if ( *(_DWORD *)(v4 + 1308) != 103\n    || (*(_QWORD *)&v5 = GameManager::sharedState(a1, a2, v3).u64[0],\n        v7 = 103,\n        (unsigned __int8)GameManager::onlyCuratedLevels(v6, v5)) )\n  {\n    v7 = 99;\n  }\n  v8 = GJSearchObject::create_2(v7);\n  GameManager::sharedState(v7, a2, v9);\n  v11 = v10;\n  GameManager::getIntGameVariable(v10, \"0092\");\n  if ( v13 <= 998\n    && (GameManager::sharedState(v11, \"0092\", v12), v11 = v14, GameManager::getIntGameVariable(v14, \"0092\"), v15 <= 0) )\n  {\n    v20 = 0;\n  }\n  else\n  {\n    GameManager::sharedState(v11, \"0092\", v12);\n    v11 = v16;\n    GameManager::getIntGameVariable(v16, \"0092\");\n    v19 = v18;\n    v20 = 999;\n    if ( v19 <= 998 )\n    {\n      GameManager::sharedState(v11, \"0092\", v17);\n      v11 = v21;\n      GameManager::getIntGameVariable(v21, \"0092\");\n    }\n  }\n  *(_DWORD *)(v8 + 420) = v20;\n  v22 = cocos2d::CCDirector::sharedDirector(v11, \"0092\");\n  v23 = LevelBrowserLayer::scene(v8);\n  v24 = cocos2d::CCTransitionFade::create_1(v23, 0.5);\n  return cocos2d::CCDirector::pushScene(v22, v24);\n}", "assembly": "; \n; CreatorLayer::onSavedLevels from 0x100283010 to 0x1002830eb (219 bytes)\n; \n; 1 xrefs:\n; > CreatorLayer::init @ 0x1002822e8\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 12:27:44 +0000\n; \npush    rbp                                                            ; +0x0, 0x100283010\nmov     rbp, rsp                                                       ; +0x1, 0x100283011\npush    r14                                                            ; +0x4, 0x100283014\npush    rbx                                                            ; +0x6, 0x100283016\ncall    GameManager__sharedState                                       ; +0x7, 0x100283017\ncmp     dword ptr [rax+51Ch], 67h ; 'g'                                ; +0xc, 0x10028301c\njnz     short loc_10028303B                                            ; +0x13, 0x100283023\ncall    GameManager__sharedState                                       ; +0x15, 0x100283025\nmov     rdi, rax                                                       ; +0x1a, 0x10028302a\ncall    GameManager__onlyCuratedLevels                                 ; +0x1d, 0x10028302d\nmov     edi, 67h ; 'g'                                                 ; +0x22, 0x100283032\ntest    al, al                                                         ; +0x27, 0x100283037\njz      short loc_100283040                                            ; +0x29, 0x100283039\nmov     edi, 63h ; 'c'                                                 ; +0x2b, 0x10028303b\ncall    GJSearchObject__create_2                                       ; +0x30, 0x100283040\nmov     rbx, rax                                                       ; +0x35, 0x100283045\ncall    GameManager__sharedState                                       ; +0x38, 0x100283048\nlea     rsi, a0092; \"0092\"                                             ; +0x3d, 0x10028304d\nmov     rdi, rax                                                       ; +0x44, 0x100283054\ncall    GameManager__getIntGameVariable                                ; +0x47, 0x100283057\ncmp     eax, 3E6h                                                      ; +0x4c, 0x10028305c\njg      short loc_10028307B                                            ; +0x51, 0x100283061\ncall    GameManager__sharedState                                       ; +0x53, 0x100283063\nlea     rsi, a0092; \"0092\"                                             ; +0x58, 0x100283068\nmov     rdi, rax                                                       ; +0x5f, 0x10028306f\ncall    GameManager__getIntGameVariable                                ; +0x62, 0x100283072\ntest    eax, eax                                                       ; +0x67, 0x100283077\njle     short loc_1002830B4                                            ; +0x69, 0x100283079\ncall    GameManager__sharedState                                       ; +0x6b, 0x10028307b\nlea     rsi, a0092; \"0092\"                                             ; +0x70, 0x100283080\nmov     rdi, rax                                                       ; +0x77, 0x100283087\ncall    GameManager__getIntGameVariable                                ; +0x7a, 0x10028308a\nmov     ecx, eax                                                       ; +0x7f, 0x10028308f\nmov     eax, 3E7h                                                      ; +0x81, 0x100283091\ncmp     ecx, 3E6h                                                      ; +0x86, 0x100283096\njg      short loc_1002830B6                                            ; +0x8c, 0x10028309c\ncall    GameManager__sharedState                                       ; +0x8e, 0x10028309e\nlea     rsi, a0092; \"0092\"                                             ; +0x93, 0x1002830a3\nmov     rdi, rax                                                       ; +0x9a, 0x1002830aa\ncall    GameManager__getIntGameVariable                                ; +0x9d, 0x1002830ad\njmp     short loc_1002830B6                                            ; +0xa2, 0x1002830b2\nxor     eax, eax                                                       ; +0xa4, 0x1002830b4\nmov     [rbx+1A4h], eax                                                ; +0xa6, 0x1002830b6\ncall    cocos2d__CCDirector__sharedDirector                            ; +0xac, 0x1002830bc\nmov     r14, rax                                                       ; +0xb1, 0x1002830c1\nmov     rdi, rbx                                                       ; +0xb4, 0x1002830c4\ncall    LevelBrowserLayer__scene                                       ; +0xb7, 0x1002830c7\nmovss   xmm0, cs:dword_100A03578                                       ; +0xbc, 0x1002830cc\nmov     rdi, rax                                                       ; +0xc4, 0x1002830d4\ncall    cocos2d__CCTransitionFade__create_1                            ; +0xc7, 0x1002830d7\nmov     rdi, r14                                                       ; +0xcc, 0x1002830dc\nmov     rsi, rax                                                       ; +0xcf, 0x1002830df\npop     rbx                                                            ; +0xd2, 0x1002830e2\npop     r14                                                            ; +0xd3, 0x1002830e3\npop     rbp                                                            ; +0xd5, 0x1002830e5\njmp     cocos2d__CCDirector__pushScene                                 ; +0xd6, 0x1002830e6", "xrefs": ["CreatorLayer::init @ 0x1002822e8"], "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"}