//
// LeaderboardsLayer::onInfo from 0x81d96c to 0x81dd44 (984 bytes)
//
// 3 xrefs:
// > ??> @ 0x9dbf0
// > LeaderboardsLayer::init @ 0x81f1b8
// > ??> @ 0x122d658
//
// 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::onInfo(LeaderboardsLayer *a1, cocos2d::CCObject *a2)
{
char *v3; // x0
__int64 v4; // x1
void *v5; // x0
double v6; // d0
__int64 v7; // x23
FLAlertLayer *v8; // x22
void *v9; // x0
char *v10; // x0
unsigned int *v11; // x1
int v12; // w2
double v13; // d0
double v14; // d0
double v15; // d0
unsigned int *v16; // x1
int v17; // w2
unsigned int *v18; // x1
int v19; // w2
unsigned int *v20; // x1
unsigned int *v21; // x1
int v22; // w2
__int64 v23; // [xsp+50h] [xbp+50h] BYREF
char *v24; // [xsp+58h] [xbp+58h] BYREF
__int64 v25; // [xsp+60h] [xbp+60h] BYREF
sub_D153B8((int)&v23, &byte_F288A0);
sub_D153B8((int)&v24, &byte_F288A0);
switch ( a1->m_type )
{
case Top100:
*(_QWORD *)&v14 = sub_D1798C(&v23, "Top 100", 7).n128_u64[0];
sub_D1798C(
&v24,
"The Top 100 leaderboard shows the players with the most Stars in the game. Players must be m"
"anually whitelisted by a Leaderboard Moderator to appear here, ensuring legitimate rankings.",
208,
v14);
goto LABEL_7;
case Global:
*(_QWORD *)&v13 = sub_D1798C(&v23, "Global", 6).n128_u64[0];
sub_D1798C(
&v24,
"The Global leaderboard shows players in order of Stars.\n"
"Players banned by Leaderboard Moderators are excluded.",
126,
v13);
goto LABEL_7;
case Creator:
*(_QWORD *)&v6 = sub_D1798C(&v23, "Creators", 8).n128_u64[0];
sub_D1798C(
&v24,
"The Creators leaderboard is sorted by amount of Creator Points. Creating a rated level rewards 1, Fe"
"atured rewards 2, Epic rewards 3, Legendary rewards 4, and Mythic rewards 5.",
216,
v6);
goto LABEL_7;
case Friends:
*(_QWORD *)&v15 = sub_D1798C(&v23, "Friends", 7).n128_u64[0];
sub_D1798C(&v24, "The Friends leaderboard shows your friends in order of Stars.", 77, v15);
LABEL_7:
v7 = v23;
sub_D153B8((int)&v25, v24);
v8 = FLAlertLayer::create((int)a1 + 416, v7, (__int64)&v25);
v9 = (void *)(v25 - 24);
if ( (__int64 *)(v25 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v18 = (unsigned int *)(v25 - 8);
do
v19 = __ldaxr(v18);
while ( __stlxr(v19 - 1, v18) );
}
else
{
v19 = *(_DWORD *)(v25 - 8);
*(_DWORD *)(v25 - 8) = v19 - 1;
}
if ( v19 <= 0 )
operator delete(v9);
}
v8->show(v8);
v10 = v24 - 24;
if ( v24 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v16 = (unsigned int *)(v24 - 8);
do
v17 = __ldaxr(v16);
while ( __stlxr(v17 - 1, v16) );
}
else
{
v17 = *((_DWORD *)v24 - 2);
*((_DWORD *)v24 - 2) = v17 - 1;
}
if ( v17 <= 0 )
operator delete(v10);
}
v4 = v23;
v5 = (void *)(v23 - 24);
if ( (__int64 *)(v23 - 24) == &qword_124B6B0 )
return;
if ( !&pthread_create )
goto LABEL_37;
v11 = (unsigned int *)(v23 - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
break;
default:
v3 = v24 - 24;
if ( v24 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v21 = (unsigned int *)(v24 - 8);
do
v22 = __ldaxr(v21);
while ( __stlxr(v22 - 1, v21) );
}
else
{
v22 = *((_DWORD *)v24 - 2);
*((_DWORD *)v24 - 2) = v22 - 1;
}
if ( v22 <= 0 )
operator delete(v3);
}
v4 = v23;
v5 = (void *)(v23 - 24);
if ( (__int64 *)(v23 - 24) == &qword_124B6B0 )
return;
if ( &pthread_create )
{
v20 = (unsigned int *)(v23 - 8);
do
v12 = __ldaxr(v20);
while ( __stlxr(v12 - 1, v20) );
}
else
{
LABEL_37:
v12 = *(_DWORD *)(v4 - 8);
*(_DWORD *)(v4 - 8) = v12 - 1;
}
break;
}
if ( v12 <= 0 )
operator delete(v5);
}