//
// GameLevelManager::getLevelRateInfo from 0x1000a805c to 0x1000a8210 (436 bytes)
//
// 1 xrefs:
// > GJRateLevelLayer::init @ 0x1001b14d0
//
// 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 __fastcall GameLevelManager::getLevelRateInfo(GameLevelManager *a1, int a2)
{
cocos2d::CCString *v4; // x0
char *CString; // x0
const char *v6; // x1
const char *v7; // x1
cocos2d::CCString *v8; // x0
const char *v9; // x0
cocos2d::CCString *v10; // x0
const char *v11; // x0
std::string *v12; // x1
void *__p[2]; // [xsp+30h] [xbp-A0h] BYREF
__int64 v14; // [xsp+40h] [xbp-90h]
void *v15[2]; // [xsp+50h] [xbp-80h] BYREF
char v16; // [xsp+67h] [xbp-69h]
std::string v17; // [xsp+68h] [xbp-68h] BYREF
std::string v18; // [xsp+80h] [xbp-50h] BYREF
__int128 v19; // [xsp+98h] [xbp-38h] BYREF
__int64 v20; // [xsp+A8h] [xbp-28h]
v4 = (cocos2d::CCString *)sub_100268F4C("rinfo_%i", a2);
CString = (char *)cocos2d::CCString::getCString(v4);
sub_100009900(&v19, CString);
if ( v20 >= 0 )
v6 = (const char *)&v19;
else
v6 = (const char *)v19;
if ( !GameLevelManager::isDLActive(a1, v6) )
{
if ( v20 >= 0 )
v7 = (const char *)&v19;
else
v7 = (const char *)v19;
GameLevelManager::addDLToActive(a1, v7);
GameLevelManager::getBasePostString(&v18);
v8 = (cocos2d::CCString *)sub_100268F4C("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, "7");
v9 = cocos2d::CCString::getCString(v8);
v10 = (cocos2d::CCString *)sub_100268F4C("&levelID=%i&secret=%s", a2, v9);
v11 = cocos2d::CCString::getCString(v10);
std::string::append(&v18, v11);
sub_100009900(&v17, "https://www.boomlings.com/database/getLevelRateInfo.php");
if ( (v18.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v12 = &v18;
else
v12 = (std::string *)v18.__r_.__value_.__r.__words[0];
sub_100009900(v15, (char *)v12);
if ( SHIBYTE(v20) < 0 )
{
sub_1000097D0(__p, (void *)v19, *((unsigned __int64 *)&v19 + 1));
}
else
{
*(_OWORD *)__p = v19;
v14 = v20;
}
GameLevelManager::ProcessHttpRequest(a1, &v17, (char *)v15, (const std::string::value_type *)__p, 65);
if ( SHIBYTE(v14) < 0 )
operator delete(__p[0]);
if ( v16 < 0 )
operator delete(v15[0]);
if ( SHIBYTE(v17.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v17.__r_.__value_.__l.__data_);
if ( SHIBYTE(v18.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v18.__r_.__value_.__l.__data_);
}
if ( SHIBYTE(v20) < 0 )
operator delete((void *)v19);
}