//
// CreatorLayer::onSavedLevels from 0x493504 to 0x49359c (152 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:49:39 +0000
//
int __fastcall CreatorLayer::onSavedLevels(CreatorLayer *this, cocos2d::CCObject *a2)
{
GameManager *v2; // r0
int v3; // r4
GameManager *v4; // r0
GameManager *v5; // r4
GameManager *v6; // r0
GameManager *IntGameVariable; // r0
GameManager *v8; // r0
GameManager *v9; // r0
cocos2d::CCDirector *v10; // r0
GameManager *v11; // r0
GameManager *v12; // r0
cocos2d::CCDirector *v13; // r5
GJSearchObject *v14; // r1
float v15; // r0
cocos2d::CCScene *v16; // r2
cocos2d::CCScene *v17; // r1
v2 = (GameManager *)GameManager::sharedState(this);
v3 = *((_DWORD *)v2 + 250);
if ( v3 != 103 || (v4 = (GameManager *)GameManager::sharedState(v2), GameManager::onlyCuratedLevels(v4)) )
v3 = 99;
v5 = (GameManager *)GJSearchObject::create(v3);
v6 = (GameManager *)GameManager::sharedState(v5);
IntGameVariable = (GameManager *)GameManager::getIntGameVariable(v6, "0092");
if ( (int)IntGameVariable > 998
|| (v11 = (GameManager *)GameManager::sharedState(IntGameVariable),
IntGameVariable = (GameManager *)GameManager::getIntGameVariable(v11, "0092"),
(int)IntGameVariable > 0) )
{
v8 = (GameManager *)GameManager::sharedState(IntGameVariable);
v9 = (GameManager *)GameManager::getIntGameVariable(v8, "0092");
if ( (int)v9 <= 998 )
{
v12 = (GameManager *)GameManager::sharedState(v9);
v10 = (cocos2d::CCDirector *)GameManager::getIntGameVariable(v12, "0092");
}
else
{
v10 = (cocos2d::CCDirector *)(&stru_3DC + 11);
}
}
else
{
v10 = nullptr;
}
*((_DWORD *)v5 + 83) = v10;
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);
v15 = COERCE_FLOAT(LevelBrowserLayer::scene(v5, v14));
v17 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create((cocos2d::CCTransitionFade *)0x3F000000, v15, v16);
return cocos2d::CCDirector::pushScene(v13, v17);
}