//
// ProfilePage::onMyLevels from 0xa54e88 to 0xa55010 (392 bytes)
//
// 3 xrefs:
// > ??> @ 0x48ee0
// > ProfilePage::loadPageFromUserInfo @ 0xa59fd4
// > ??> @ 0x15416b0
//
// This function is hookable on this platform (idp: arm, 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 13:00:07 +0000
//
__int64 __fastcall ProfilePage::onMyLevels(ProfilePage *this, cocos2d::CCObject *a2)
{
cocos2d::CCDirector *v3; // x0
cocos2d::CCDirector *v4; // x0
cocos2d::CCDirector *v6; // x0
cocos2d::CCDirector *v7; // x0
cocos2d::CCDirector *v8; // x21
__int64 v9; // x0
cocos2d::CCDictionary **v10; // x0
cocos2d::CCDirector *v11; // x0
cocos2d::CCDirector *v12; // x20
cocos2d::CCString *v13; // x0
const char *CString; // x0
size_t v15; // x0
LevelBrowserLayer *v16; // x0
GJSearchObject *v17; // x1
AppDelegate *v18; // x0
cocos2d::CCScene *v19; // x1
cocos2d::CCScene *v20; // x0
cocos2d::CCDirector *v21; // x20
LevelBrowserLayer *v22; // x0
GJSearchObject *v23; // x1
AppDelegate *v24; // x0
cocos2d::CCScene *v25; // x1
cocos2d::CCScene *v26; // x0
cocos2d::CCDirector *v27; // x21
char *v28; // [xsp+38h] [xbp+38h]
char *v29; // [xsp+38h] [xbp+38h]
__int64 v30[2]; // [xsp+40h] [xbp+40h] BYREF
void *v31; // [xsp+50h] [xbp+50h]
v3 = (cocos2d::CCDirector *)*((unsigned __int8 *)this + 740);
if ( (_DWORD)v3 )
{
v21 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v3);
v22 = (LevelBrowserLayer *)GJSearchObject::create(98);
v24 = LevelBrowserLayer::scene(v22, v23);
v26 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create(v24, 0.5, v25);
cocos2d::CCDirector::pushScene(v21, v26);
}
else
{
v4 = (cocos2d::CCDirector *)*(unsigned __int8 *)(cocos2d::CCDirector::sharedDirector(v3) + 176);
if ( !(_DWORD)v4 )
{
v6 = (cocos2d::CCDirector *)*(unsigned int *)(*(_QWORD *)(cocos2d::CCDirector::sharedDirector(v4) + 272) + 28LL);
if ( (_DWORD)v6 != 15 )
{
v7 = *(cocos2d::CCDirector **)(cocos2d::CCDirector::sharedDirector(v6) + 96);
if ( v7 )
{
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);
v9 = cocos2d::CCDirector::sharedDirector(v8);
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::popToSceneInStack(v8, *(cocos2d::CCScene **)(v9 + 96));
}
else
{
v27 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(nullptr);
v6 = *(cocos2d::CCDirector **)(cocos2d::CCDirector::sharedDirector(v27) + 272);
*((_QWORD *)v27 + 12) = v6;
}
}
v10 = (cocos2d::CCDictionary **)GameLevelManager::sharedState(v6);
v11 = (cocos2d::CCDirector *)GameLevelManager::userIDForAccountID(v10, *((_DWORD *)this + 184));
v28 = (char *)(unsigned int)v11;
v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v11);
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v28);
CString = (const char *)cocos2d::CCString::getCString(v13);
v30[0] = 0;
v29 = (char *)CString;
v30[1] = 0;
v31 = nullptr;
v15 = strlen(CString);
std::string::__init(v30, v29, v15);
v16 = (LevelBrowserLayer *)GJSearchObject::create(5, (char *)v30);
v18 = LevelBrowserLayer::scene(v16, v17);
v20 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create(v18, 0.5, v19);
cocos2d::CCDirector::pushScene(v12, v20);
if ( (v30[0] & 1) != 0 )
operator delete(v31);
}
}
return _stack_chk_guard;
}