//
// GameLevelManager::getLevelLists from 0x14022db00 to 0x14022dd83 (643 bytes)
//
// 5 xrefs:
// > LevelBadgePopup::init @ 0x1400e60d3
// > LevelPickerPopup::doPageRequest @ 0x1400ea33f
// > LevelBrowserLayer::loadPage @ 0x1403e475d
// > LevelListLayer::onRefreshLevelList @ 0x14042e6aa
// > ??> @ 0x14091be3c
//
// 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=4
void __fastcall GameLevelManager::getLevelLists(cocos2d::CCActionManager **a1, __int64 a2)
{
_BYTE *Key; // r14
__int64 v5; // rcx
int v6; // ebx
int v7; // edi
const char *v8; // rsi
cocos2d::CCString *v9; // rax
const char *CString; // rax
cocos2d::CCString *v11; // rax
char *v12; // rax
size_t v13; // rbx
size_t v14; // r8
__int64 v15; // rcx
_QWORD *v16; // rax
size_t v17; // r8
size_t v18; // r8
_QWORD *v19; // rdx
int v20; // [rsp+20h] [rbp-99h]
int v21; // [rsp+28h] [rbp-91h]
__int128 v22; // [rsp+48h] [rbp-71h] BYREF
__int64 v23; // [rsp+58h] [rbp-61h]
__int64 v24; // [rsp+60h] [rbp-59h]
__int128 v25; // [rsp+68h] [rbp-51h] BYREF
__int64 v26; // [rsp+78h] [rbp-41h]
__int64 v27; // [rsp+80h] [rbp-39h]
__int128 *v28; // [rsp+88h] [rbp-31h]
__int128 v29; // [rsp+98h] [rbp-21h] BYREF
__int64 v30; // [rsp+A8h] [rbp-11h]
unsigned __int64 v31; // [rsp+B0h] [rbp-9h]
_QWORD Src[4]; // [rsp+B8h] [rbp-1h] BYREF
Key = (_BYTE *)GJSearchObject::getKey(a2);
if ( !GameLevelManager::isDLActive((__int64)a1, Key) )
{
GameLevelManager::addDLToActive((__int64)a1, Key);
GameLevelManager::getBasePostString(v5, Src);
sub_14003F4F0((__int64)&v29, a2 + 328);
v6 = *(_DWORD *)(a2 + 424);
v7 = *(_DWORD *)(a2 + 320);
v8 = (const char *)&v29;
if ( v31 > 0xF )
v8 = (const char *)v29;
v21 = 98;
v20 = 103;
v9 = cocos2d::CCString::createWithFormat("%c%s%s%c%c%s", 87, "mfd", "2893", v20, v21, (const char *)&word_14070D040);
CString = cocos2d::CCString::getCString(v9);
v11 = cocos2d::CCString::createWithFormat("&str=%s&type=%i&page=%i&secret=%s", v8, v7, v6, CString);
v12 = (char *)cocos2d::CCString::getCString(v11);
v13 = -1;
v14 = -1;
do
++v14;
while ( v12[v14] );
sub_140044D80(Src, v12, v14);
sub_14003D310((__int64)&v29);
v16 = GameLevelManager::writeSpecialFilters(v15, &v29, a2);
if ( v16[3] > 0xFu )
v16 = (_QWORD *)*v16;
v17 = -1;
do
++v17;
while ( *((_BYTE *)v16 + v17) );
sub_140044D80(Src, v16, v17);
sub_14003D310((__int64)&v29);
v28 = &v29;
v25 = 0;
v26 = 0;
v27 = 0;
v18 = -1;
do
++v18;
while ( Key[v18] );
sub_14003D230(&v25, Key, v18);
v19 = Src;
if ( Src[3] > 0xFu )
v19 = (_QWORD *)Src[0];
v29 = 0;
v30 = 0;
v31 = 0;
do
++v13;
while ( *((_BYTE *)v19 + v13) );
sub_14003D230(&v29, v19, v13);
v22 = 0;
*(_QWORD *)&v22 = sub_14003D460(0x40u);
v23 = 54;
v24 = 63;
strcpy((char *)v22, "https://www.boomlings.com/database/getGJLevelLists.php");
GameLevelManager::ProcessHttpRequest(a1, (__int64)&v22, (const char *)&v29, (const char *)&v25, 0x42u);
sub_14003D310((__int64)Src);
}
}