//
// sub_1000B9080 from 0x1000b9080 to 0x1000b9270 (496 bytes)
//
// 1 xrefs:
// > GauntletLayer::init @ 0x1002ce898
//
// 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_1000B9080(__int64 a1, int a2)
{
__int64 v4; // x0
char *CString; // x0
char *v6; // x1
char *v7; // x1
__int64 v8; // x0
__int64 v9; // x0
const std::string::value_type *v10; // x0
__int64 v11; // x0
const std::string::value_type *v12; // x0
std::string *v13; // x1
char *v14; // x1
void *__p[2]; // [xsp+30h] [xbp-B0h] BYREF
char v16; // [xsp+47h] [xbp-99h]
void *v17[2]; // [xsp+48h] [xbp-98h] BYREF
char v18; // [xsp+5Fh] [xbp-81h]
void *v19[2]; // [xsp+60h] [xbp-80h] BYREF
char v20; // [xsp+77h] [xbp-69h]
std::string v21; // [xsp+78h] [xbp-68h] BYREF
std::string v22; // [xsp+90h] [xbp-50h] BYREF
void *v23[2]; // [xsp+A8h] [xbp-38h] BYREF
char v24; // [xsp+BFh] [xbp-21h]
v4 = sub_1003065B0("gauntlet_%i", a2);
CString = (char *)cocos2d::CCString::getCString(v4);
sub_100009900(v23, CString);
if ( v24 >= 0 )
v6 = (char *)v23;
else
v6 = (char *)v23[0];
if ( !sub_1000ADBAC(a1, v6) )
{
if ( v24 >= 0 )
v7 = (char *)v23;
else
v7 = (char *)v23[0];
sub_1000ADC1C(a1, v7);
GameLevelManager::getBasePostString(v8, &v22);
std::string::append(&v22, "&gauntlet=");
v9 = sub_1003065B0("%i", a2);
v10 = (const std::string::value_type *)cocos2d::CCString::getCString(v9);
std::string::append(&v22, v10);
std::string::append(&v22, "&secret=");
v11 = sub_1003065B0("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, "7");
v12 = (const std::string::value_type *)cocos2d::CCString::getCString(v11);
std::string::append(&v22, v12);
sub_100009900(v19, "aHR0cDovL3d3dy5ib29tbGluZ3MuY29tL2RhdGFiYXNlL2dldEdKTGV2ZWxzMjEucGhw");
LevelTools::base64DecodeString(&v21, v19);
if ( (v22.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v13 = &v22;
else
v13 = (std::string *)v22.__r_.__value_.__r.__words[0];
sub_100009900(v17, (char *)v13);
if ( v24 >= 0 )
v14 = (char *)v23;
else
v14 = (char *)v23[0];
sub_100009900(__p, v14);
GameLevelManager::ProcessHttpRequest(a1, &v21, (char *)v17, (const std::string::value_type *)__p, 2);
if ( v16 < 0 )
operator delete(__p[0]);
if ( v18 < 0 )
operator delete(v17[0]);
if ( SHIBYTE(v21.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v21.__r_.__value_.__l.__data_);
if ( v20 < 0 )
operator delete(v19[0]);
if ( SHIBYTE(v22.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v22.__r_.__value_.__l.__data_);
}
if ( v24 < 0 )
operator delete(v23[0]);
}