//
// GameLevelManager::onGetGJChallengesCompleted from 0x140167970 to 0x140168906 (3990 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x140143b49
// > ??> @ 0x1406cacf8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=23
void __fastcall GameLevelManager::onGetGJChallengesCompleted(_QWORD *a1, __int64 *a2, __int64 a3)
{
void *v5; // rcx
const void *v6; // rcx
unsigned __int64 v7; // rsi
size_t v8; // r8
int v9; // ebx
__int64 v10; // rcx
__int64 *v11; // rdi
__int64 v12; // rcx
cocos2d::CCArray *v13; // rbx
__int64 v14; // rcx
cocos2d::CCString *v15; // rax
const char *CString; // rax
size_t v17; // r8
int v18; // edi
cocos2d::CCString *v19; // rax
const char *v20; // rax
size_t v21; // r8
__int64 v22; // rcx
char *v23; // rcx
void *v24; // rcx
__int128 *v25; // rdx
__int64 v26; // r8
__int64 v27; // r9
__int64 v28; // rdx
void *v29; // rcx
__int64 v30; // xmm2_8
__int128 *v31; // r14
__int64 v32; // rbx
cocos2d::CCString *v33; // rax
char *v34; // rax
size_t v35; // r8
void **v36; // rax
void **v37; // rcx
__int64 v38; // rdx
size_t v39; // r8
void **v40; // rdx
unsigned __int64 v41; // r14
bool v42; // r12
char *v43; // r15
void **v44; // rcx
size_t v45; // rbx
size_t v46; // r8
size_t v47; // rsi
cocos2d::CCArray *v48; // rsi
__int64 v49; // rcx
void *v50; // rcx
unsigned __int64 v51; // rdx
char *v52; // rax
cocos2d::CCString *v53; // rax
int v54; // r14d
_DWORD *v55; // rbx
float v56; // xmm0_4
cocos2d::CCString *v57; // rax
int v58; // ebx
__int64 v59; // rcx
__int64 v60; // rcx
void *v61; // rcx
cocos2d::CCString *v62; // rax
const char *v63; // rax
size_t v64; // r8
__int64 v65; // rdx
int v66; // ebx
__int64 v67; // rcx
void *v68; // rcx
cocos2d::CCString *v69; // rax
int v70; // ebx
GJAccountManager *v71; // rax
__int64 v72; // rcx
cocos2d::CCString *v73; // rax
cocos2d::CCString *v74; // rax
const char *v75; // rax
size_t v76; // r8
cocos2d::CCString *v77; // rax
const char *v78; // rax
size_t v79; // r8
cocos2d::CCString *v80; // rax
const char *v81; // rax
size_t v82; // r8
GameStatsManager *v83; // rcx
GJChallengeItem *Challenge; // rsi
GameStatsManager *v85; // rcx
GJChallengeItem *QueuedChallenge; // r14
GameStatsManager *v87; // rcx
GJChallengeItem *SecondaryQueuedChallenge; // r12
__int128 *v89; // rdx
__int64 v90; // rax
GJChallengeItem *v91; // rbx
GameStatsManager *v92; // rcx
GameStatsManager *v93; // rcx
__int64 v94; // rax
__int64 v95; // rsi
cocos2d::CCString *v96; // rax
const char *v97; // rax
size_t v98; // r8
void *v99; // rcx
__int64 v100; // rbx
void (__fastcall ***v101)(_QWORD); // rcx
void *v102; // rcx
__int64 v103; // rcx
__int64 v104; // rcx
void *v105; // rcx
char *v106; // rax
void *v107; // [rsp+40h] [rbp-C0h]
void *v108; // [rsp+40h] [rbp-C0h]
void *v109; // [rsp+40h] [rbp-C0h]
int v110; // [rsp+40h] [rbp-C0h]
void *v113; // [rsp+58h] [rbp-A8h]
void *v114; // [rsp+58h] [rbp-A8h]
void *v115; // [rsp+60h] [rbp-A0h]
void *v116; // [rsp+68h] [rbp-98h]
void *v117; // [rsp+70h] [rbp-90h]
void *v118; // [rsp+80h] [rbp-80h]
void *v119; // [rsp+88h] [rbp-78h]
void *v120; // [rsp+90h] [rbp-70h]
void *Block[2]; // [rsp+A8h] [rbp-58h] BYREF
__m128i v122; // [rsp+B8h] [rbp-48h]
__int128 v123; // [rsp+C8h] [rbp-38h] BYREF
__m128i v124; // [rsp+D8h] [rbp-28h]
void *Src[2]; // [rsp+E8h] [rbp-18h] BYREF
__int64 v126; // [rsp+F8h] [rbp-8h]
unsigned __int64 v127; // [rsp+100h] [rbp+0h]
void *Buf1[2]; // [rsp+108h] [rbp+8h] BYREF
size_t v129; // [rsp+118h] [rbp+18h]
unsigned __int64 v130; // [rsp+120h] [rbp+20h]
void *Buf2[2]; // [rsp+128h] [rbp+28h] BYREF
size_t Size; // [rsp+138h] [rbp+38h]
unsigned __int64 v133; // [rsp+140h] [rbp+40h]
__int128 v134; // [rsp+148h] [rbp+48h] BYREF
__int64 v135; // [rsp+158h] [rbp+58h]
unsigned __int64 v136; // [rsp+160h] [rbp+60h]
__int64 v137[4]; // [rsp+168h] [rbp+68h] BYREF
__int128 v138; // [rsp+188h] [rbp+88h] BYREF
__int64 v139; // [rsp+198h] [rbp+98h]
__int64 v140; // [rsp+1A0h] [rbp+A0h]
__int128 v141; // [rsp+1A8h] [rbp+A8h] BYREF
__int64 v142; // [rsp+1B8h] [rbp+B8h]
__int64 v143; // [rsp+1C0h] [rbp+C0h]
__int128 v144; // [rsp+1C8h] [rbp+C8h] BYREF
__int64 v145; // [rsp+1D8h] [rbp+D8h]
__int64 v146; // [rsp+1E0h] [rbp+E0h]
_BYTE v147[48]; // [rsp+1E8h] [rbp+E8h] BYREF
Block[1] = nullptr;
v122.m128i_i64[0] = 8;
v122.m128i_i64[1] = 15;
Block[0] = (void *)0x6C6168635F746567LL;
cocos2d::CCDictionary::removeObjectForKey(a1[73], Block);
if ( v122.m128i_i64[1] > 0xFuLL )
{
v5 = Block[0];
if ( (unsigned __int64)(v122.m128i_i64[1] + 1) >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v5);
}
*(_OWORD *)Block = 0;
v122.m128i_i64[0] = 2;
v122.m128i_i64[1] = 15;
strcpy((char *)Block, "-1");
v6 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v6 = (const void *)*a2;
v7 = a2[2];
v8 = v7;
if ( v7 > 2 )
v8 = 2;
v9 = memcmp(v6, Block, v8);
if ( !v9 )
{
if ( v7 >= 2 )
v9 = v7 > 2;
else
v9 = -1;
}
if ( v9 )
{
v11 = a2;
v13 = sub_140140F70(a2, "|");
if ( cocos2d::CCArray::count(v13) < 2 )
{
v14 = a1[109];
if ( v14 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 8LL))(v14);
goto LABEL_18;
}
v15 = cocos2d::CCArray::stringAtIndex(v13, 0);
CString = cocos2d::CCString::getCString(v15);
v123 = 0;
v124 = 0u;
v17 = -1;
do
++v17;
while ( CString[v17] );
sub_14003A930(&v123, CString, v17);
v18 = 1;
v19 = cocos2d::CCArray::stringAtIndex(v13, 1u);
v20 = cocos2d::CCString::getCString(v19);
*(_OWORD *)Buf2 = 0;
Size = 0;
v133 = 0;
v21 = -1;
do
++v21;
while ( v20[v21] );
sub_14003A930(Buf2, v20, v21);
if ( v124.m128i_i64[0] < 5uLL )
{
v22 = a1[109];
if ( v22 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v22 + 8LL))(v22);
if ( v133 > 0xF )
{
v23 = (char *)Buf2[0];
if ( v133 + 1 < 0x1000 )
goto LABEL_32;
v23 = *((char **)Buf2[0] - 1);
if ( (unsigned __int64)((char *)Buf2[0] - (char *)v23 - 8) <= 0x1F )
goto LABEL_32;
goto LABEL_185;
}
LABEL_33:
if ( v124.m128i_i64[1] <= 0xFuLL )
{
LABEL_37:
v124.m128i_i64[0] = 0;
v124.m128i_i64[1] = 15;
LOBYTE(v123) = 0;
v12 = (__int64)a2;
goto LABEL_38;
}
v24 = (void *)v123;
if ( (unsigned __int64)(v124.m128i_i64[1] + 1) < 0x1000
|| (v24 = *(void **)(v123 - 8), (unsigned __int64)(v123 - (_QWORD)v24 - 8) <= 0x1F) )
{
LABEL_36:
j_j_free(v24);
goto LABEL_37;
}
LABEL_190:
invalid_parameter_noinfo_noreturn();
}
*(_OWORD *)Block = 0;
v122 = 0u;
v25 = &v123;
if ( v124.m128i_i64[1] > 0xFuLL )
v25 = (__int128 *)v123;
sub_14003A930(Block, (char *)v25 + 5, v124.m128i_i64[0] - 5);
v28 = v124.m128i_i64[1];
if ( v124.m128i_i64[1] > 0xFuLL )
{
v29 = (void *)v123;
if ( (unsigned __int64)(v124.m128i_i64[1] + 1) >= 0x1000 )
{
v29 = *(void **)(v123 - 8);
if ( (unsigned __int64)(v123 - (_QWORD)v29 - 8) > 0x1F )
goto LABEL_180;
}
j_j_free(v29);
}
v123 = *(_OWORD *)Block;
v30 = v122.m128i_i64[0];
v124 = v122;
*(_OWORD *)Src = 0;
v126 = 0;
v127 = 0;
v31 = &v123;
if ( _mm_srli_si128(v122, 8).m128i_u64[0] > 0xF )
v31 = (__int128 *)Block[0];
v32 = 0x7FFFFFFFFFFFFFFFLL;
if ( v122.m128i_i64[0] > 0x7FFFFFFFFFFFFFFFuLL )
sub_140007B50(Block[0], v28, v26, v27);
if ( v122.m128i_i64[0] > 0xFuLL )
{
if ( (v122.m128i_i64[0] | 0xFuLL) <= 0x7FFFFFFFFFFFFFFFLL )
{
v32 = v122.m128i_i64[0] | 0xF;
if ( (v122.m128i_i64[0] | 0xFuLL) < 0x16 )
v32 = 22;
}
Src[0] = sub_14003AA10(v32 + 1);
v126 = v30;
v127 = v32;
memcpy(Src[0], v31, v30 + 1);
}
else
{
v126 = v122.m128i_i64[0];
v127 = 15;
*(_OWORD *)Src = *v31;
}
v33 = cocos2d::CCString::createWithFormat("%c%s%s%c%c%s", 111, "C36", "fpYa", 80, 116, "dg");
v34 = (char *)cocos2d::CCString::getCString(v33);
v35 = -1;
do
++v35;
while ( v34[v35] );
sub_140041270(Src, v34, v35);
v36 = Src;
if ( v127 <= 0xF )
{
v37 = Src;
}
else
{
v36 = (void **)Src[0];
v37 = (void **)Src[0];
}
v38 = -1;
do
++v38;
while ( *((_BYTE *)v36 + v38) );
sub_140070860((__int64)v37, v38, Buf1);
sub_140070B30((unsigned __int8 *)Buf1, v147);
*(_OWORD *)Buf1 = 0;
v129 = 0;
v130 = 0;
v39 = -1;
do
++v39;
while ( v147[v39] );
sub_14003A930(Buf1, v147, v39);
v40 = Buf2;
v41 = v133;
v42 = v133 > 0xF;
v43 = (char *)Buf2[0];
if ( v133 > 0xF )
v40 = (void **)Buf2[0];
v44 = Buf1;
if ( v130 > 0xF )
v44 = (void **)Buf1[0];
v45 = v129;
v46 = v129;
v47 = Size;
if ( Size < v129 )
v46 = Size;
if ( memcmp(v44, v40, v46) || v45 < v47 || v45 > v47 )
{
sub_14003A830((__int64)Buf1);
v104 = a1[109];
if ( v104 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v104 + 8LL))(v104);
if ( v127 > 0xF )
{
v105 = Src[0];
if ( v127 + 1 >= 0x1000 )
{
v105 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v105 - 8) > 0x1F )
goto LABEL_180;
}
j_j_free(v105);
}
if ( v42 )
{
v106 = v43;
if ( v41 + 1 >= 0x1000 )
{
v43 = *((char **)v43 - 1);
if ( (unsigned __int64)(v106 - v43 - 8) > 0x1F )
goto LABEL_185;
}
j_j_free(v43);
}
if ( v124.m128i_i64[1] <= 0xFuLL )
goto LABEL_37;
v24 = (void *)v123;
if ( (unsigned __int64)(v124.m128i_i64[1] + 1) < 0x1000 )
goto LABEL_36;
v24 = *(void **)(v123 - 8);
if ( (unsigned __int64)(v123 - (_QWORD)v24 - 8) <= 0x1F )
goto LABEL_36;
goto LABEL_190;
}
sub_14003A830((__int64)Buf1);
*(_OWORD *)Block = 0;
v122.m128i_i64[0] = 5;
v122.m128i_i64[1] = 15;
strcpy((char *)Block, "19847");
cocos2d::ZipUtils::base64DecodeEnc(v137, &v123, Block);
v48 = sub_140140F70(v137, ":");
if ( cocos2d::CCArray::count(v48) < 9 )
{
v49 = a1[109];
if ( v49 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v49 + 8LL))(v49);
sub_14003A830((__int64)v137);
if ( v127 <= 0xF )
goto LABEL_79;
v50 = Src[0];
if ( v127 + 1 < 0x1000
|| (v50 = *((void **)Src[0] - 1), (unsigned __int64)((char *)Src[0] - (char *)v50 - 8) <= 0x1F) )
{
j_j_free(v50);
LABEL_79:
if ( !v42 )
goto LABEL_33;
v51 = v41 + 1;
goto LABEL_81;
}
LABEL_180:
invalid_parameter_noinfo_noreturn();
}
v53 = cocos2d::CCArray::stringAtIndex(v48, 1u);
v54 = cocos2d::CCString::intValue(v53);
if ( v54 <= 0 )
{
v103 = a1[107];
if ( v103 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v103 + 8LL))(v103);
LABEL_166:
sub_14003A830((__int64)v137);
if ( v127 > 0xF )
{
v102 = Src[0];
if ( v127 + 1 >= 0x1000 )
{
v102 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v102 - 8) > 0x1F )
goto LABEL_180;
}
j_j_free(v102);
}
if ( v133 <= 0xF )
goto LABEL_33;
v51 = v133 + 1;
LABEL_81:
v52 = v43;
if ( v51 < 0x1000 || (v43 = *((char **)v43 - 1), (unsigned __int64)(v52 - v43 - 8) <= 0x1F) )
{
v23 = v43;
LABEL_32:
j_j_free(v23);
goto LABEL_33;
}
LABEL_185:
invalid_parameter_noinfo_noreturn();
}
v55 = (_DWORD *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v107 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v107);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v55 = (_DWORD *)qword_1406C2ED8;
}
v55[165] = v54;
v56 = (float)((float)rand() / 32767.0) * 1000.0;
v55[164] = (int)v56;
v55[163] = v54 + (int)v56;
v57 = cocos2d::CCArray::stringAtIndex(v48, 2u);
v58 = cocos2d::CCString::intValue(v57);
v59 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v108 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v108);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v59 = qword_1406C2ED8;
}
if ( v58 != *(_DWORD *)(v59 + 888) - *(_DWORD *)(v59 + 892) )
{
v60 = a1[107];
if ( v60 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v60 + 8LL))(v60);
goto LABEL_92;
}
v62 = cocos2d::CCArray::stringAtIndex(v48, 3u);
v63 = cocos2d::CCString::getCString(v62);
v134 = 0;
v135 = 0;
v136 = 0;
v64 = -1;
do
++v64;
while ( v63[v64] );
sub_14003A930(&v134, v63, v64);
v65 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v109 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v109);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v65 = qword_1406C2ED8;
}
sub_14003BDB0((__int64)Block, v65 + 584);
v66 = sub_14003A760(&v134, Block);
sub_14003A830((__int64)Block);
if ( v66 )
{
v67 = a1[107];
if ( v67 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v67 + 8LL))(v67);
if ( v136 <= 0xF )
goto LABEL_92;
v68 = (void *)v134;
if ( v136 + 1 < 0x1000 )
goto LABEL_108;
v68 = *(void **)(v134 - 8);
if ( (unsigned __int64)(v134 - (_QWORD)v68 - 8) <= 0x1F )
goto LABEL_108;
goto LABEL_115;
}
v69 = cocos2d::CCArray::stringAtIndex(v48, 4u);
v70 = cocos2d::CCString::intValue(v69);
v71 = GJAccountManager::sharedState();
if ( v70 != v71->m_accountID - v71->m_unkInt1 )
{
v72 = a1[107];
if ( v72 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v72 + 8LL))(v72);
if ( v136 <= 0xF )
goto LABEL_92;
v68 = (void *)v134;
if ( v136 + 1 < 0x1000 || (v68 = *(void **)(v134 - 8), (unsigned __int64)(v134 - (_QWORD)v68 - 8) <= 0x1F) )
{
LABEL_108:
j_j_free(v68);
LABEL_92:
sub_14003A830((__int64)v137);
if ( v127 > 0xF )
{
v61 = Src[0];
if ( v127 + 1 >= 0x1000 )
{
v61 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v61 - 8) > 0x1F )
goto LABEL_180;
}
j_j_free(v61);
}
if ( !v42 )
goto LABEL_33;
v51 = v133 + 1;
goto LABEL_81;
}
LABEL_115:
invalid_parameter_noinfo_noreturn();
}
v73 = cocos2d::CCArray::stringAtIndex(v48, 5u);
v110 = cocos2d::CCString::intValue(v73);
v74 = cocos2d::CCArray::stringAtIndex(v48, 6u);
v75 = cocos2d::CCString::getCString(v74);
v144 = 0;
v145 = 0;
v146 = 0;
v76 = -1;
do
++v76;
while ( v75[v76] );
sub_14003A930(&v144, v75, v76);
v77 = cocos2d::CCArray::stringAtIndex(v48, 7u);
v78 = cocos2d::CCString::getCString(v77);
v141 = 0;
v142 = 0;
v143 = 0;
v79 = -1;
do
++v79;
while ( v78[v79] );
sub_14003A930(&v141, v78, v79);
v80 = cocos2d::CCArray::stringAtIndex(v48, 8u);
v81 = cocos2d::CCString::getCString(v80);
v138 = 0;
v139 = 0;
v140 = 0;
v82 = -1;
do
++v82;
while ( v81[v82] );
sub_14003A930(&v138, v81, v82);
while ( 1 )
{
v83 = (GameStatsManager *)qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v115 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0(v115);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v83 = (GameStatsManager *)qword_1406C2EE8;
}
Challenge = GameStatsManager::getChallenge(v83, v18);
v85 = (GameStatsManager *)qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v116 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0(v116);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v85 = (GameStatsManager *)qword_1406C2EE8;
}
QueuedChallenge = GameStatsManager::getQueuedChallenge(v85, v18);
v87 = (GameStatsManager *)qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v117 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0(v117);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v87 = (GameStatsManager *)qword_1406C2EE8;
}
SecondaryQueuedChallenge = GameStatsManager::getSecondaryQueuedChallenge(v87, v18);
if ( v18 == 1 )
{
v89 = &v144;
}
else
{
v89 = &v141;
if ( v18 != 2 )
v89 = &v138;
}
v90 = sub_14003BDB0((__int64)Block, (__int64)v89);
v91 = (GJChallengeItem *)GJChallengeItem::createFromString(v90);
v91->m_position = v18;
v92 = (GameStatsManager *)qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v118 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0(v118);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v92 = (GameStatsManager *)qword_1406C2EE8;
}
if ( GameStatsManager::hasCompletedChallenge(v92, v91)
|| Challenge && Challenge->m_timeLeft >= v91->m_timeLeft
|| QueuedChallenge && QueuedChallenge->m_timeLeft >= v91->m_timeLeft
|| SecondaryQueuedChallenge && SecondaryQueuedChallenge->m_timeLeft >= v91->m_timeLeft )
{
goto LABEL_160;
}
if ( !Challenge || Challenge->m_canClaim )
{
if ( QueuedChallenge )
{
v95 = qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v113 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0(v113);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v95 = qword_1406C2EE8;
}
v91->m_position = v18;
v96 = cocos2d::CCString::createWithFormat("%i", v18 + 100);
v97 = cocos2d::CCString::getCString(v96);
*(_OWORD *)Buf1 = 0;
v129 = 0;
v130 = 0;
v98 = -1;
do
++v98;
while ( v97[v98] );
sub_14003A930(Buf1, v97, v98);
cocos2d::CCDictionary::setObject(*(_QWORD *)(v95 + 560), v91, Buf1);
if ( v130 > 0xF )
{
v99 = Buf1[0];
if ( v130 + 1 >= 0x1000 )
{
v99 = *((void **)Buf1[0] - 1);
if ( (unsigned __int64)((char *)Buf1[0] - (char *)v99 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v99);
}
v129 = 0;
v130 = 15;
LOBYTE(Buf1[0]) = 0;
goto LABEL_160;
}
v93 = (GameStatsManager *)qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v120 = operator new(0x3E0u);
v94 = sub_1401D0AE0(v120);
goto LABEL_146;
}
}
else
{
v93 = (GameStatsManager *)qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v119 = operator new(0x3E0u);
v94 = sub_1401D0AE0(v119);
LABEL_146:
qword_1406C2EE8 = v94;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v94 + 72LL))(v94);
v93 = (GameStatsManager *)qword_1406C2EE8;
}
}
GameStatsManager::storeQueuedChallenge(v93, v18, v91);
LABEL_160:
if ( ++v18 > 3 )
{
v100 = qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v114 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0(v114);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v100 = qword_1406C2EE8;
}
*(double *)(v100 + 568) = sub_14003CF30() + (double)v110;
v101 = (void (__fastcall ***)(_QWORD))a1[109];
if ( v101 )
(**v101)(v101);
sub_14003A830((__int64)&v138);
sub_14003A830((__int64)&v141);
sub_14003A830((__int64)&v144);
sub_14003A830((__int64)&v134);
goto LABEL_166;
}
}
}
v10 = a1[109];
if ( v10 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 8LL))(v10);
v11 = a2;
LABEL_18:
v12 = (__int64)v11;
LABEL_38:
sub_14003A830(v12);
sub_14003A830(a3);
}