//
// LeaderboardsLayer::refreshTabs from 0x563020 to 0x563072 (82 bytes)
//
// 2 xrefs:
// > LeaderboardsLayer::setupLevelBrowser @ 0x56316c
// > LeaderboardsLayer::toggleTabButtons @ 0x5632fe
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:52:26 +0000
//
unsigned int __fastcall LeaderboardsLayer::refreshTabs(cocos2d::CCArray **this)
{
unsigned int v2; // r5
unsigned int result; // r0
int v4; // r0
int v5; // r4
cocos2d::CCDirector *v6; // r0
void (__fastcall *v7)(int, int); // r7
int v8; // r0
int v9; // r0
v2 = 0;
while ( 1 )
{
result = cocos2d::CCArray::count(*(this + 91));
if ( v2 >= result )
break;
v4 = cocos2d::CCArray::objectAtIndex(*(this + 91), v2++);
v5 = v4;
v6 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int, _DWORD))(*(_DWORD *)v4 + 500))(v4, 0);
v7 = *(void (__fastcall **)(int, int))(*(_DWORD *)v5 + 512);
v8 = cocos2d::CCDirector::sharedDirector(v6);
v9 = (*(int (__fastcall **)(int))(*(_DWORD *)v8 + 80))(v8);
v7(v5, *(_DWORD *)(v9 + 100) - 1);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v5 + 500))(v5, 1);
}
return result;
}