//
// ProfilePage::onMyLevels from 0x10019b238 to 0x10019b360 (296 bytes)
//
// 1 xrefs:
// > ProfilePage::loadPageFromUserInfo @ 0x100199b14
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall ProfilePage::onMyLevels(ProfilePage *a1, cocos2d::CCObject *a2)
{
_BOOL4 m_ownProfile; // w21
cocos2d::CCDirector *v4; // x0
cocos2d::CCDirector *v5; // x20
GJSearchObject *v6; // x0
cocos2d::CCScene *v7; // x0
cocos2d::CCTransitionFade *v8; // x0
cocos2d::CCScene *m_pSceneReference; // x21
cocos2d::CCDirector *v10; // x20
cocos2d::CCDirector *v11; // x0
GameLevelManager *v12; // x0
int v13; // w20
cocos2d::CCDirector *v14; // x19
cocos2d::CCString *v15; // x0
char *CString; // x0
char *v17; // x0
cocos2d::CCScene *v18; // x0
cocos2d::CCTransitionFade *v19; // x0
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v21; // [xsp+1Fh] [xbp-21h]
m_ownProfile = a1->m_ownProfile;
v4 = cocos2d::CCDirector::sharedDirector();
v5 = v4;
if ( m_ownProfile )
{
v6 = GJSearchObject::create_2(MyLevels);
v7 = LevelBrowserLayer::scene(v6);
v8 = cocos2d::CCTransitionFade::create_1(0.5, v7);
cocos2d::CCDirector::pushScene(v5, v8);
}
else if ( !v4->m_bIsTransitioning )
{
if ( cocos2d::CCDirector::sharedDirector()->m_pRunningScene->m_eObjType != MenuLayerObjectType )
{
m_pSceneReference = cocos2d::CCDirector::sharedDirector()->m_pSceneReference;
v10 = cocos2d::CCDirector::sharedDirector();
v11 = cocos2d::CCDirector::sharedDirector();
if ( m_pSceneReference )
cocos2d::CCDirector::popToSceneInStack(v10, v11->m_pSceneReference);
else
v10->m_pSceneReference = v11->m_pRunningScene;
}
v12 = GameLevelManager::sharedState();
v13 = GameLevelManager::userIDForAccountID(v12, a1->m_accountID);
v14 = cocos2d::CCDirector::sharedDirector();
v15 = (cocos2d::CCString *)sub_100268F4C("%i", v13);
CString = (char *)cocos2d::CCString::getCString(v15);
sub_100009900(__p, CString);
v17 = GJSearchObject::create_1(5, (__int128 *)__p);
v18 = LevelBrowserLayer::scene((GJSearchObject *)v17);
v19 = cocos2d::CCTransitionFade::create_1(0.5, v18);
cocos2d::CCDirector::pushScene(v14, v19);
if ( v21 < 0 )
operator delete(__p[0]);
}
}