//
// GameLevelManager::getEditorSoundConfigs from 0x1000b7de8 to 0x1000b80a0 (696 bytes)
//
// 1 xrefs:
// > sub_1004CD5C0 @ 0x1004cd904
//
// 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 GameLevelManager::getEditorSoundConfigs(__int64 a1, __int64 a2)
{
const std::string::value_type *Key; // x0
std::string *v5; // x0
__int128 v6; // q0
char *v7; // x1
void (__fastcall ***v8)(_QWORD); // x0
char *v9; // x1
char *v10; // x1
__int64 v11; // x0
void **v12; // x21
int v13; // w22
int v14; // w23
int v15; // w24
int v16; // w20
__int64 v17; // x0
const char *CString; // x0
__int64 v19; // x0
const std::string::value_type *v20; // x0
std::string *v21; // x1
void *__dst[2]; // [xsp+30h] [xbp-E0h] BYREF
__int64 v23; // [xsp+40h] [xbp-D0h]
void *v24[2]; // [xsp+50h] [xbp-C0h] BYREF
char v25; // [xsp+67h] [xbp-A9h]
std::string v26; // [xsp+68h] [xbp-A8h] BYREF
void *__p[2]; // [xsp+80h] [xbp-90h] BYREF
__int64 v28; // [xsp+90h] [xbp-80h]
std::string v29; // [xsp+98h] [xbp-78h] BYREF
__int128 v30; // [xsp+B0h] [xbp-60h] BYREF
signed __int64 v31; // [xsp+C0h] [xbp-50h]
sub_100009900(&v29, "es_");
Key = (const std::string::value_type *)GJSearchObject::getKey(a2);
v5 = std::string::append(&v29, Key);
v6 = *(_OWORD *)&v5->__r_.__value_.__l.__data_;
v31 = v5->__r_.__value_.__r.__words[2];
v30 = v6;
v5->__r_.__value_.__l.__size_ = 0;
v5->__r_.__value_.__r.__words[2] = 0;
v5->__r_.__value_.__r.__words[0] = 0;
if ( SHIBYTE(v29.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v29.__r_.__value_.__l.__data_);
if ( v31 >= 0 )
v7 = (char *)&v30;
else
v7 = (char *)v30;
if ( GameLevelManager::isTimeValid(a1, v7, 600.0) && cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 1040), &v30) )
{
v8 = *(void (__fastcall ****)(_QWORD))(a1 + 1328);
if ( v8 )
(**v8)(v8);
}
else
{
if ( v31 >= 0 )
v9 = (char *)&v30;
else
v9 = (char *)v30;
if ( !sub_1000ADBAC(a1, v9) )
{
if ( v31 >= 0 )
v10 = (char *)&v30;
else
v10 = (char *)v30;
sub_1000ADC1C(a1, v10);
GameLevelManager::getBasePostString(v11, &v29);
if ( *(char *)(a2 + 343) < 0 )
{
sub_1000097D0(__p, *(void **)(a2 + 320), *(_QWORD *)(a2 + 328));
}
else
{
*(_OWORD *)__p = *(_OWORD *)(a2 + 320);
v28 = *(_QWORD *)(a2 + 336);
}
if ( v28 >= 0 )
v12 = __p;
else
v12 = (void **)__p[0];
v13 = *(_DWORD *)(a2 + 316);
v14 = *(_DWORD *)(a2 + 392);
v15 = *(_DWORD *)(a2 + 400);
v16 = *(unsigned __int8 *)(a2 + 396);
v17 = sub_1003065B0("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, "7");
CString = (const char *)cocos2d::CCString::getCString(v17);
v19 = sub_1003065B0(
"&str=%s&type=%i&page=%i&total=%i&count=10&star=%i&secret=%s",
(const char *)v12,
v13,
v14,
v15,
v16,
CString);
v20 = (const std::string::value_type *)cocos2d::CCString::getCString(v19);
std::string::append(&v29, v20);
if ( SHIBYTE(v28) < 0 )
operator delete(__p[0]);
sub_100009900(&v26, "https://www.boomlings.com/database/getGJEditorSounds.php");
if ( (v29.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v21 = &v29;
else
v21 = (std::string *)v29.__r_.__value_.__r.__words[0];
sub_100009900(v24, (char *)v21);
if ( SHIBYTE(v31) < 0 )
{
sub_1000097D0(__dst, (void *)v30, *((unsigned __int64 *)&v30 + 1));
}
else
{
*(_OWORD *)__dst = v30;
v23 = v31;
}
GameLevelManager::ProcessHttpRequest(a1, &v26, (char *)v24, (const std::string::value_type *)__dst, 70);
if ( SHIBYTE(v23) < 0 )
operator delete(__dst[0]);
if ( v25 < 0 )
operator delete(v24[0]);
if ( SHIBYTE(v26.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v26.__r_.__value_.__l.__data_);
if ( SHIBYTE(v29.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v29.__r_.__value_.__l.__data_);
}
}
if ( SHIBYTE(v31) < 0 )
operator delete((void *)v30);
}