//
// GameLevelManager::getEditorSoundConfigs from 0x14022e9d0 to 0x14022ee3b (1131 bytes)
//
// 2 xrefs:
// > EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f76a
// > ??> @ 0x14091be6c
//
// 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 11:28:29 +0000
//
// Hidden C++ exception states: #wind=7
void __fastcall GameLevelManager::getEditorSoundConfigs(__int64 a1, __int64 a2)
{
_BYTE *Key; // rax
size_t v5; // r12
size_t v6; // r8
_QWORD *v7; // rax
void *v8; // rcx
void **v9; // rdx
__int64 v10; // rdx
void (__fastcall ***v11)(_QWORD, __int64, void **); // rcx
void **v12; // r8
void **v13; // rdx
void **v14; // rdx
__int64 v15; // rcx
char v16; // r15
int v17; // ebx
int v18; // edi
int v19; // esi
const char *v20; // r14
cocos2d::CCString *v21; // rax
const char *CString; // rax
cocos2d::CCString *v23; // rax
char *v24; // rax
size_t v25; // r8
__int64 v26; // rcx
void **v27; // rsi
__int64 v28; // rdi
__int64 v29; // rbx
_QWORD *v30; // rdx
void *v31; // rcx
int Reserved; // [rsp+20h] [rbp-B9h]
int v33; // [rsp+28h] [rbp-B1h]
__int128 v34; // [rsp+48h] [rbp-91h] BYREF
__int64 v35; // [rsp+58h] [rbp-81h]
__int64 v36; // [rsp+60h] [rbp-79h]
__int128 *v37; // [rsp+68h] [rbp-71h]
void *Src[2]; // [rsp+78h] [rbp-61h] BYREF
__int128 v39; // [rsp+88h] [rbp-51h]
void *Block[2]; // [rsp+98h] [rbp-41h] BYREF
__m128i si128; // [rsp+A8h] [rbp-31h]
__int128 v42; // [rsp+B8h] [rbp-21h] BYREF
__int64 v43; // [rsp+C8h] [rbp-11h]
unsigned __int64 v44; // [rsp+D0h] [rbp-9h]
_QWORD v45[4]; // [rsp+D8h] [rbp-1h] BYREF
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836540);
LODWORD(Block[0]) = 6255461;
Key = (_BYTE *)GJSearchObject::getKey(a2);
v5 = -1;
v6 = -1;
do
++v6;
while ( Key[v6] );
v7 = sub_140044D80(Block, Key, v6);
*(_OWORD *)Src = 0;
v39 = 0u;
*(_OWORD *)Src = *(_OWORD *)v7;
v39 = *((_OWORD *)v7 + 1);
v7[2] = 0;
v7[3] = 15;
*(_BYTE *)v7 = 0;
if ( si128.m128i_i64[1] > 0xFuLL )
{
v8 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
v9 = Src;
if ( *((_QWORD *)&v39 + 1) > 0xFu )
v9 = (void **)Src[0];
if ( GameLevelManager::isTimeValid(a1, v9, 600.0)
&& (v10 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 1152), Src)) != 0 )
{
v11 = *(void (__fastcall ****)(_QWORD, __int64, void **))(a1 + 1456);
if ( v11 )
{
v12 = Src;
if ( *((_QWORD *)&v39 + 1) > 0xFu )
v12 = (void **)Src[0];
(**v11)(v11, v10, v12);
}
}
else
{
v13 = Src;
if ( *((_QWORD *)&v39 + 1) > 0xFu )
v13 = (void **)Src[0];
if ( !GameLevelManager::isDLActive(a1, v13) )
{
v14 = Src;
if ( *((_QWORD *)&v39 + 1) > 0xFu )
v14 = (void **)Src[0];
GameLevelManager::addDLToActive(a1, v14);
GameLevelManager::getBasePostString(v15, v45);
v16 = *(_BYTE *)(a2 + 428);
sub_14003F4F0((__int64)&v42, a2 + 328);
v17 = *(_DWORD *)(a2 + 432);
v18 = *(_DWORD *)(a2 + 424);
v19 = *(_DWORD *)(a2 + 320);
v20 = (const char *)&v42;
if ( v44 > 0xF )
v20 = (const char *)v42;
v33 = 98;
Reserved = 103;
v21 = cocos2d::CCString::createWithFormat(
"%c%s%s%c%c%s",
87,
"mfd",
"2893",
Reserved,
v33,
(const char *)&word_14070D040);
CString = cocos2d::CCString::getCString(v21);
v23 = cocos2d::CCString::createWithFormat(
"&str=%s&type=%i&page=%i&total=%i&count=10&star=%i&secret=%s",
v20,
v19,
v18,
v17,
v16 != 0,
CString);
v24 = (char *)cocos2d::CCString::getCString(v23);
v25 = -1;
do
++v25;
while ( v24[v25] );
sub_140044D80(v45, v24, v25);
sub_14003D310((__int64)&v42);
v37 = &v42;
*(_OWORD *)Block = 0;
si128 = 0u;
v27 = Src;
if ( *((_QWORD *)&v39 + 1) > 0xFu )
v27 = (void **)Src[0];
v28 = v39;
v29 = 0x7FFFFFFFFFFFFFFFLL;
if ( (unsigned __int64)v39 > 0x7FFFFFFFFFFFFFFFLL )
sub_140009D90(v26);
if ( (unsigned __int64)v39 > 0xF )
{
if ( ((unsigned __int64)v39 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL )
{
v29 = v39 | 0xF;
if ( ((unsigned __int64)v39 | 0xF) < 0x16 )
v29 = 22;
}
Block[0] = sub_14003D460(v29 + 1);
si128.m128i_i64[0] = v28;
si128.m128i_i64[1] = v29;
memcpy(Block[0], v27, v28 + 1);
}
else
{
si128.m128i_i64[0] = v39;
si128.m128i_i64[1] = 15;
*(_OWORD *)Block = *(_OWORD *)v27;
}
v30 = v45;
if ( v45[3] > 0xFu )
v30 = (_QWORD *)v45[0];
v42 = 0;
v43 = 0;
v44 = 0;
do
++v5;
while ( *((_BYTE *)v30 + v5) );
sub_14003D230(&v42, v30, v5);
v34 = 0;
*(_QWORD *)&v34 = sub_14003D460(0x40u);
v35 = 56;
v36 = 63;
strcpy((char *)v34, "https://www.boomlings.com/database/getGJEditorSounds.php");
GameLevelManager::ProcessHttpRequest(
(cocos2d::CCActionManager **)a1,
(__int64)&v34,
(const char *)&v42,
(const char *)Block,
0x46u);
sub_14003D310((__int64)v45);
}
}
if ( *((_QWORD *)&v39 + 1) > 0xFu )
{
v31 = Src[0];
if ( (unsigned __int64)(*((_QWORD *)&v39 + 1) + 1LL) >= 0x1000 )
{
v31 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v31 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v31);
}
}