//
// GameLevelManager::getLevelRateInfo from 0x8289a4 to 0x828c78 (724 bytes)
//
// 2 xrefs:
// > GJRateLevelLayer::init @ 0x952b10
// > ??> @ 0xbec18
//
// This function is hookable on this platform (idp: arm, 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 12:55:05 +0000
//
__int64 __fastcall GameLevelManager::getLevelRateInfo(GameLevelManager *this, const char *a2)
{
unsigned int v3; // w22
cocos2d::CCString *v4; // x0
size_t v5; // x0
char *v6; // x1
char *v7; // x1
cocos2d::CCString *v8; // x0
__int64 v9; // x0
cocos2d::CCString *v10; // x0
size_t v11; // x0
const char *v12; // x1
size_t v13; // x0
char *CString; // [xsp+48h] [xbp+48h]
char *v16; // [xsp+48h] [xbp+48h]
char *v17; // [xsp+48h] [xbp+48h]
__int64 v18; // [xsp+50h] [xbp+50h] BYREF
size_t v19; // [xsp+58h] [xbp+58h]
char *v20; // [xsp+60h] [xbp+60h]
__int64 v21[2]; // [xsp+68h] [xbp+68h] BYREF
void *v22; // [xsp+78h] [xbp+78h]
__int64 v23[2]; // [xsp+80h] [xbp+80h] BYREF
void *v24; // [xsp+90h] [xbp+90h]
__int64 v25[2]; // [xsp+98h] [xbp+98h] BYREF
void *v26; // [xsp+A8h] [xbp+A8h]
__int64 v27; // [xsp+B0h] [xbp+B0h] BYREF
size_t v28; // [xsp+B8h] [xbp+B8h]
void *v29; // [xsp+C0h] [xbp+C0h]
v3 = (unsigned int)a2;
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"rinfo_%i", a2);
v18 = 0;
CString = (char *)cocos2d::CCString::getCString(v4);
v19 = 0;
v20 = nullptr;
v5 = strlen(CString);
std::string::__init(&v18, CString, v5);
v6 = (char *)&v18 + 1;
if ( (v18 & 1) != 0 )
v6 = v20;
if ( !GameLevelManager::isDLActive(this, v6) )
{
v7 = (char *)&v18 + 1;
if ( (v18 & 1) != 0 )
v7 = v20;
GameLevelManager::addDLToActive(this, v7);
GameLevelManager::getBasePostString(v21);
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfd",
"2893",
103,
98,
"7");
v9 = cocos2d::CCString::getCString(v8);
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&levelID=%i&secret=%s",
(const char *)v3,
v9);
v16 = (char *)cocos2d::CCString::getCString(v10);
v11 = strlen(v16);
std::string::append((__int64)v21, v16, v11);
v23[0] = 0;
v23[1] = 0;
v24 = nullptr;
std::string::__init(v23, "https://www.boomlings.com/database/getLevelRateInfo.php", 0x37u);
v12 = (char *)v21 + 1;
if ( (v21[0] & 1) != 0 )
v12 = (const char *)v22;
v17 = (char *)v12;
v25[0] = 0;
v25[1] = 0;
v26 = nullptr;
v13 = strlen(v12);
std::string::__init(v25, v17, v13);
v27 = 0;
v28 = 0;
v29 = nullptr;
if ( (v18 & 1) != 0 )
{
std::string::__init(&v27, v20, v19);
}
else
{
v27 = v18;
v28 = v19;
v29 = v20;
}
GameLevelManager::ProcessHttpRequest(this, v23, (__int64)v25, (char *)&v27, 76);
if ( (v27 & 1) != 0 )
operator delete(v29);
if ( (v25[0] & 1) != 0 )
operator delete(v26);
if ( (v23[0] & 1) != 0 )
operator delete(v24);
if ( (v21[0] & 1) != 0 )
operator delete(v22);
}
if ( (v18 & 1) != 0 )
operator delete(v20);
return _stack_chk_guard;
}