//
// GameLevelManager::getMapPacks from 0x10009dfec to 0x10009e140 (340 bytes)
//
// 1 xrefs:
// > LevelBrowserLayer::loadPage @ 0x1004171e4
//
// 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::getMapPacks(GameLevelManager *a1, GJSearchObject *a2)
{
char *Key; // x20
int m_page; // w21
cocos2d::CCString *v6; // x0
const char *CString; // x0
cocos2d::CCString *v8; // x0
const char *v9; // x0
std::string *v10; // x1
void *__p[2]; // [xsp+30h] [xbp-80h] BYREF
char v12; // [xsp+47h] [xbp-69h]
void *v13[2]; // [xsp+48h] [xbp-68h] BYREF
char v14; // [xsp+5Fh] [xbp-51h]
std::string v15; // [xsp+60h] [xbp-50h] BYREF
std::string v16; // [xsp+78h] [xbp-38h] BYREF
Key = (char *)GJSearchObject::getKey(a2);
if ( !GameLevelManager::isDLActive(a1, Key) )
{
GameLevelManager::addDLToActive(a1, Key);
GameLevelManager::getBasePostString(&v16);
m_page = a2->m_page;
v6 = (cocos2d::CCString *)sub_100268F4C("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, "7");
CString = cocos2d::CCString::getCString(v6);
v8 = (cocos2d::CCString *)sub_100268F4C("&page=%i&secret=%s", m_page, CString);
v9 = cocos2d::CCString::getCString(v8);
std::string::append(&v16, v9);
sub_100009900(&v15, "https://www.boomlings.com/database/getGJMapPacks21.php");
if ( (v16.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v10 = &v16;
else
v10 = (std::string *)v16.__r_.__value_.__r.__words[0];
sub_100009900(v13, (char *)v10);
sub_100009900(__p, Key);
GameLevelManager::ProcessHttpRequest(a1, &v15, (char *)v13, (const std::string::value_type *)__p, 3);
if ( v12 < 0 )
operator delete(__p[0]);
if ( v14 < 0 )
operator delete(v13[0]);
if ( SHIBYTE(v15.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v15.__r_.__value_.__l.__data_);
if ( SHIBYTE(v16.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v16.__r_.__value_.__l.__data_);
}
}