//
// GameLevelManager::onGetThreadsCompleted from 0x4c7b54 to 0x4c8196 (1602 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x4db734
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:50:33 +0000
//
int __fastcall GameLevelManager::onGetThreadsCompleted(_DWORD *a1, unsigned __int8 *a2, char *a3)
{
const char *v3; // r5
cocos2d::CCDictionary *v6; // r6
char v8; // r2
size_t v9; // r0
int v10; // r0
size_t v11; // r8
_BOOL4 v12; // r6
int result; // r0
cocos2d::CCArray *v14; // r4
cocos2d::CCString *v15; // r0
cocos2d::CCString *v16; // r0
cocos2d::CCString *v17; // r0
cocos2d::CCString *v18; // r0
cocos2d::CCArray *v19; // r0
cocos2d::CCString *v20; // r0
int v21; // r3
void (__fastcall ***v22)(_DWORD, cocos2d::CCArray *, int, int, int); // r0
unsigned int v23; // r8
cocos2d::CCString *v24; // r0
const char *CString; // r4
size_t v26; // r0
cocos2d::CCArray *v27; // r5
GJMessageThread *v28; // r0
int v29; // r4
cocos2d::CCString *v30; // r0
cocos2d::CCString *v31; // r0
cocos2d::CCString *v32; // r0
size_t v33; // r0
int v34; // r0
int v35; // r1
int v36; // r2
cocos2d::CCString *v37; // r0
const char *v38; // r0
size_t v39; // r0
int v40; // r0
int v41; // r1
int v42; // r2
cocos2d::CCString *v43; // r0
cocos2d::CCString *v44; // r0
cocos2d::CCString *v45; // r0
char *v46; // r0
cocos2d::CCString *v47; // r0
cocos2d::CCString *v48; // r0
size_t v49; // r0
int v50; // r0
int v51; // r1
int v52; // r2
cocos2d::CCString *v53; // r0
cocos2d::CCString *v54; // r0
cocos2d::CCString *v55; // r0
cocos2d::CCString *v56; // r0
cocos2d::CCString *v57; // r0
cocos2d::CCString *v58; // r0
cocos2d::CCString *v59; // r0
cocos2d::CCString *v60; // r0
cocos2d::CCString *v61; // r0
cocos2d::CCString *v62; // r0
cocos2d::CCString *v63; // r0
cocos2d::CCString *v64; // r0
cocos2d::CCString *v65; // r0
size_t v66; // r0
int v67; // r1
int v68; // r2
cocos2d::CCString *v69; // r0
char *v70; // r0
cocos2d::CCString *v71; // r0
const char *v72; // r0
cocos2d::CCString *v73; // r0
cocos2d::CCString *v74; // r0
int v75; // r0
int v76; // [sp+8h] [bp-ACh]
int v77; // [sp+Ch] [bp-A8h]
int v78; // [sp+10h] [bp-A4h]
cocos2d::CCArray *v79; // [sp+14h] [bp-A0h]
cocos2d::CCArray *v80; // [sp+18h] [bp-9Ch]
const char *v81; // [sp+24h] [bp-90h]
const char *v82; // [sp+24h] [bp-90h]
const char *v83; // [sp+24h] [bp-90h]
const char *v84; // [sp+24h] [bp-90h]
int v85[3]; // [sp+28h] [bp-8Ch] BYREF
int v86[3]; // [sp+34h] [bp-80h] BYREF
int v87[3]; // [sp+40h] [bp-74h] BYREF
int v88[3]; // [sp+4Ch] [bp-68h] BYREF
int v89; // [sp+58h] [bp-5Ch] BYREF
int v90; // [sp+5Ch] [bp-58h]
int v91; // [sp+60h] [bp-54h]
int v92[3]; // [sp+64h] [bp-50h] BYREF
int v93; // [sp+70h] [bp-44h] BYREF
int v94; // [sp+74h] [bp-40h]
int v95; // [sp+78h] [bp-3Ch]
int v96[3]; // [sp+7Ch] [bp-38h] BYREF
int v97; // [sp+88h] [bp-2Ch] BYREF
int v98; // [sp+8Ch] [bp-28h]
int v99; // [sp+90h] [bp-24h]
int v100[3]; // [sp+94h] [bp-20h] BYREF
int v101; // [sp+A0h] [bp-14h] BYREF
int v102; // [sp+A4h] [bp-10h]
int v103; // [sp+A8h] [bp-Ch]
v6 = (cocos2d::CCDictionary *)a1[187];
v8 = *a3;
v101 = 0;
v102 = 0;
if ( (v8 & 1) == 0 )
v3 = a3 + 1;
v103 = 0;
if ( (v8 & 1) != 0 )
v3 = *((const char **)a3 + 2);
v9 = strlen(v3);
std::string::__init(&v101, v3, v9);
cocos2d::CCDictionary::removeObjectForKey(v6);
std::string::~string((int)&v101);
v10 = std::string::find(a2, 35, 0);
v101 = 0;
v102 = 0;
v103 = 0;
v11 = v10;
std::string::__init(&v101, "-1", 2u);
v12 = sub_4A9CC4(a2, (unsigned __int8 *)&v101);
if ( !v12 )
v12 = v11 == -1;
std::string::~string((int)&v101);
if ( v12 )
{
result = a1[210];
if ( result )
return (*(int (__fastcall **)(int))(*(_DWORD *)result + 4))(result);
}
else
{
std::string::basic_string(v85, a2, 0, v11);
std::string::basic_string(v86, a2, v11 + 1, 0xFFFFFFFF);
v14 = sub_4C1A88(v86, ":");
std::string::~string((int)v86);
if ( cocos2d::CCArray::count(v14) <= 2u )
{
v78 = 20;
v76 = 0;
v77 = 0;
}
else
{
v15 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v14, 0);
v77 = cocos2d::CCString::intValue(v15);
v16 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v14, 1u);
v76 = cocos2d::CCString::intValue(v16);
v17 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v14, 2u);
v78 = cocos2d::CCString::intValue(v17);
}
if ( cocos2d::CCArray::count(v14) > 3u )
{
v18 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v14, 3u);
a1[87] = cocos2d::CCString::intValue(v18);
}
v19 = (cocos2d::CCArray *)cocos2d::CCArray::count(v14);
if ( (unsigned int)v19 > 4 )
{
v20 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v14, 4u);
v19 = (cocos2d::CCArray *)cocos2d::CCString::intValue(v20);
a1[88] = v19;
}
v79 = (cocos2d::CCArray *)cocos2d::CCArray::create(v19);
if ( (v85[0] & 1) != 0 )
v21 = v85[1];
else
v21 = (int)LOBYTE(v85[0]) >> 1;
if ( v21 )
{
v23 = 0;
v80 = sub_4C1A88(v85, "|");
while ( v23 < cocos2d::CCArray::count(v80) )
{
v24 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v80, v23);
CString = (const char *)cocos2d::CCString::getCString(v24);
memset(v87, 0, sizeof(v87));
v26 = strlen(CString);
std::string::__init(v87, CString, v26);
v27 = sub_4C1A88(v87, ":");
std::string::~string((int)v87);
v28 = (GJMessageThread *)cocos2d::CCArray::count(v27);
if ( (unsigned int)v28 > 6 )
{
v29 = GJMessageThread::create(v28);
v30 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0);
*(_DWORD *)(v29 + 52) = cocos2d::CCString::intValue(v30);
v31 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 1u);
*(_DWORD *)(v29 + 56) = cocos2d::CCString::intValue(v31);
v32 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 2u);
v81 = (const char *)cocos2d::CCString::getCString(v32);
memset(v88, 0, sizeof(v88));
v33 = strlen(v81);
std::string::__init(v88, v81, v33);
LevelTools::base64DecodeString(&v89, v88);
if ( (*(_BYTE *)(v29 + 60) & 1) != 0 )
{
**(_BYTE **)(v29 + 68) = 0;
*(_DWORD *)(v29 + 64) = 0;
}
else
{
*(_BYTE *)(v29 + 61) = 0;
*(_BYTE *)(v29 + 60) = 0;
}
std::string::reserve((int *)(v29 + 60), 0);
v34 = v89;
v35 = v90;
v36 = v91;
v89 = 0;
v90 = 0;
v91 = 0;
*(_DWORD *)(v29 + 60) = v34;
*(_DWORD *)(v29 + 64) = v35;
*(_DWORD *)(v29 + 68) = v36;
std::string::~string((int)&v89);
std::string::~string((int)v88);
v37 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 3u);
v38 = (const char *)cocos2d::CCString::getCString(v37);
memset(v92, 0, sizeof(v92));
v82 = v38;
v39 = strlen(v38);
std::string::__init(v92, v82, v39);
LevelTools::base64DecodeString(&v93, v92);
if ( (*(_BYTE *)(v29 + 72) & 1) != 0 )
{
**(_BYTE **)(v29 + 80) = 0;
*(_DWORD *)(v29 + 76) = 0;
}
else
{
*(_BYTE *)(v29 + 73) = 0;
*(_BYTE *)(v29 + 72) = 0;
}
std::string::reserve((int *)(v29 + 72), 0);
v40 = v93;
v41 = v94;
v42 = v95;
v93 = 0;
v94 = 0;
v95 = 0;
*(_DWORD *)(v29 + 72) = v40;
*(_DWORD *)(v29 + 76) = v41;
*(_DWORD *)(v29 + 80) = v42;
std::string::~string((int)&v93);
std::string::~string((int)v92);
v43 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 4u);
*(_DWORD *)(v29 + 84) = cocos2d::CCString::intValue(v43);
v44 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 5u);
*(_DWORD *)(v29 + 88) = cocos2d::CCString::intValue(v44);
v45 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 6u);
v46 = (char *)cocos2d::CCString::getCString(v45);
std::string::assign((int *)(v29 + 104), v46);
if ( cocos2d::CCArray::count(v27) > 9u )
{
v47 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 7u);
*(_DWORD *)(v29 + 116) = cocos2d::CCString::intValue(v47);
v48 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 8u);
v83 = (const char *)cocos2d::CCString::getCString(v48);
memset(v96, 0, sizeof(v96));
v49 = strlen(v83);
std::string::__init(v96, v83, v49);
LevelTools::base64DecodeString(&v97, v96);
if ( (*(_BYTE *)(v29 + 120) & 1) != 0 )
{
**(_BYTE **)(v29 + 128) = 0;
*(_DWORD *)(v29 + 124) = 0;
}
else
{
*(_BYTE *)(v29 + 121) = 0;
*(_BYTE *)(v29 + 120) = 0;
}
std::string::reserve((int *)(v29 + 120), 0);
v50 = v97;
v51 = v98;
v52 = v99;
v97 = 0;
v98 = 0;
v99 = 0;
*(_DWORD *)(v29 + 120) = v50;
*(_DWORD *)(v29 + 124) = v51;
*(_DWORD *)(v29 + 128) = v52;
std::string::~string((int)&v97);
std::string::~string((int)v96);
v53 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 9u);
*(_DWORD *)(v29 + 132) = cocos2d::CCString::intValue(v53);
}
if ( cocos2d::CCArray::count(v27) > 0xAu )
{
v54 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0xAu);
*(_BYTE *)(v29 + 136) = cocos2d::CCString::intValue(v54) != 0;
}
if ( cocos2d::CCArray::count(v27) > 0xBu )
{
v55 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0xBu);
*(_DWORD *)(v29 + 140) = cocos2d::CCString::intValue(v55);
}
if ( cocos2d::CCArray::count(v27) > 0xDu )
{
v56 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0xCu);
*(_BYTE *)(v29 + 168) = cocos2d::CCString::intValue(v56) != 0;
v57 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0xDu);
*(_BYTE *)(v29 + 169) = cocos2d::CCString::intValue(v57) != 0;
}
if ( cocos2d::CCArray::count(v27) > 0xEu )
{
v58 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0xEu);
*(_BYTE *)(v29 + 178) = cocos2d::CCString::intValue(v58) != 0;
}
if ( cocos2d::CCArray::count(v27) > 0x14u )
{
*(_BYTE *)(v29 + 209) = 1;
v59 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0xFu);
*(_DWORD *)(v29 + 212) = cocos2d::CCString::intValue(v59);
v60 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0x10u);
*(_DWORD *)(v29 + 216) = cocos2d::CCString::intValue(v60);
v61 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0x11u);
*(_DWORD *)(v29 + 220) = cocos2d::CCString::intValue(v61);
v62 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0x12u);
*(_DWORD *)(v29 + 224) = cocos2d::CCString::intValue(v62);
v63 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0x13u);
*(_DWORD *)(v29 + 228) = cocos2d::CCString::intValue(v63);
v64 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0x14u);
*(_DWORD *)(v29 + 232) = cocos2d::CCString::intValue(v64);
}
if ( cocos2d::CCArray::count(v27) > 0x15u )
{
v65 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0x15u);
v84 = (const char *)cocos2d::CCString::getCString(v65);
memset(v100, 0, sizeof(v100));
v66 = strlen(v84);
std::string::__init(v100, v84, v66);
LevelTools::base64DecodeString(&v101, v100);
if ( (*(_BYTE *)(v29 + 144) & 1) != 0 )
{
**(_BYTE **)(v29 + 152) = 0;
*(_DWORD *)(v29 + 148) = 0;
}
else
{
*(_BYTE *)(v29 + 145) = 0;
*(_BYTE *)(v29 + 144) = 0;
}
std::string::reserve((int *)(v29 + 144), 0);
v67 = v102;
v68 = v103;
*(_DWORD *)(v29 + 144) = v101;
*(_DWORD *)(v29 + 148) = v67;
*(_DWORD *)(v29 + 152) = v68;
v101 = 0;
v102 = 0;
v103 = 0;
std::string::~string((int)&v101);
std::string::~string((int)v100);
}
if ( cocos2d::CCArray::count(v27) > 0x16u )
{
v69 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0x16u);
v70 = (char *)cocos2d::CCString::getCString(v69);
std::string::assign((int *)(v29 + 156), v70);
}
if ( cocos2d::CCArray::count(v27) > 0x17u )
{
v71 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0x17u);
v72 = (const char *)cocos2d::CCString::getCString(v71);
*(_QWORD *)(v29 + 184) = atoll(v72);
}
if ( cocos2d::CCArray::count(v27) > 0x18u )
{
v73 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0x18u);
*(_DWORD *)(v29 + 192) = cocos2d::CCString::intValue(v73);
}
if ( cocos2d::CCArray::count(v27) <= 0x19u )
{
if ( *(_BYTE *)(v29 + 169) )
*(_DWORD *)(v29 + 172) = 2;
}
else
{
v74 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v27, 0x19u);
v75 = cocos2d::CCString::intValue(v74);
*(_DWORD *)(v29 + 172) = v75;
*(_BYTE *)(v29 + 169) = v75 == 2;
}
cocos2d::CCArray::addObject(v79, (cocos2d::CCObject *)v29);
}
++v23;
}
}
v22 = (void (__fastcall ***)(_DWORD, cocos2d::CCArray *, int, int, int))a1[210];
if ( v22 )
(**v22)(v22, v79, v77, v76, v78);
return std::string::~string((int)v85);
}
return result;
}