//
// sub_1000B5240 from 0x1000b5240 to 0x1000b5424 (484 bytes)
//
// 2 xrefs:
// > sub_1000964E4 @ 0x100096660
// > sub_10051C1D8 @ 0x10051c2f0
//
// 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:41 +0000
//
bool __fastcall sub_1000B5240(__int64 a1, int __val, const char *a3)
{
std::string *v6; // x0
__int128 v7; // q0
__int64 v8; // x19
__int64 v9; // x23
__int64 v10; // x0
__int64 v11; // x0
__int64 v12; // x0
const char *CString; // x0
__int64 v14; // x0
const std::string::value_type *v15; // x0
std::string *v16; // x1
char *v17; // x1
void *__p[2]; // [xsp+30h] [xbp-B0h] BYREF
char v20; // [xsp+47h] [xbp-99h]
void *v21[2]; // [xsp+48h] [xbp-98h] BYREF
char v22; // [xsp+5Fh] [xbp-81h]
std::string v23; // [xsp+60h] [xbp-80h] BYREF
std::string v24; // [xsp+78h] [xbp-68h] BYREF
__int128 v25; // [xsp+90h] [xbp-50h] BYREF
signed __int64 v26; // [xsp+A0h] [xbp-40h]
std::to_string(&v24, __val);
v6 = std::string::insert(&v24, 0, "lctrlup_");
v7 = *(_OWORD *)&v6->__r_.__value_.__l.__data_;
v26 = v6->__r_.__value_.__r.__words[2];
v25 = v7;
v6->__r_.__value_.__l.__size_ = 0;
v6->__r_.__value_.__r.__words[2] = 0;
v6->__r_.__value_.__r.__words[0] = 0;
if ( SHIBYTE(v24.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v24.__r_.__value_.__l.__data_);
v8 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 1088), &v25);
if ( !v8 )
{
v9 = *(_QWORD *)(a1 + 1088);
v10 = sub_1003064AC(a3);
v11 = cocos2d::CCDictionary::setObject(v9, v10, &v25);
GameLevelManager::getBasePostString(v11, &v24);
if ( a3[23] < 0 )
a3 = *(const char **)a3;
v12 = sub_1003065B0("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, "7");
CString = (const char *)cocos2d::CCString::getCString(v12);
v14 = sub_1003065B0("&levelID=%i&data=%s&secret=%s", __val, a3, CString);
v15 = (const std::string::value_type *)cocos2d::CCString::getCString(v14);
std::string::append(&v24, v15);
sub_100009900(&v23, "https://www.boomlings.com/database/uploadGJLevelControls.php");
if ( (v24.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v16 = &v24;
else
v16 = (std::string *)v24.__r_.__value_.__r.__words[0];
sub_100009900(v21, (char *)v16);
if ( v26 >= 0 )
v17 = (char *)&v25;
else
v17 = (char *)v25;
sub_100009900(__p, v17);
GameLevelManager::ProcessHttpRequest(a1, &v23, (char *)v21, (const std::string::value_type *)__p, 28);
if ( v20 < 0 )
operator delete(__p[0]);
if ( v22 < 0 )
operator delete(v21[0]);
if ( SHIBYTE(v23.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v23.__r_.__value_.__l.__data_);
if ( SHIBYTE(v24.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v24.__r_.__value_.__l.__data_);
}
if ( SHIBYTE(v26) < 0 )
operator delete((void *)v25);
return v8 == 0;
}