//
// LevelLeaderboard::reloadLeaderboard from 0x1003c8d20 to 0x1003c8df3 (211 bytes)
//
// 2 xrefs:
// > LevelLeaderboard::onChangeMode @ 0x1003c82fd
// > LevelLeaderboard::onChangeType @ 0x1003c8543
//
// 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:29:35 +0000
//
__int64 __fastcall LevelLeaderboard::reloadLeaderboard(_QWORD *a1, __int64 a2, unsigned int a3)
{
unsigned int v4; // r15d
_QWORD *v5; // rbx
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // rax
__int64 v9; // rax
__int64 v10; // rdi
char *v11; // r14
__int64 v12; // r15
int HighestChildZ; // eax
__int64 v14; // rdx
v4 = a2;
v5 = a1;
if ( a1[88] )
{
v6 = cocos2d::CCDirector::sharedDirector(a1, a2);
v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 160LL))(v6);
a2 = a1[88];
a1 = (_QWORD *)v7;
cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, a2);
}
v8 = cocos2d::CCDirector::sharedDirector(a1, a2);
v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 160LL))(v8);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v9, v5);
v10 = v5[85];
v11 = LevelLeaderboard::create(v10, v4, a3);
v12 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector(v10, v4) + 272);
HighestChildZ = cocos2d::CCScene::getHighestChildZ(v12);
v14 = 105;
if ( HighestChildZ >= 105 )
v14 = (unsigned int)cocos2d::CCScene::getHighestChildZ(v12) + 1;
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)v12 + 464LL))(v12, v11, v14);
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v5 + 1072LL))(v5, 0);
return (*(__int64 (__fastcall **)(_QWORD *, __int64))(*v5 + 528LL))(v5, 1);
}