//
// sub_1000B7618 from 0x1000b7618 to 0x1000b7800 (488 bytes)
//
// 4 xrefs:
// > sub_1002E1BC4 @ 0x1002e1c98
// > LevelBrowserLayer::loadPage @ 0x100498640
// > sub_100502538 @ 0x1005026ac
// > sub_100505BBC @ 0x100505dc8
//
// 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 10:58:42 +0000
//
void __fastcall sub_1000B7618(__int64 a1, __int64 a2)
{
char *Key; // x20
__int64 v5; // x0
std::string *p_dst; // x22
int v7; // w23
int v8; // w24
__int64 v9; // x0
const char *CString; // x0
__int64 v11; // x0
const std::string::value_type *v12; // x0
std::string *v13; // x1
std::string *v14; // x1
void *__p[2]; // [xsp+38h] [xbp-A8h] BYREF
char v16; // [xsp+4Fh] [xbp-91h]
void *v17[2]; // [xsp+50h] [xbp-90h] BYREF
char v18; // [xsp+67h] [xbp-79h]
std::string v19; // [xsp+68h] [xbp-78h] BYREF
std::string __dst; // [xsp+80h] [xbp-60h] BYREF
std::string v21; // [xsp+98h] [xbp-48h] BYREF
Key = (char *)GJSearchObject::getKey(a2);
if ( !sub_1000ADBAC(a1, Key) )
{
sub_1000ADC1C(a1, Key);
GameLevelManager::getBasePostString(v5, &v21);
if ( *(char *)(a2 + 343) < 0 )
sub_1000097D0(&__dst, *(void **)(a2 + 320), *(_QWORD *)(a2 + 328));
else
__dst = *(std::string *)(a2 + 320);
if ( (__dst.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_dst = &__dst;
else
p_dst = (std::string *)__dst.__r_.__value_.__r.__words[0];
v7 = *(_DWORD *)(a2 + 316);
v8 = *(_DWORD *)(a2 + 392);
v9 = sub_1003065B0("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, "7");
CString = (const char *)cocos2d::CCString::getCString(v9);
v11 = sub_1003065B0("&str=%s&type=%i&page=%i&secret=%s", (const char *)p_dst, v7, v8, CString);
v12 = (const std::string::value_type *)cocos2d::CCString::getCString(v11);
std::string::append(&v21, v12);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
sub_1000B58CC(a2, &__dst);
if ( (__dst.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v13 = &__dst;
else
v13 = (std::string *)__dst.__r_.__value_.__r.__words[0];
std::string::append(&v21, (const std::string::value_type *)v13);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
sub_100009900(&v19, "https://www.boomlings.com/database/getGJLevelLists.php");
if ( (v21.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v14 = &v21;
else
v14 = (std::string *)v21.__r_.__value_.__r.__words[0];
sub_100009900(v17, (char *)v14);
sub_100009900(__p, Key);
GameLevelManager::ProcessHttpRequest(a1, &v19, (char *)v17, (const std::string::value_type *)__p, 66);
if ( v16 < 0 )
operator delete(__p[0]);
if ( v18 < 0 )
operator delete(v17[0]);
if ( SHIBYTE(v19.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v19.__r_.__value_.__l.__data_);
if ( SHIBYTE(v21.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v21.__r_.__value_.__l.__data_);
}
}