//
// LeaderboardsLayer::refreshTabs from 0x1005148f0 to 0x100514985 (149 bytes)
//
// 2 xrefs:
// > LeaderboardsLayer::setupLevelBrowser @ 0x1005148dc
// > LeaderboardsLayer::toggleTabButtons @ 0x100514b74
//
// 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:31:37 +0000
//
__int64 __fastcall LeaderboardsLayer::refreshTabs(__int64 a1)
{
__int64 result; // rax
unsigned int v2; // r14d
__int64 v3; // r15
__int64 v4; // rax
__int64 v5; // rax
result = sub_1007FEF90(*(_QWORD *)(a1 + 496));
if ( (_DWORD)result )
{
v2 = 0;
do
{
v3 = sub_1007FEFE0(*(_QWORD *)(a1 + 496), v2);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 1000LL))(v3, 0);
v4 = cocos2d::CCDirector::sharedDirector();
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 160LL))(v4);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 1024LL))(v3, (unsigned int)(*(_DWORD *)(v5 + 128) - 1));
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 1000LL))(v3, 1);
++v2;
result = sub_1007FEF90(*(_QWORD *)(a1 + 496));
}
while ( v2 < (unsigned int)result );
}
return result;
}