//
// CreatorLayer::onSavedLevels from 0x100283010 to 0x1002830eb (219 bytes)
//
// 1 xrefs:
// > CreatorLayer::init @ 0x1002822e8
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:27:44 +0000
//
__int64 __fastcall CreatorLayer::onSavedLevels(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v3; // rdx
__int64 v4; // rax
double v5; // xmm0_8
__int64 v6; // rax
__int64 v7; // rdi
__int64 v8; // rbx
__int64 v9; // rdx
__int64 v10; // rax
__int64 v11; // rdi
__int64 v12; // rdx
int v13; // eax
__int64 v14; // rax
int v15; // eax
__int64 v16; // rax
__int64 v17; // rdx
int v18; // eax
int v19; // ecx
int v20; // eax
__int64 v21; // rax
__int64 v22; // r14
__int64 v23; // rax
char *v24; // rax
GameManager::sharedState(a1, a2, a3);
if ( *(_DWORD *)(v4 + 1308) != 103
|| (*(_QWORD *)&v5 = GameManager::sharedState(a1, a2, v3).u64[0],
v7 = 103,
(unsigned __int8)GameManager::onlyCuratedLevels(v6, v5)) )
{
v7 = 99;
}
v8 = GJSearchObject::create_2(v7);
GameManager::sharedState(v7, a2, v9);
v11 = v10;
GameManager::getIntGameVariable(v10, "0092");
if ( v13 <= 998
&& (GameManager::sharedState(v11, "0092", v12), v11 = v14, GameManager::getIntGameVariable(v14, "0092"), v15 <= 0) )
{
v20 = 0;
}
else
{
GameManager::sharedState(v11, "0092", v12);
v11 = v16;
GameManager::getIntGameVariable(v16, "0092");
v19 = v18;
v20 = 999;
if ( v19 <= 998 )
{
GameManager::sharedState(v11, "0092", v17);
v11 = v21;
GameManager::getIntGameVariable(v21, "0092");
}
}
*(_DWORD *)(v8 + 420) = v20;
v22 = cocos2d::CCDirector::sharedDirector(v11, "0092");
v23 = LevelBrowserLayer::scene(v8);
v24 = cocos2d::CCTransitionFade::create_1(v23, 0.5);
return cocos2d::CCDirector::pushScene(v22, v24);
}