//
// GameLevelManager::storeThreadManifest from 0x84cb10 to 0x84d848 (3384 bytes)
//
// 3 xrefs:
// > GameLevelManager::onGetThreadMessagesCompleted @ 0x84dc60
// > GameLevelManager::onRequestThreadMembersCompleted @ 0x84e504
// > ??> @ 0x88690
//
// 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 12:55:24 +0000
//
__int64 __fastcall GameLevelManager::storeThreadManifest(_QWORD *a1, unsigned int a2, __int64 a3)
{
char v4; // w0
__int64 v5; // x0
__int64 v6; // x1
cocos2d::CCArray *v7; // x0
cocos2d::CCArray *v8; // x20
size_t v9; // x19
cocos2d::CCArray *v10; // x25
__int64 v11; // x1
cocos2d::CCArray *v12; // x24
unsigned int i; // w22
cocos2d::CCString *v14; // x0
const char *CString; // x0
size_t v16; // x0
GJUserScore *v17; // x0
cocos2d::CCDictionary *v18; // x1
__int64 v19; // x21
char v20; // w0
__int64 v21; // x2
int v22; // w26
int v23; // w21
__int64 v24; // x0
__int64 v25; // x1
__int64 v26; // x20
cocos2d::CCString *v27; // x0
size_t v28; // x0
cocos2d::CCArray *v29; // x0
__int64 v30; // x1
cocos2d::CCArray *v31; // x22
unsigned int j; // w20
cocos2d::CCString *v33; // x0
const char *v34; // x0
size_t v35; // x0
cocos2d::CCArray *v36; // x21
cocos2d::CCString *v37; // x0
int v38; // w26
cocos2d::CCString *v39; // x0
cocos2d::CCString *v40; // x0
const char *v41; // x0
size_t v42; // x0
GJUserScore *v43; // x0
__int64 v44; // x28
__int64 *v45; // x0
cocos2d::CCString *v46; // x0
cocos2d::CCString *v47; // x0
cocos2d::CCString *v48; // x0
cocos2d::CCString *v49; // x0
cocos2d::CCString *v50; // x0
cocos2d::CCString *v51; // x0
__int64 v52; // x20
cocos2d::CCString *v53; // x0
size_t v54; // x0
cocos2d::CCArray *v55; // x0
cocos2d::CCArray *v56; // x28
__int64 v57; // x1
cocos2d::CCArray *v58; // x23
unsigned int v59; // w21
cocos2d::CCString *v60; // x0
const char *v61; // x0
size_t v62; // x0
cocos2d::CCArray *v63; // x20
GJUserScore *v64; // x0
__int64 v65; // x22
cocos2d::CCString *v66; // x0
cocos2d::CCString *v67; // x0
cocos2d::CCString *v68; // x0
const char *v69; // x0
size_t v70; // x0
char *v71; // x1
size_t v72; // x2
cocos2d::CCString *v73; // x0
cocos2d::CCString *v74; // x0
cocos2d::CCString *v75; // x0
cocos2d::CCString *v76; // x0
cocos2d::CCString *v77; // x0
cocos2d::CCString *v78; // x0
cocos2d::CCString *v79; // x0
cocos2d::CCString *v80; // x0
cocos2d::CCString *v81; // x0
cocos2d::CCString *v82; // x0
cocos2d::CCString *v83; // x0
cocos2d::CCString *v84; // x0
cocos2d::CCString *v85; // x0
cocos2d::CCString *v86; // x0
__int64 v87; // x20
cocos2d::CCString *v88; // x0
size_t v89; // x0
cocos2d::CCArray *v91; // [xsp+68h] [xbp+68h]
int v93; // [xsp+8Ch] [xbp+8Ch]
char *v95; // [xsp+98h] [xbp+98h]
char *v96; // [xsp+98h] [xbp+98h]
char *v97; // [xsp+98h] [xbp+98h]
char *v98; // [xsp+98h] [xbp+98h]
char *v99; // [xsp+98h] [xbp+98h]
char *v100; // [xsp+98h] [xbp+98h]
char *v101; // [xsp+98h] [xbp+98h]
char *v102; // [xsp+98h] [xbp+98h]
__int64 v103; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v104; // [xsp+A8h] [xbp+A8h]
_BYTE *v105; // [xsp+B0h] [xbp+B0h]
__int64 v106; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v107; // [xsp+C0h] [xbp+C0h]
_BYTE *v108; // [xsp+C8h] [xbp+C8h]
__int64 v109; // [xsp+D0h] [xbp+D0h] BYREF
__int64 v110; // [xsp+D8h] [xbp+D8h]
_BYTE *v111; // [xsp+E0h] [xbp+E0h]
__int64 v112[3]; // [xsp+E8h] [xbp+E8h] BYREF
__int64 v113[3]; // [xsp+100h] [xbp+100h] BYREF
__int64 v114[3]; // [xsp+118h] [xbp+118h] BYREF
__int64 v115[3]; // [xsp+130h] [xbp+130h] BYREF
__int64 v116; // [xsp+148h] [xbp+148h] BYREF
size_t v117; // [xsp+150h] [xbp+150h]
void *v118; // [xsp+158h] [xbp+158h]
__int64 v119; // [xsp+160h] [xbp+160h] BYREF
__int64 v120; // [xsp+168h] [xbp+168h]
void *v121; // [xsp+170h] [xbp+170h]
cocos2d::CCArray *v122[2]; // [xsp+178h] [xbp+178h] BYREF
void *v123; // [xsp+188h] [xbp+188h]
__int64 v124[2]; // [xsp+190h] [xbp+190h] BYREF
void *v125; // [xsp+1A0h] [xbp+1A0h]
__int64 v126[2]; // [xsp+1A8h] [xbp+1A8h] BYREF
void *v127; // [xsp+1B8h] [xbp+1B8h]
__int64 v128; // [xsp+1C0h] [xbp+1C0h] BYREF
size_t v129; // [xsp+1C8h] [xbp+1C8h]
void *v130; // [xsp+1D0h] [xbp+1D0h]
__int64 v131; // [xsp+1D8h] [xbp+1D8h] BYREF
size_t v132; // [xsp+1E0h] [xbp+1E0h]
void *v133; // [xsp+1E8h] [xbp+1E8h]
cocos2d::CCArray *v134[2]; // [xsp+1F0h] [xbp+1F0h] BYREF
void *v135; // [xsp+200h] [xbp+200h]
__int64 v136[2]; // [xsp+208h] [xbp+208h] BYREF
void *v137; // [xsp+218h] [xbp+218h]
__int64 v138[2]; // [xsp+220h] [xbp+220h] BYREF
void *v139; // [xsp+230h] [xbp+230h]
void *v140[2]; // [xsp+238h] [xbp+238h] BYREF
void *v141; // [xsp+248h] [xbp+248h]
__int64 v142; // [xsp+250h] [xbp+250h] BYREF
size_t v143; // [xsp+258h] [xbp+258h]
void *v144; // [xsp+260h] [xbp+260h]
v4 = *(_BYTE *)a3;
v103 = 0;
v104 = 0;
v105 = nullptr;
if ( (v4 & 1) != 0 )
{
std::string::__init(&v103, *(void **)(a3 + 16), *(_QWORD *)(a3 + 8));
}
else
{
v5 = *(_QWORD *)a3;
v6 = *(_QWORD *)(a3 + 8);
v105 = *(_BYTE **)(a3 + 16);
v103 = v5;
v104 = v6;
}
v106 = 0;
v109 = 0;
v110 = 0;
v111 = nullptr;
v107 = 0;
v108 = nullptr;
v7 = (cocos2d::CCArray *)std::string::find(a3, 0x23u, 0);
v8 = v7;
if ( v7 != (cocos2d::CCArray *)-1LL )
{
std::string::basic_string(v112, a3, 0, (size_t)v7);
if ( (v103 & 1) != 0 )
{
*v105 = 0;
v104 = 0;
}
else
{
LOWORD(v103) = 0;
}
std::string::reserve(&v103, 0);
v105 = (_BYTE *)v112[2];
v103 = v112[0];
v104 = v112[1];
std::string::basic_string(v113, a3, (unsigned __int64)v8 + 1, 0xFFFFFFFFFFFFFFFFLL);
if ( (v106 & 1) != 0 )
{
*v108 = 0;
v107 = 0;
}
else
{
LOWORD(v106) = 0;
}
std::string::reserve(&v106, 0);
v108 = (_BYTE *)v113[2];
v106 = v113[0];
v107 = v113[1];
v7 = (cocos2d::CCArray *)std::string::find((__int64)&v106, 0x23u, 0);
v9 = (size_t)v7;
if ( v7 != (cocos2d::CCArray *)-1LL )
{
std::string::basic_string(v114, (__int64)&v106, (unsigned __int64)v7 + 1, 0xFFFFFFFFFFFFFFFFLL);
if ( (v109 & 1) != 0 )
{
*v111 = 0;
v110 = 0;
}
else
{
LOWORD(v109) = 0;
}
std::string::reserve(&v109, 0);
v111 = (_BYTE *)v114[2];
v109 = v114[0];
v110 = v114[1];
std::string::basic_string(v115, (__int64)&v106, 0, v9);
if ( (v106 & 1) != 0 )
{
*v108 = 0;
v107 = 0;
}
else
{
LOWORD(v106) = 0;
}
std::string::reserve(&v106, 0);
v7 = (cocos2d::CCArray *)v115[0];
v108 = (_BYTE *)v115[2];
v106 = v115[0];
v107 = v115[1];
}
}
v10 = (cocos2d::CCArray *)cocos2d::CCArray::create(v7);
v11 = (unsigned __int8)v103 >> 1;
if ( (v103 & 1) != 0 )
v11 = v104;
if ( v11 )
{
v12 = sub_80CFCC((unsigned __int8 *)&v103, "|");
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v12); ++i )
{
v14 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v12, i);
CString = (const char *)cocos2d::CCString::getCString(v14);
v142 = 0;
v143 = 0;
v144 = nullptr;
v95 = (char *)CString;
v16 = strlen(CString);
std::string::__init(&v142, v95, v16);
v116 = 0;
v117 = 0;
v118 = nullptr;
if ( (v142 & 1) != 0 )
{
std::string::__init(&v116, v144, v143);
}
else
{
v118 = v144;
v116 = v142;
v117 = v143;
}
v17 = (GJUserScore *)GameLevelManager::responseToDict((__int64)&v116, 0);
v19 = GJUserScore::create(v17, v18);
if ( (v116 & 1) != 0 )
operator delete(v118);
if ( v19 && *(int *)(v19 + 376) > 0 )
{
cocos2d::CCArray::addObject(v10, (cocos2d::CCObject *)v19);
v20 = *(_BYTE *)(v19 + 320);
v21 = v19 + 320;
v119 = 0;
v120 = 0;
v121 = nullptr;
v22 = *(_DWORD *)(v19 + 372);
v23 = *(_DWORD *)(v19 + 376);
if ( (v20 & 1) != 0 )
{
std::string::__init(&v119, *(void **)(v21 + 16), *(_QWORD *)(v21 + 8));
}
else
{
v24 = *(_QWORD *)v21;
v25 = *(_QWORD *)(v21 + 8);
v121 = *(void **)(v21 + 16);
v119 = v24;
v120 = v25;
}
GameLevelManager::storeUserName(a1, v22, v23, (char *)&v119);
if ( (v119 & 1) != 0 )
operator delete(v121);
}
if ( (v142 & 1) != 0 )
operator delete(v144);
}
}
v26 = a1[137];
v27 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a2);
v96 = (char *)cocos2d::CCString::getCString(v27);
v122[0] = nullptr;
v122[1] = nullptr;
v123 = nullptr;
v28 = strlen(v96);
std::string::__init((__int64 *)v122, v96, v28);
cocos2d::CCDictionary::setObject(v26, v10);
v29 = (cocos2d::CCArray *)LOBYTE(v122[0]);
if ( ((__int64)v122[0] & 1) != 0 )
operator delete(v123);
v91 = (cocos2d::CCArray *)cocos2d::CCArray::create(v29);
v30 = (unsigned __int8)v106 >> 1;
if ( (v106 & 1) != 0 )
v30 = v107;
if ( v30 )
{
v31 = sub_80CFCC((unsigned __int8 *)&v106, "|");
for ( j = 0; ; ++j )
{
while ( 1 )
{
if ( j >= (unsigned int)cocos2d::CCArray::count(v31) )
goto LABEL_65;
v33 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v31, j);
v34 = (const char *)cocos2d::CCString::getCString(v33);
v124[0] = 0;
v124[1] = 0;
v125 = nullptr;
v97 = (char *)v34;
v35 = strlen(v34);
std::string::__init(v124, v97, v35);
v36 = sub_80CFCC((unsigned __int8 *)v124, ":");
if ( (v124[0] & 1) != 0 )
operator delete(v125);
if ( (unsigned int)cocos2d::CCArray::count(v36) > 2 )
break;
LABEL_43:
++j;
}
v37 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v36, 0);
v38 = cocos2d::CCString::intValue(v37);
v39 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v36, 1u);
v93 = cocos2d::CCString::intValue(v39);
v40 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v36, 2u);
v41 = (const char *)cocos2d::CCString::getCString(v40);
v126[0] = 0;
v126[1] = 0;
v127 = nullptr;
v98 = (char *)v41;
v42 = strlen(v41);
std::string::__init(v126, v98, v42);
LevelTools::base64DecodeString((__int64)v126, &v142);
if ( (v126[0] & 1) != 0 )
operator delete(v127);
if ( v38 > 0 )
{
if ( (v142 & 1) != 0 )
{
if ( !v143 )
goto LABEL_54;
v128 = 0;
v129 = 0;
v130 = nullptr;
std::string::__init(&v128, v144, v143);
}
else
{
if ( !((int)(unsigned __int8)v142 >> 1) )
goto LABEL_43;
v130 = v144;
v128 = v142;
v129 = v143;
}
GameLevelManager::storeUserName(a1, v93, v38, (char *)&v128);
if ( (v128 & 1) != 0 )
operator delete(v130);
v43 = (GJUserScore *)cocos2d::CCArray::count(v36);
if ( (unsigned int)v43 > 8 )
{
v44 = GJUserScore::create(v43);
*(_DWORD *)(v44 + 376) = v38;
*(_DWORD *)(v44 + 372) = v93;
v131 = 0;
v132 = 0;
v133 = nullptr;
if ( (v142 & 1) != 0 )
{
std::string::__init(&v131, v144, v143);
}
else
{
v133 = v144;
v131 = v142;
v132 = v143;
}
v45 = (__int64 *)(v44 + 320);
if ( (__int64 *)(v44 + 320) != &v131 )
{
if ( (v131 & 1) != 0 )
std::string::assign(v45, v133, v132);
else
std::string::assign(v45, (char *)&v131 + 1, (unsigned __int8)v131 >> 1);
}
if ( (v131 & 1) != 0 )
operator delete(v133);
v46 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v36, 3u);
*(_DWORD *)(v44 + 412) = cocos2d::CCString::intValue(v46);
v47 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v36, 4u);
*(_DWORD *)(v44 + 416) = cocos2d::CCString::intValue(v47);
v48 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v36, 5u);
*(_DWORD *)(v44 + 420) = cocos2d::CCString::intValue(v48);
v49 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v36, 6u);
*(_DWORD *)(v44 + 424) = cocos2d::CCString::intValue(v49);
v50 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v36, 7u);
*(_DWORD *)(v44 + 432) = cocos2d::CCString::intValue(v50);
v51 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v36, 8u);
*(_DWORD *)(v44 + 428) = cocos2d::CCString::intValue(v51);
cocos2d::CCArray::addObject(v91, (cocos2d::CCObject *)v44);
}
}
if ( (v142 & 1) == 0 )
goto LABEL_43;
LABEL_54:
operator delete(v144);
}
}
LABEL_65:
v52 = a1[139];
v53 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a2);
v99 = (char *)cocos2d::CCString::getCString(v53);
v134[0] = nullptr;
v134[1] = nullptr;
v135 = nullptr;
v54 = strlen(v99);
std::string::__init((__int64 *)v134, v99, v54);
cocos2d::CCDictionary::setObject(v52, v91);
v55 = (cocos2d::CCArray *)LOBYTE(v134[0]);
if ( ((__int64)v134[0] & 1) != 0 )
operator delete(v135);
v56 = (cocos2d::CCArray *)cocos2d::CCArray::create(v55);
v57 = (unsigned __int8)v109 >> 1;
if ( (v109 & 1) != 0 )
v57 = v110;
if ( v57 )
{
v58 = sub_80CFCC((unsigned __int8 *)&v109, "|");
v59 = 0;
while ( v59 < (unsigned int)cocos2d::CCArray::count(v58) )
{
v60 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v58, v59);
v61 = (const char *)cocos2d::CCString::getCString(v60);
v136[0] = 0;
v136[1] = 0;
v137 = nullptr;
v100 = (char *)v61;
v62 = strlen(v61);
std::string::__init(v136, v100, v62);
v63 = sub_80CFCC((unsigned __int8 *)v136, ":");
if ( (v136[0] & 1) != 0 )
operator delete(v137);
v64 = (GJUserScore *)cocos2d::CCArray::count(v63);
if ( (unsigned int)v64 <= 3 )
goto LABEL_75;
v65 = GJUserScore::create(v64);
v66 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 0);
*(_DWORD *)(v65 + 376) = cocos2d::CCString::intValue(v66);
v67 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 1u);
*(_DWORD *)(v65 + 372) = cocos2d::CCString::intValue(v67);
v68 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 2u);
v69 = (const char *)cocos2d::CCString::getCString(v68);
v138[0] = 0;
v138[1] = 0;
v139 = nullptr;
v101 = (char *)v69;
v70 = strlen(v69);
std::string::__init(v138, v101, v70);
LevelTools::base64DecodeString((__int64)v138, v140);
if ( (void **)(v65 + 320) != v140 )
{
if ( ((__int64)v140[0] & 1) != 0 )
{
v71 = (char *)v141;
v72 = (size_t)v140[1];
}
else
{
v72 = LOBYTE(v140[0]) >> 1;
v71 = (char *)v140 + 1;
}
std::string::assign((__int64 *)(v65 + 320), v71, v72);
}
if ( ((__int64)v140[0] & 1) != 0 )
operator delete(v141);
if ( (v138[0] & 1) != 0 )
operator delete(v139);
v73 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 3u);
*(_DWORD *)(v65 + 396) = cocos2d::CCString::intValue(v73);
if ( (unsigned int)cocos2d::CCArray::count(v63) > 0x10 )
{
v74 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 4u);
*(_DWORD *)(v65 + 412) = cocos2d::CCString::intValue(v74);
v75 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 5u);
*(_DWORD *)(v65 + 416) = cocos2d::CCString::intValue(v75);
v76 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 6u);
*(_DWORD *)(v65 + 420) = cocos2d::CCString::intValue(v76);
v77 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 7u);
*(_DWORD *)(v65 + 424) = cocos2d::CCString::intValue(v77);
v78 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 8u);
*(_DWORD *)(v65 + 432) = cocos2d::CCString::intValue(v78);
v79 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 9u);
*(_DWORD *)(v65 + 428) = cocos2d::CCString::intValue(v79);
v80 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 0xAu);
*(_DWORD *)(v65 + 380) = cocos2d::CCString::intValue(v80);
v81 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 0xBu);
*(_DWORD *)(v65 + 384) = cocos2d::CCString::intValue(v81);
v82 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 0xCu);
*(_DWORD *)(v65 + 392) = cocos2d::CCString::intValue(v82);
v83 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 0xDu);
*(_DWORD *)(v65 + 404) = cocos2d::CCString::intValue(v83);
v84 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 0xEu);
*(_DWORD *)(v65 + 408) = cocos2d::CCString::intValue(v84);
v85 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 0xFu);
*(_DWORD *)(v65 + 388) = cocos2d::CCString::intValue(v85);
v86 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v63, 0x10u);
*(_DWORD *)(v65 + 456) = cocos2d::CCString::intValue(v86);
}
if ( *(int *)(v65 + 376) <= 0 )
{
LABEL_75:
++v59;
}
else
{
cocos2d::CCArray::addObject(v56, (cocos2d::CCObject *)v65);
++v59;
}
}
}
v87 = a1[138];
v88 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a2);
v102 = (char *)cocos2d::CCString::getCString(v88);
v142 = 0;
v143 = 0;
v144 = nullptr;
v89 = strlen(v102);
std::string::__init(&v142, v102, v89);
cocos2d::CCDictionary::setObject(v87, v56);
if ( (v142 & 1) != 0 )
operator delete(v144);
if ( (v109 & 1) != 0 )
operator delete(v111);
if ( (v106 & 1) != 0 )
operator delete(v108);
if ( (v103 & 1) != 0 )
operator delete(v105);
return _stack_chk_guard;
}