//
// sub_10053C050 from 0x10053c050 to 0x10053cd57 (3335 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x10051d8ff
//
// 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 12:31:55 +0000
//
int __fastcall sub_10053C050(__int64 a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
unsigned __int8 *v5; // rsi
unsigned int v6; // r15d
unsigned __int8 *v7; // rbx
std::string::size_type v8; // r15
size_t v9; // r13
char *data; // r12
unsigned __int64 v11; // r15
std::string::pointer v12; // rbx
const void *v13; // r15
unsigned __int64 v14; // rcx
char *v15; // rbx
size_t v16; // rdx
int result; // eax
__int64 v18; // rdi
__int64 (__fastcall ***v19)(_QWORD, __int64, _QWORD, _QWORD, __int64); // rbx
__int64 v20; // rax
size_t v21; // rax
std::string::size_type v22; // r14
char *v23; // r12
__int64 v24; // rdi
size_t v25; // r13
__int64 v26; // r14
__int64 v27; // rdi
__int64 v28; // rax
const char *CString; // r12
size_t v30; // rax
std::string::size_type v31; // r15
char *v32; // r13
size_t v33; // r14
__int64 v34; // r15
__int64 v35; // rax
__int64 v36; // rdi
unsigned int v37; // eax
int v38; // ecx
__int64 v39; // rax
const char *v40; // r15
size_t v41; // rax
std::string::size_type v42; // r14
size_t v43; // r12
const char *v44; // rsi
__int64 v45; // rbx
__int64 v46; // rdi
unsigned int v47; // r15d
const char *v48; // r14
__int64 v49; // rax
const char *v50; // r14
size_t v51; // rax
size_t v52; // rbx
char *v53; // r15
__int64 v54; // rax
size_t v55; // r12
char *v56; // r14
void *v57; // rax
int v58; // eax
void *v59; // rax
void *v60; // rax
const std::string::value_type *v61; // rax
void *v62; // rax
const char *v63; // r15
size_t v64; // rax
std::string::size_type v65; // r12
char *v66; // r13
__int64 v67; // rax
size_t v68; // rbx
void *v69; // rax
const char *v70; // r15
size_t v71; // rax
std::string::size_type v72; // r12
char *v73; // r13
__int64 v74; // rax
size_t v75; // rbx
__m128 v76; // xmm0
void *v77; // rax
const std::string::value_type *v78; // rax
void *v79; // rax
void *v80; // rax
void *v81; // rax
void *v82; // rax
const std::string::value_type *v83; // rax
_BYTE *v84; // r15
void *v85; // rax
void *v86; // rax
void *v87; // rax
void *v88; // rax
void *v89; // rax
void *v90; // rax
const std::string::value_type *v91; // rax
__int64 v92; // rbx
__int64 v93; // rax
unsigned int v94; // eax
__int64 v95; // rax
__int64 v96; // rax
__int64 v97; // rax
__int64 (__fastcall ***v98)(_QWORD, __int64, _QWORD, _QWORD, _QWORD); // rdi
__int64 (__fastcall **v99)(); // [rsp+0h] [rbp-E0h]
__int64 v100; // [rsp+8h] [rbp-D8h]
__int64 v101; // [rsp+10h] [rbp-D0h]
_QWORD __dst[2]; // [rsp+18h] [rbp-C8h] BYREF
void *__p; // [rsp+28h] [rbp-B8h]
std::string v104; // [rsp+30h] [rbp-B0h] BYREF
std::string v105; // [rsp+48h] [rbp-98h] BYREF
unsigned int v106; // [rsp+60h] [rbp-80h]
unsigned int v107; // [rsp+64h] [rbp-7Ch]
__int16 v108; // [rsp+68h] [rbp-78h] BYREF
char v109; // [rsp+6Ah] [rbp-76h]
void *v110; // [rsp+78h] [rbp-68h]
unsigned int v111; // [rsp+84h] [rbp-5Ch]
__int64 v112; // [rsp+88h] [rbp-58h]
unsigned int v113; // [rsp+94h] [rbp-4Ch]
__int64 v114; // [rsp+98h] [rbp-48h]
std::string __s2[2]; // [rsp+A0h] [rbp-40h] BYREF
if ( (*a3 & 1) != 0 )
v5 = *((unsigned __int8 **)a3 + 2);
else
v5 = a3 + 1;
v112 = a1;
GameLevelManager::removeDLFromActive(a1, v5);
v6 = *a3;
if ( (v6 & 1) != 0 )
{
v11 = *((_QWORD *)a3 + 1);
if ( v11 > 0xD )
{
v7 = *((unsigned __int8 **)a3 + 2);
v8 = v11 - 14;
if ( v8 >= 0x17 )
goto LABEL_7;
LABEL_12:
data = __s2[0].__r_.__value_.__s.__data_;
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v8);
if ( !v8 )
goto LABEL_14;
goto LABEL_13;
}
LABEL_157:
sub_100056810();
}
if ( (unsigned __int8)v6 < 0x1Cu )
goto LABEL_157;
v7 = a3 + 1;
v8 = (v6 >> 1) - 14LL;
if ( v8 < 0x17 )
goto LABEL_12;
LABEL_7:
v9 = 26;
if ( (v8 | 7) != 0x17 )
v9 = (v8 | 7) + 1;
data = (char *)operator new(v9);
__s2[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__s2[0].__r_.__value_.__r.__words[0] = v9 + 1;
__s2[0].__r_.__value_.__l.__size_ = v8;
LABEL_13:
memmove(data, v7 + 14, v8);
LABEL_14:
data[v8] = 0;
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
{
v12 = __s2[0].__r_.__value_.__l.__data_;
v113 = atoi(__s2[0].__r_.__value_.__l.__data_);
operator delete(v12);
}
else
{
v113 = atoi(__s2[0].__r_.__value_.__s.__data_);
}
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4;
strcpy(__s2[0].__r_.__value_.__s.__data_, "-1");
v13 = a2 + 1;
v14 = *a2 >> 1;
if ( (*a2 & 1) != 0 )
v13 = *((const void **)a2 + 2);
v15 = __s2[0].__r_.__value_.__s.__data_;
if ( (*a2 & 1) != 0 )
v14 = *((_QWORD *)a2 + 1);
v16 = 2;
if ( v14 < 2 )
v16 = v14;
if ( !((v14 != 2) | (memcmp(v13, (char *)&__s2[0].__r_.__value_.__l.0 + 1, v16) != 0)) )
{
result = v112;
v18 = *(_QWORD *)(v112 + 456);
if ( v18 )
return (*(__int64 (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v18 + 8LL))(v18, v113, 0xFFFFFFFFLL);
return result;
}
result = atoi((const char *)v13);
if ( result == -2 )
{
result = v112;
v19 = *(__int64 (__fastcall ****)(_QWORD, __int64, _QWORD, _QWORD, __int64))(v112 + 456);
if ( v19 )
{
v20 = sub_1007FE900(v13);
return (**v19)(v19, v20, v113, 0, 10);
}
return result;
}
if ( result < 0 )
{
v24 = *(_QWORD *)(v112 + 456);
if ( v24 )
return (*(__int64 (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)v24 + 8LL))(
v24,
v113,
(unsigned int)result);
return result;
}
v21 = strlen((const char *)v13);
if ( v21 >= 0xFFFFFFFFFFFFFFF8LL )
LABEL_156:
sub_100003630();
v22 = v21;
if ( v21 >= 0x17 )
{
v25 = 26;
if ( (v21 | 7) != 0x17 )
v25 = (v21 | 7) + 1;
v23 = (char *)operator new(v25);
__s2[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v23;
__s2[0].__r_.__value_.__r.__words[0] = v25 + 1;
__s2[0].__r_.__value_.__l.__size_ = v22;
goto LABEL_39;
}
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v21);
v23 = __s2[0].__r_.__value_.__s.__data_;
if ( v21 )
LABEL_39:
memmove(v23, v13, v22);
v23[v22] = 0;
v26 = sub_10053FBE0(__s2, "#");
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1007FEF90(v26) <= 1 )
{
result = v112;
v27 = *(_QWORD *)(v112 + 456);
if ( v27 )
return (*(__int64 (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v27 + 8LL))(v27, v113, 0xFFFFFFFFLL);
return result;
}
v28 = cocos2d::CCArray::stringAtIndex(v26, 1);
CString = (const char *)cocos2d::CCString::getCString(v28);
v30 = strlen(CString);
if ( v30 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_156;
v31 = v30;
if ( v30 >= 0x17 )
{
v114 = v26;
v33 = 26;
if ( (v30 | 7) != 0x17 )
v33 = (v30 | 7) + 1;
v32 = (char *)operator new(v33);
__s2[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v32;
__s2[0].__r_.__value_.__r.__words[0] = v33 + 1;
v26 = v114;
__s2[0].__r_.__value_.__l.__size_ = v31;
goto LABEL_52;
}
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v30);
v32 = __s2[0].__r_.__value_.__s.__data_;
if ( v30 )
LABEL_52:
memmove(v32, CString, v31);
v32[v31] = 0;
v34 = sub_10053FBE0(__s2, ":");
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1007FEF90(v34) )
{
v35 = cocos2d::CCArray::stringAtIndex(v34, 0);
v111 = cocos2d::CCString::intValue(v35);
}
else
{
v111 = 0;
}
v36 = v34;
v37 = sub_1007FEF90(v34);
v38 = 10;
if ( v37 >= 3 )
{
v36 = cocos2d::CCArray::stringAtIndex(v34, 2);
v38 = cocos2d::CCString::intValue(v36);
}
v107 = v38;
v101 = sub_1007FE900(v36);
v39 = cocos2d::CCArray::stringAtIndex(v26, 0);
v40 = (const char *)cocos2d::CCString::getCString(v39);
v41 = strlen(v40);
if ( v41 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_156;
v42 = v41;
if ( v41 >= 0x17 )
{
v43 = 26;
if ( (v41 | 7) != 0x17 )
v43 = (v41 | 7) + 1;
v15 = (char *)operator new(v43);
__s2[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v15;
__s2[0].__r_.__value_.__r.__words[0] = v43 + 1;
__s2[0].__r_.__value_.__l.__size_ = v42;
}
else
{
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v41);
if ( !v41 )
goto LABEL_68;
}
memmove(v15, v40, v42);
LABEL_68:
v15[v42] = 0;
v44 = "|";
v45 = sub_10053FBE0(__s2, "|");
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
v46 = v45;
if ( (unsigned int)sub_1007FEF90(v45) )
{
v99 = off_100B6FEB8;
v47 = 0;
v100 = v45;
while ( 1 )
{
v49 = cocos2d::CCArray::stringAtIndex(v45, v47);
v50 = (const char *)cocos2d::CCString::getCString(v49);
v51 = strlen(v50);
if ( v51 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_156;
v52 = v51;
v106 = v47;
if ( v51 >= 0x17 )
break;
LOBYTE(__dst[0]) = 2 * v51;
v53 = (char *)__dst + 1;
if ( v51 )
goto LABEL_82;
LABEL_83:
v53[v52] = 0;
v114 = GameLevelManager::responseToDict(__dst, 0);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
v56 = (char *)operator new(0xF8u);
*(_OWORD *)v56 = 0;
*((_OWORD *)v56 + 1) = 0;
*((_OWORD *)v56 + 2) = 0;
*((_OWORD *)v56 + 3) = 0;
*((_OWORD *)v56 + 4) = 0;
*((_OWORD *)v56 + 5) = 0;
*((_OWORD *)v56 + 6) = 0;
*((_OWORD *)v56 + 7) = 0;
*((_OWORD *)v56 + 8) = 0;
*((_OWORD *)v56 + 9) = 0;
*((_OWORD *)v56 + 10) = 0;
*((_OWORD *)v56 + 11) = 0;
*((_OWORD *)v56 + 12) = 0;
*((_OWORD *)v56 + 13) = 0;
*((_OWORD *)v56 + 14) = 0;
*((_QWORD *)v56 + 30) = 0;
cocos2d::CCObject::CCObject((__int64)v56);
*(_QWORD *)v56 = v99;
*((_QWORD *)v56 + 7) = &_mh_execute_header;
*(_QWORD *)(v56 + 164) = 0;
*((_OWORD *)v56 + 14) = 0;
*((_QWORD *)v56 + 30) = 0;
*((_OWORD *)v56 + 4) = 0;
*((_OWORD *)v56 + 5) = 0;
*((_OWORD *)v56 + 6) = 0;
*((_OWORD *)v56 + 7) = 0;
*((_OWORD *)v56 + 8) = 0;
*((_OWORD *)v56 + 9) = 0;
v56[160] = 0;
*((_OWORD *)v56 + 11) = 0;
*((_OWORD *)v56 + 12) = 0;
*(_OWORD *)(v56 + 204) = 0;
cocos2d::CCObject::autorelease((__int64)v56);
*(_WORD *)&__s2[0].__r_.__value_.__l.0 = 12546;
__s2[0].__r_.__value_.__s.__data_[1] = 0;
v44 = (const char *)__s2;
v57 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
v58 = cocos2d::CCString::intValue(v57);
*((_DWORD *)v56 + 14) = v58;
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
{
operator delete(__s2[0].__r_.__value_.__l.__data_);
v58 = *((_DWORD *)v56 + 14);
}
if ( v58 <= 0 )
goto LABEL_74;
*(_WORD *)&__s2[0].__r_.__value_.__l.0 = 12802;
__s2[0].__r_.__value_.__s.__data_[1] = 0;
v59 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
*((_DWORD *)v56 + 15) = cocos2d::CCString::intValue(v59);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
*(_WORD *)&__s2[0].__r_.__value_.__l.0 = 13058;
__s2[0].__r_.__value_.__s.__data_[1] = 0;
v60 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
v61 = (const std::string::value_type *)cocos2d::CCString::getCString(v60);
std::string::assign((std::string *)(v56 + 64), v61);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
v108 = 13314;
v109 = 0;
v62 = cocos2d::CCDictionary::valueForKey(v114, (__int64)&v108);
v63 = (const char *)cocos2d::CCString::getCString(v62);
v64 = strlen(v63);
if ( v64 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v65 = v64;
if ( v64 >= 0x17 )
{
v67 = v64 | 7;
v68 = 26;
if ( (v65 | 7) != 0x17 )
v68 = v67 + 1;
v66 = (char *)operator new(v68);
v104.__r_.__value_.__r.__words[2] = (std::string::size_type)v66;
v104.__r_.__value_.__r.__words[0] = v68 | 1;
v104.__r_.__value_.__l.__size_ = v65;
LABEL_99:
memmove(v66, v63, v65);
goto LABEL_100;
}
v104.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v64);
v66 = v104.__r_.__value_.__s.__data_;
if ( v64 )
goto LABEL_99;
LABEL_100:
v66[v65] = 0;
LevelTools::base64DecodeString(__s2, &v104);
if ( (v56[88] & 1) != 0 )
operator delete(*((void **)v56 + 13));
*(std::string *)(v56 + 88) = __s2[0];
*(_WORD *)&__s2[0].__r_.__value_.__l.0 = 0;
if ( (*(_BYTE *)&v104.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v104.__r_.__value_.__l.__data_);
if ( (v108 & 1) != 0 )
operator delete(v110);
v108 = 13570;
v109 = 0;
v69 = cocos2d::CCDictionary::valueForKey(v114, (__int64)&v108);
v70 = (const char *)cocos2d::CCString::getCString(v69);
v71 = strlen(v70);
if ( v71 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v72 = v71;
if ( v71 >= 0x17 )
{
v74 = v71 | 7;
v75 = 26;
if ( (v72 | 7) != 0x17 )
v75 = v74 + 1;
v73 = (char *)operator new(v75);
v105.__r_.__value_.__r.__words[2] = (std::string::size_type)v73;
v105.__r_.__value_.__r.__words[0] = v75 | 1;
v105.__r_.__value_.__l.__size_ = v72;
LABEL_113:
memmove(v73, v70, v72);
goto LABEL_114;
}
v105.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v71);
v73 = v105.__r_.__value_.__s.__data_;
if ( v71 )
goto LABEL_113;
LABEL_114:
v73[v72] = 0;
LevelTools::base64DecodeString(__s2, &v105);
if ( (v56[112] & 1) != 0 )
operator delete(*((void **)v56 + 16));
*((_QWORD *)v56 + 16) = __s2[0].__r_.__value_.__l.__data_;
v76 = *(__m128 *)&__s2[0].__r_.__value_.__l.0;
*((_OWORD *)v56 + 7) = *(_OWORD *)&__s2[0].__r_.__value_.__l.0;
*(_WORD *)&__s2[0].__r_.__value_.__l.0 = 0;
if ( (*(_BYTE *)&v105.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v105.__r_.__value_.__l.__data_);
if ( (v108 & 1) != 0 )
operator delete(v110);
*(_WORD *)&__s2[0].__r_.__value_.__l.0 = 13826;
__s2[0].__r_.__value_.__s.__data_[1] = 0;
v77 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
v78 = (const std::string::value_type *)cocos2d::CCString::getCString(v77);
std::string::assign((std::string *)(v56 + 136), v78);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
*(_WORD *)&__s2[0].__r_.__value_.__l.0 = 14082;
__s2[0].__r_.__value_.__s.__data_[1] = 0;
v79 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
v56[160] = cocos2d::CCString::boolValue(v79);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
*(_WORD *)&__s2[0].__r_.__value_.__l.0 = 14338;
__s2[0].__r_.__value_.__s.__data_[1] = 0;
v80 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
*((_DWORD *)v56 + 41) = cocos2d::CCString::intValue(v80);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
*(_WORD *)&__s2[0].__r_.__value_.__l.0 = 14594;
__s2[0].__r_.__value_.__s.__data_[1] = 0;
v81 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
*((_DWORD *)v56 + 42) = cocos2d::CCString::intValue(v81);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4;
strcpy(__s2[0].__r_.__value_.__s.__data_, "10");
v82 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
v83 = (const std::string::value_type *)cocos2d::CCString::getCString(v82);
v84 = v56 + 176;
std::string::assign((std::string *)(v56 + 176), v83);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4;
strcpy(__s2[0].__r_.__value_.__s.__data_, "11");
v85 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
*((_DWORD *)v56 + 50) = cocos2d::CCString::intValue(v85);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4;
strcpy(__s2[0].__r_.__value_.__s.__data_, "12");
v86 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
*((_DWORD *)v56 + 51) = cocos2d::CCString::intValue(v86);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4;
strcpy(__s2[0].__r_.__value_.__s.__data_, "13");
v87 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
*((_DWORD *)v56 + 52) = cocos2d::CCString::intValue(v87);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4;
strcpy(__s2[0].__r_.__value_.__s.__data_, "14");
v88 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
*((_DWORD *)v56 + 53) = cocos2d::CCString::intValue(v88);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4;
strcpy(__s2[0].__r_.__value_.__s.__data_, "15");
v89 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
*((_DWORD *)v56 + 54) = cocos2d::CCString::intValue(v89);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
__s2[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4;
strcpy(__s2[0].__r_.__value_.__s.__data_, "16");
v90 = cocos2d::CCDictionary::valueForKey(v114, (__int64)__s2);
v91 = (const std::string::value_type *)cocos2d::CCString::getCString(v90);
std::string::assign((std::string *)(v56 + 224), v91);
if ( (*(_BYTE *)&__s2[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s2[0].__r_.__value_.__l.__data_);
v44 = v56;
sub_1007FEBF0(v101, v56);
if ( *((int *)v56 + 50) > 0 )
{
v92 = GameStatsManager::sharedState();
v93 = sub_10088E820("%i", (char)v99);
v44 = (const char *)cocos2d::CCString::getCString(v93);
GameStatsManager::setStatIfHigher(v92, v44, *((_DWORD *)v56 + 51), v76);
}
v94 = (unsigned __int8)*v84;
if ( (v94 & 1) != 0 )
{
if ( *((_QWORD *)v56 + 23) )
{
LABEL_148:
v95 = GameManager::sharedState();
if ( (*v84 & 1) != 0 )
v48 = *((const char **)v56 + 24);
else
v48 = v56 + 177;
v44 = v48;
GameManager::reportAchievementWithID(v95, v48, 100, 0);
}
}
else if ( v94 >> 1 )
{
goto LABEL_148;
}
LABEL_74:
v47 = v106 + 1;
v45 = v100;
v46 = v100;
if ( v47 >= (unsigned int)sub_1007FEF90(v100) )
goto LABEL_150;
}
v54 = v51 | 7;
v55 = 26;
if ( (v52 | 7) != 0x17 )
v55 = v54 + 1;
v53 = (char *)operator new(v55);
__p = v53;
__dst[0] = v55 + 1;
__dst[1] = v52;
LABEL_82:
memmove(v53, v50, v52);
goto LABEL_83;
}
LABEL_150:
if ( !v113 )
{
v96 = GJAccountManager::sharedState(v46, (__int64)v44);
v97 = cocos2d::CCDictionary::objectForKey_1(
*(_QWORD *)(v112 + 1120),
*(int *)(v96 + 352) - (__int64)*(int *)(v96 + 356));
if ( v97 )
*(_QWORD *)(v97 + 704) = 0;
}
result = v112;
v98 = *(__int64 (__fastcall ****)(_QWORD, __int64, _QWORD, _QWORD, _QWORD))(v112 + 456);
if ( v98 )
return (**v98)(v98, v101, v113, v111, v107);
return result;
}