//
// GameLevelManager::getGauntlets from 0x10055d7c0 to 0x10055d9ec (556 bytes)
//
// 2 xrefs:
// > GauntletSelectLayer::init @ 0x10059f0dd
// > GauntletSelectLayer::onRefresh @ 0x10059f363
//
// This function is hookable on this platform (idp: pc, 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:32:08 +0000
//
void __fastcall GameLevelManager::getGauntlets(__int64 a1)
{
__int64 v1; // rax
__int64 v2; // rax
const std::string::value_type *CString; // rax
const char *data; // r14
size_t v5; // rax
size_t v6; // r15
char *v7; // r12
size_t v8; // r13
char v9; // [rsp+0h] [rbp-90h]
std::string v10; // [rsp+8h] [rbp-88h] BYREF
std::string v11; // [rsp+20h] [rbp-70h] BYREF
__int128 v12; // [rsp+38h] [rbp-58h] BYREF
void *__p; // [rsp+48h] [rbp-48h]
_QWORD __dst[2]; // [rsp+50h] [rbp-40h] BYREF
void *v15; // [rsp+60h] [rbp-30h]
if ( GameLevelManager::isDLActive(a1, "get_gauntlets") )
return;
GameLevelManager::addDLToActive(a1, "get_gauntlets");
GameLevelManager::getBasePostString(&v11);
v1 = sub_10088E820("%c%s%s%c%c%s", (char)"7");
cocos2d::CCString::getCString(v1);
v2 = sub_10088E820("&secret=%s&special=1&vkey=%i", v9);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v2);
std::string::append(&v11, CString);
v10.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x38u);
v10.__r_.__value_.__r.__words[0] = 57;
v10.__r_.__value_.__l.__size_ = 55;
strcpy(v10.__r_.__value_.__l.__data_, "https://www.boomlings.com/database/getGJGauntlets21.php");
if ( (*(_BYTE *)&v11.__r_.__value_.__s.0 & 1) != 0 )
data = v11.__r_.__value_.__l.__data_;
else
data = v11.__r_.__value_.__s.__data_;
v5 = strlen(data);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
v15 = v7;
__dst[0] = v8 | 1;
__dst[1] = v6;
goto LABEL_12;
}
LOBYTE(__dst[0]) = 2 * v5;
v7 = (char *)__dst + 1;
if ( v5 )
LABEL_12:
memmove(v7, data, v6);
v7[v6] = 0;
LOBYTE(v12) = 26;
strcpy((char *)&v12 + 1, "get_gauntlets");
GameLevelManager::ProcessHttpRequest(a1, &v10, (__int64)__dst, &v12, 0x3Au);
if ( (v12 & 1) == 0 )
{
if ( (__dst[0] & 1) == 0 )
goto LABEL_15;
LABEL_20:
operator delete(v15);
if ( (*(_BYTE *)&v10.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_16:
if ( (*(_BYTE *)&v11.__r_.__value_.__s.0 & 1) == 0 )
return;
goto LABEL_17;
}
goto LABEL_21;
}
operator delete(__p);
if ( (__dst[0] & 1) != 0 )
goto LABEL_20;
LABEL_15:
if ( (*(_BYTE *)&v10.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_16;
LABEL_21:
operator delete(v10.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v11.__r_.__value_.__s.0 & 1) != 0 )
LABEL_17:
operator delete(v11.__r_.__value_.__l.__data_);
}