//
// GameLevelManager::getLeaderboardScores from 0x3d0b5c to 0x3d0d00 (420 bytes)
//
// 1 xrefs:
// > LeaderboardsLayer::selectLeaderboard @ 0x4522ac
//
// 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 GameLevelManager::getLeaderboardScores(GameLevelManager *a1, LeaderboardType a2, LeaderboardStat a3)
{
LeaderboardStat v5; // r7
GJAccountManager *v6; // r0
LeaderboardManagerDelegate *m_leaderboardManagerDelegate; // r0
int v8; // r9
const char *v9; // r10
cocos2d::CCString *v10; // r0
const char *CString; // r0
cocos2d::CCString *v12; // r0
char *v13; // r0
char *v14; // [sp+24h] [bp-20h] BYREF
_BYTE v15[4]; // [sp+28h] [bp-1Ch] BYREF
char *v16; // [sp+2Ch] [bp-18h] BYREF
char *v17; // [sp+30h] [bp-14h] BYREF
const char *v18; // [sp+34h] [bp-10h] BYREF
char *v19; // [sp+38h] [bp-Ch] BYREF
v5 = a3;
GameLevelManager::getLeaderboardKey((int)&v14, (int)a1, (const char *)a2, a3);
if ( a2 == Friends && (v6 = GJAccountManager::sharedState(), v6->m_accountID - v6->m_unkInt1 <= 0) )
{
m_leaderboardManagerDelegate = a1->m_leaderboardManagerDelegate;
if ( m_leaderboardManagerDelegate )
m_leaderboardManagerDelegate->loadLeaderboardFailed(m_leaderboardManagerDelegate, (const unsigned __int8 *)v14);
}
else if ( !GameLevelManager::isDLActive(a1, v14) )
{
GameLevelManager::addDLToActive(a1, v14);
if ( a2 == Global )
{
v8 = 50;
v9 = "relative";
}
else
{
v8 = 100;
if ( a2 == Friends )
{
v9 = "friends";
}
else if ( a2 == Creator )
{
v9 = "creators";
}
else
{
v9 = "top";
}
}
GameManager::sharedState();
sub_775C20(v15);
GameLevelManager::getBasePostString((GameLevelManager *)&v16);
if ( a2 == Creator )
v5 = Stars;
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&aO1i2r3e45s7t89[10]);
CString = cocos2d::CCString::getCString(v10);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&type=%s&count=%i&stat=%i&secret=%s",
v9,
v8,
v5,
CString);
v13 = (char *)cocos2d::CCString::getCString(v12);
sub_774544((int)&v16, v13);
sub_776584((int)&v17, "https://www.boomlings.com/database/getGJScores20.php");
sub_776584((int)&v18, v16);
sub_775C20(&v19);
GameLevelManager::ProcessHttpRequest(a1, &v17, &v18, &v19, 11);
sub_774008(&v19);
sub_774008(&v18);
sub_774008(&v17);
sub_774008(&v16);
sub_774008(v15);
}
sub_774008(&v14);
}