//
// LeaderboardsLayer::setupLevelBrowser from 0x1403dc170 to 0x1403dc2d4 (356 bytes)
//
// 4 xrefs:
// > LeaderboardsLayer::selectLeaderboard @ 0x1403dc673
// > LeaderboardsLayer::selectLeaderboard @ 0x1403dc72a
// > LeaderboardsLayer::loadLeaderboardFinished @ 0x1403dcb15
// > ??> @ 0x140924c5c
//
// 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 11:31:39 +0000
//
__int64 __fastcall LeaderboardsLayer::setupLevelBrowser(__int64 *a1, cocos2d::CCObject *a2)
{
__int64 v4; // rax
struct cocos2d::CCObject *v5; // rbx
cocos2d::CCTouchDispatcher *v6; // rax
__int64 v7; // rax
int v8; // eax
cocos2d::CCLayerColor *v9; // rax
__int64 v10; // rcx
__int64 *v11; // rdi
__int64 v12; // rbx
__int64 v13; // rax
__int64 v15; // [rsp+20h] [rbp-38h]
float v16; // [rsp+60h] [rbp+8h] BYREF
float v17; // [rsp+64h] [rbp+Ch]
char v18; // [rsp+68h] [rbp+10h] BYREF
if ( a1[53] )
{
v4 = cocos2d::CCDirector::sharedDirector(a1);
v5 = (struct cocos2d::CCObject *)a1[53];
v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 144LL))(v4);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, v5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1[53] + 528LL))(a1[53]);
a1[53] = 0;
}
v7 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v7, &v16);
v8 = 0;
if ( a2 )
v8 = (unsigned int)CustomListView::create(a2, 0, 220.0, 356.0, v15, 12);
v9 = GJListLayer::create(v8, 0, -12684609, 356.0, 1130102784, 0);
v10 = *a1;
a1[53] = (__int64)v9;
(*(void (__fastcall **)(__int64 *, cocos2d::CCLayerColor *))(v10 + 464))(a1, v9);
v11 = (__int64 *)a1[53];
v12 = *v11;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v18,
(float)(v16 - 356.0) * 0.5,
(float)((float)((float)(v17 - 220.0) * 0.5) - 10.0) + 5.0);
(*(void (__fastcall **)(__int64 *, __int64))(v12 + 184))(v11, v13);
return LeaderboardsLayer::refreshTabs(a1);
}