//
// LeaderboardsLayer::setupLevelBrowser from 0x1402c2fa0 to 0x1402c30f8 (344 bytes)
//
// 4 xrefs:
// > LeaderboardsLayer::selectLeaderboard @ 0x1402c348b
// > LeaderboardsLayer::selectLeaderboard @ 0x1402c3530
// > LeaderboardsLayer::loadLeaderboardFinished @ 0x1402c38f5
// > ??> @ 0x1406d29f0
//
// 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 LeaderboardsLayer::setupLevelBrowser(LeaderboardsLayer *a1, cocos2d::CCArray *a2)
{
__int64 v4; // rax
cocos2d::CCTouchDispatcher *v5; // rax
cocos2d::CCDirector *v6; // rax
CustomListView *v7; // rax
GJListLayer *v8; // rax
LeaderboardsLayer_vtbl *v9; // r8
float v10; // xmm0_4
GJListLayer_vtbl *v11; // rbx
const cocos2d::CCPoint *v12; // rax
int v13; // [rsp+20h] [rbp-38h]
float v14; // [rsp+60h] [rbp+8h]
if ( a1->m_list )
{
v4 = cocos2d::CCDirector::sharedDirector(a1);
v5 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 144LL))(v4);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, a1->m_list);
a1->m_list->removeMeAndCleanup(a1->m_list);
a1->m_list = nullptr;
}
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v6);
v7 = nullptr;
if ( a2 )
v7 = CustomListView::create(a2, nullptr, 220.0, 356.0, v13, Score, 0.0);
v8 = GJListLayer::create(v7, nullptr, (cocos2d::ccColor4B)-12684609, 356.0, 220.0, 0);
v9 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_list = v8;
v10 = ((float (__fastcall *)(LeaderboardsLayer *, GJListLayer *))v9->addChild_1)(a1, v8);
v11 = a1->m_list->__vftable;
cocos2d::CCPoint::CCPoint(v10, (float)(v14 - 356.0) * 0.5);
v11->setPosition_0(a1->m_list, v12);
LeaderboardsLayer::refreshTabs(a1);
}