//
// LevelLeaderboard::reloadLeaderboard from 0x933858 to 0x93391c (196 bytes)
//
// 3 xrefs:
// > LevelLeaderboard::onChangeType @ 0x933988
// > LevelLeaderboard::onChangeMode @ 0x9339e4
// > ??> @ 0xb3f40
//
// 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 LevelLeaderboard::reloadLeaderboard(LevelLeaderboard *a1, LevelLeaderboardType a2, LevelLeaderboardMode a3)
{
cocos2d::CCDirector *v5; // x0
cocos2d::CCTouchDispatcher *v6; // x0
cocos2d::CCDirector *v7; // x0
cocos2d::CCTouchDispatcher *v8; // x0
LevelLeaderboard *v9; // x22
cocos2d::CCScene *m_pRunningScene; // x20
void (__fastcall *addChild_0)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int); // x21
int HighestChildZ; // w0
__int64 v13; // x2
LevelLeaderboardMode v14; // [xsp+38h] [xbp+38h]
LevelLeaderboardMode v15; // [xsp+38h] [xbp+38h]
if ( a1->m_list )
{
v14 = a3;
v5 = cocos2d::CCDirector::sharedDirector();
v6 = v5->getTouchDispatcher(v5);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, a1->m_list);
a3 = v14;
}
v15 = a3;
v7 = cocos2d::CCDirector::sharedDirector();
v8 = v7->getTouchDispatcher(v7);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v8, a1);
v9 = LevelLeaderboard::create(a1->m_level, a2, v15);
m_pRunningScene = cocos2d::CCDirector::sharedDirector()->m_pRunningScene;
addChild_0 = m_pRunningScene->addChild_0;
HighestChildZ = cocos2d::CCScene::getHighestChildZ(m_pRunningScene);
v13 = 105;
if ( HighestChildZ > 104 )
v13 = (unsigned int)(cocos2d::CCScene::getHighestChildZ(m_pRunningScene) + 1);
addChild_0(m_pRunningScene, v9, v13);
LevelLeaderboard::onClose(a1, nullptr);
}