//
// sub_1005349A0 from 0x1005349a0 to 0x100535fb8 (5656 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x10051e3c0
//
// 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:52 +0000
//
void __fastcall sub_1005349A0(__int64 a1, const std::string *a2, const std::string *a3)
{
const std::string *v4; // r15
const char *data; // r12
size_t v6; // rax
size_t v7; // r13
_BYTE *v8; // rbx
size_t v9; // r15
std::string::size_type v10; // rax
std::string::pointer v11; // r14
__int64 v12; // rax
std::string::value_type *v13; // r14
unsigned __int64 size; // rcx
std::string::pointer v15; // rdi
size_t v16; // rdx
std::string::size_type v17; // rax
size_t v18; // r13
unsigned int v19; // r12d
size_t v20; // r12
std::string::pointer v21; // rsi
__int64 v22; // rdi
char *v23; // rbx
unsigned int v24; // r12d
std::string::size_type v25; // r12
std::string::pointer v26; // r15
size_t v27; // r15
size_t v28; // r13
size_t v29; // r12
char *v30; // rbx
std::string::size_type v31; // r13
size_t v32; // r13
unsigned int v33; // eax
std::string::size_type v34; // rax
std::string::size_type v35; // r13
size_t v36; // rbx
char *v37; // r15
size_t v38; // r12
__int64 v39; // rax
__int64 v40; // rax
__int64 v41; // rax
__int64 v42; // rax
__int64 v43; // rax
__int64 v44; // rax
__int64 v45; // rax
const std::string::value_type *CString; // rax
__int64 v47; // rax
const char *v48; // rax
__int64 v49; // rax
__int64 v50; // rax
const char *v51; // rbx
size_t v52; // rax
std::string::size_type v53; // r14
char *v54; // r15
size_t v55; // r12
__int64 v56; // rax
const std::string::value_type *v57; // rax
__int64 v58; // rax
const char *v59; // rbx
size_t v60; // rax
std::string::size_type v61; // r14
char *v62; // r15
size_t v63; // r12
__int64 v64; // r12
unsigned int v65; // eax
__int64 v66; // rax
const char *v67; // r15
size_t v68; // rax
std::string::size_type v69; // r13
char *v70; // rbx
__int64 v71; // rax
size_t v72; // r14
std::string::size_type v73; // rax
std::string::size_type v74; // r13
std::string::pointer v75; // rbx
size_t v76; // r15
char *v77; // r14
char *v78; // rdi
unsigned int v79; // r15d
std::string::size_type v80; // rax
std::string::pointer v81; // r12
size_t v82; // r12
std::string::size_type v83; // r13
size_t v84; // rbx
char *v85; // r14
size_t v86; // r15
void *v87; // rbx
const char *v88; // rdi
__int64 v89; // rax
__int64 v90; // r13
__int64 v91; // r15
signed __int64 v92; // r15
__int64 v93; // r14
unsigned __int64 v94; // r12
_QWORD *v95; // rbx
__int64 v96; // r14
void *v97; // r13
__int64 v98; // rax
__int64 v99; // rax
__int64 v100; // rax
__int64 v101; // rax
__int64 v102; // rax
__int64 v103; // rax
__int64 v104; // rax
__int64 v105; // rax
const char *v106; // rbx
size_t v107; // rax
std::string::size_type v108; // r14
char *v109; // r15
size_t v110; // r12
__int64 v111; // rax
const std::string::value_type *v112; // rax
__int64 v113; // rax
const std::string::value_type *v114; // rax
__int64 v115; // rax
const std::string::value_type *v116; // rax
__int64 v117; // rax
__int64 v118; // rax
const char *v119; // rbx
size_t v120; // rax
std::string::size_type v121; // r14
char *v122; // r15
size_t v123; // r12
__int64 v124; // rax
const std::string::value_type *v125; // rax
__int64 v126; // rbx
__int64 v127; // rdi
__int64 v128; // rax
__int64 v129; // rax
__int64 v130; // r13
unsigned int v131; // ebx
__int64 v132; // rax
const char *v133; // r14
size_t v134; // rax
std::string::size_type v135; // rbx
char *v136; // r15
size_t v137; // r12
__int64 v138; // r14
int v139; // ebx
char *v140; // r15
__int64 v141; // rax
__int64 v142; // rax
__int64 v143; // rax
__int64 v144; // rax
__int64 v145; // rax
__int64 v146; // rax
const char *v147; // rbx
size_t v148; // rax
std::string::size_type v149; // r12
char *v150; // r13
size_t v151; // r14
const std::string *v152; // r14
__int64 v153; // rax
const char *v154; // rbx
size_t v155; // rax
std::string::size_type v156; // r12
char *v157; // r13
size_t v158; // r14
const std::string *v159; // r14
__int64 v160; // rax
const char *v161; // rax
__int64 v162; // rax
const std::string::value_type *v163; // rax
__int64 v164; // rax
__int64 v165; // rax
__int64 v166; // rax
__int64 v167; // rax
__int64 v168; // rdi
_BYTE __dst[60]; // [rsp+8h] [rbp-2D8h] BYREF
__int128 v170; // [rsp+48h] [rbp-298h]
void *v171[4]; // [rsp+58h] [rbp-288h] BYREF
__int128 v172; // [rsp+78h] [rbp-268h]
__int128 v173; // [rsp+88h] [rbp-258h]
__int128 v174; // [rsp+98h] [rbp-248h]
int v175; // [rsp+A8h] [rbp-238h]
__int128 v176; // [rsp+B0h] [rbp-230h]
void *v177[4]; // [rsp+C0h] [rbp-220h] BYREF
std::string v178[2]; // [rsp+E0h] [rbp-200h] BYREF
int v179; // [rsp+110h] [rbp-1D0h]
__int128 v180; // [rsp+118h] [rbp-1C8h]
void *v181[4]; // [rsp+128h] [rbp-1B8h] BYREF
__int64 v182; // [rsp+148h] [rbp-198h]
int v183; // [rsp+150h] [rbp-190h]
void *__src; // [rsp+158h] [rbp-188h]
char v185[8]; // [rsp+160h] [rbp-180h] BYREF
size_t v186; // [rsp+168h] [rbp-178h]
void *v187; // [rsp+170h] [rbp-170h]
_QWORD v188[2]; // [rsp+178h] [rbp-168h] BYREF
void *v189; // [rsp+188h] [rbp-158h]
_QWORD v190[2]; // [rsp+190h] [rbp-150h] BYREF
void *v191; // [rsp+1A0h] [rbp-140h]
std::string v192; // [rsp+1A8h] [rbp-138h] BYREF
std::string v193; // [rsp+1C0h] [rbp-120h] BYREF
std::string v194; // [rsp+1D8h] [rbp-108h] BYREF
std::string v195; // [rsp+1F0h] [rbp-F0h] BYREF
std::string v196; // [rsp+208h] [rbp-D8h] BYREF
__int64 v197; // [rsp+220h] [rbp-C0h] BYREF
size_t v198; // [rsp+228h] [rbp-B8h]
void *v199; // [rsp+230h] [rbp-B0h]
_QWORD v200[2]; // [rsp+238h] [rbp-A8h] BYREF
char *v201; // [rsp+248h] [rbp-98h]
__int64 v202; // [rsp+250h] [rbp-90h]
__int64 v203; // [rsp+258h] [rbp-88h]
__int64 (__fastcall **v204)(); // [rsp+260h] [rbp-80h]
void *v205; // [rsp+268h] [rbp-78h]
std::string v206; // [rsp+270h] [rbp-70h] BYREF
std::string v207; // [rsp+288h] [rbp-58h] BYREF
std::string::size_type v208; // [rsp+2A0h] [rbp-40h]
__int64 v209; // [rsp+2A8h] [rbp-38h]
const std::string *v210; // [rsp+2B0h] [rbp-30h]
v4 = a2;
v202 = a1;
if ( (*(_BYTE *)&a3->__r_.__value_.__s.0 & 1) != 0 )
data = a3->__r_.__value_.__l.__data_;
else
data = a3->__r_.__value_.__s.__data_;
v6 = strlen(data);
if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_245;
v7 = v6;
v208 = *(_QWORD *)(v202 + 1088);
if ( v6 >= 0x17 )
{
v210 = a2;
v9 = 26;
if ( (v6 | 7) != 0x17 )
v9 = (v6 | 7) + 1;
v8 = operator new(v9);
*(_QWORD *)&__dst[16] = v8;
*(_QWORD *)__dst = v9 + 1;
v4 = v210;
*(_QWORD *)&__dst[8] = v7;
goto LABEL_11;
}
v8 = &__dst[1];
__dst[0] = 2 * v6;
if ( v6 )
LABEL_11:
memmove(v8, data, v7);
v8[v7] = 0;
cocos2d::CCDictionary::removeObjectForKey(v208, __dst);
if ( (__dst[0] & 1) != 0 )
operator delete(*(void **)&__dst[16]);
v203 = 0;
v10 = std::string::find(a3, 95, 0);
if ( v10 != -1 )
{
if ( (*(_BYTE *)&a3->__r_.__value_.__s.0 & 1) != 0 )
v11 = a3->__r_.__value_.__l.__data_;
else
v11 = a3->__r_.__value_.__s.__data_;
LODWORD(v12) = atoi(&v11[v10 + 1]);
v203 = v12;
}
__dst[0] = 4;
strcpy(&__dst[1], "-1");
v13 = v4->__r_.__value_.__s.__data_;
size = *(_BYTE *)&v4->__r_.__value_.__l.0 >> 1;
v15 = v4->__r_.__value_.__l.__data_;
if ( (*(_BYTE *)&v4->__r_.__value_.__s.0 & 1) != 0 )
size = v4->__r_.__value_.__l.__size_;
else
v15 = v4->__r_.__value_.__s.__data_;
v16 = 2;
if ( size < 2 )
v16 = size;
if ( !((size != 2) | (memcmp(v15, &__dst[1], v16) != 0))
|| (v17 = std::string::find(v4, 35, 0), v17 == -1)
|| (v18 = v17, v209 = v17 + 1, v208 = std::string::find(v4, 35, v17 + 1), v208 == -1) )
{
v22 = *(_QWORD *)(v202 + 1256);
if ( v22 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v22 + 312LL))(v22, v203);
return;
}
v19 = (unsigned int)v4->__r_.__value_.__l.0;
if ( (v19 & 1) != 0 )
{
v20 = v4->__r_.__value_.__l.__size_;
v21 = v4->__r_.__value_.__l.__data_;
}
else
{
v20 = v19 >> 1;
v21 = v4->__r_.__value_.__s.__data_;
}
if ( v20 >= v18 )
v20 = v18;
if ( v20 >= 0xFFFFFFFFFFFFFFF8LL )
LABEL_245:
sub_100003630();
v210 = v4;
if ( v20 >= 0x17 )
{
v27 = 26;
if ( (v20 | 7) != 0x17 )
v27 = (v20 | 7) + 1;
v23 = (char *)operator new(v27);
v189 = v23;
v188[0] = v27 + 1;
v4 = v210;
v188[1] = v20;
}
else
{
LOBYTE(v188[0]) = 2 * v20;
v23 = (char *)v188 + 1;
if ( !v20 )
{
BYTE1(v188[0]) = 0;
v24 = (unsigned int)v4->__r_.__value_.__l.0;
if ( (v24 & 1) == 0 )
goto LABEL_39;
LABEL_45:
v25 = v4->__r_.__value_.__l.__size_;
if ( v25 <= v18 )
goto LABEL_251;
v26 = v210->__r_.__value_.__l.__data_;
goto LABEL_47;
}
}
memmove(v23, v21, v20);
v23[v20] = 0;
v24 = (unsigned int)v4->__r_.__value_.__l.0;
if ( (v24 & 1) != 0 )
goto LABEL_45;
LABEL_39:
v25 = v24 >> 1;
v26 = v13;
if ( v18 >= v25 )
LABEL_251:
sub_100056810();
LABEL_47:
v28 = v208 + ~v18;
v29 = v25 - v209;
if ( v29 >= v28 )
v29 = v28;
if ( v29 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v29 >= 0x17 )
{
v32 = 26;
if ( (v29 | 7) != 0x17 )
v32 = (v29 | 7) + 1;
v30 = (char *)operator new(v32);
v199 = v30;
v197 = v32 | 1;
v198 = v29;
v31 = v208;
goto LABEL_56;
}
LOBYTE(v197) = 2 * v29;
v30 = (char *)&v197 + 1;
v31 = v208;
if ( v29 )
LABEL_56:
memmove(v30, &v26[v209], v29);
v30[v29] = 0;
v33 = (unsigned int)v210->__r_.__value_.__l.0;
if ( (v33 & 1) != 0 )
{
v34 = v210->__r_.__value_.__l.__size_;
if ( v34 <= v31 )
goto LABEL_253;
v13 = v210->__r_.__value_.__l.__data_;
}
else
{
v34 = v33 >> 1;
if ( v31 >= v34 )
LABEL_253:
sub_100056810();
}
v35 = v31 + 1;
v36 = v34 - v35;
if ( v34 - v35 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v36 >= 0x17 )
{
v38 = 26;
if ( (v36 | 7) != 0x17 )
v38 = (v36 | 7) + 1;
v37 = (char *)operator new(v38);
v191 = v37;
v190[0] = v38 | 1;
v190[1] = v36;
goto LABEL_69;
}
LOBYTE(v190[0]) = 2 * v36;
v37 = (char *)v190 + 1;
if ( v34 != v35 )
LABEL_69:
memmove(v37, &v13[v35], v36);
v37[v36] = 0;
*(_DWORD *)__dst = -1;
memset(&__dst[4], 0, 56);
v170 = 0;
memset(v171, 0, sizeof(v171));
v172 = 0;
v173 = 0;
v174 = 0;
v175 = 0;
v176 = 0;
memset(v177, 0, sizeof(v177));
memset(v178, 0, sizeof(v178));
v179 = 0;
memset(v181, 0, sizeof(v181));
v180 = 0;
v182 = 0;
v183 = 20;
v210 = (const std::string *)sub_10053FBE0(v188, ":");
if ( (unsigned int)sub_1007FEF90(v210) < 0x19 )
goto LABEL_185;
v39 = cocos2d::CCArray::stringAtIndex(v210, 0);
*(_DWORD *)__dst = cocos2d::CCString::intValue(v39);
v40 = cocos2d::CCArray::stringAtIndex(v210, 1);
*(_DWORD *)&__dst[4] = cocos2d::CCString::intValue(v40);
v41 = cocos2d::CCArray::stringAtIndex(v210, 2);
*(_DWORD *)&__dst[8] = cocos2d::CCString::intValue(v41);
v42 = cocos2d::CCArray::stringAtIndex(v210, 3);
*(_DWORD *)&__dst[12] = cocos2d::CCString::intValue(v42);
v43 = cocos2d::CCArray::stringAtIndex(v210, 4);
*(_DWORD *)&__dst[16] = cocos2d::CCString::intValue(v43);
v44 = cocos2d::CCArray::stringAtIndex(v210, 5);
*(_DWORD *)&__dst[20] = cocos2d::CCString::intValue(v44);
v45 = cocos2d::CCArray::stringAtIndex(v210, 6);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v45);
std::string::assign((std::string *)&__dst[24], CString);
v47 = cocos2d::CCArray::stringAtIndex(v210, 7);
v48 = (const char *)cocos2d::CCString::getCString(v47);
*(_QWORD *)&__dst[48] = atoll(v48);
v49 = cocos2d::CCArray::stringAtIndex(v210, 8);
*(_DWORD *)&__dst[56] = cocos2d::CCString::intValue(v49);
v50 = cocos2d::CCArray::stringAtIndex(v210, 9);
v51 = (const char *)cocos2d::CCString::getCString(v50);
v52 = strlen(v51);
if ( v52 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v53 = v52;
if ( v52 >= 0x17 )
{
v55 = 26;
if ( (v52 | 7) != 0x17 )
v55 = (v52 | 7) + 1;
v54 = (char *)operator new(v55);
v192.__r_.__value_.__r.__words[2] = (std::string::size_type)v54;
v192.__r_.__value_.__r.__words[0] = v55 | 1;
v192.__r_.__value_.__l.__size_ = v53;
goto LABEL_78;
}
v192.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v52);
v54 = v192.__r_.__value_.__s.__data_;
if ( v52 )
LABEL_78:
memmove(v54, v51, v53);
v54[v53] = 0;
LevelTools::base64DecodeString(&v207, &v192);
if ( (v170 & 1) != 0 )
operator delete(v171[0]);
v171[0] = v207.__r_.__value_.__l.__data_;
v170 = *(_OWORD *)&v207.__r_.__value_.__l.0;
*(_WORD *)&v207.__r_.__value_.__l.0 = 0;
if ( (*(_BYTE *)&v192.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v192.__r_.__value_.__l.__data_);
v56 = cocos2d::CCArray::stringAtIndex(v210, 10);
v57 = (const std::string::value_type *)cocos2d::CCString::getCString(v56);
std::string::assign((std::string *)&v171[1], v57);
v58 = cocos2d::CCArray::stringAtIndex(v210, 11);
v59 = (const char *)cocos2d::CCString::getCString(v58);
v60 = strlen(v59);
if ( v60 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v61 = v60;
if ( v60 >= 0x17 )
{
v63 = 26;
if ( (v60 | 7) != 0x17 )
v63 = (v60 | 7) + 1;
v62 = (char *)operator new(v63);
v207.__r_.__value_.__r.__words[2] = (std::string::size_type)v62;
v207.__r_.__value_.__r.__words[0] = v63 | 1;
v207.__r_.__value_.__l.__size_ = v61;
goto LABEL_90;
}
v207.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v60);
v62 = v207.__r_.__value_.__s.__data_;
if ( v60 )
LABEL_90:
memmove(v62, v59, v61);
v62[v61] = 0;
if ( (*(_BYTE *)&v207.__r_.__value_.__s.0 & 1) == 0 )
{
if ( !(*(_BYTE *)&v207.__r_.__value_.__l.0 >> 1) )
goto LABEL_157;
goto LABEL_95;
}
if ( v207.__r_.__value_.__l.__size_ )
{
LABEL_95:
v64 = sub_10053FBE0(&v207, ",");
v208 = 0;
v204 = (__int64 (__fastcall **)())v64;
while ( 1 )
{
v65 = sub_1007FEF90(v64);
if ( (unsigned int)v208 >= v65 )
goto LABEL_157;
v66 = cocos2d::CCArray::stringAtIndex(v64, v208);
v67 = (const char *)cocos2d::CCString::getCString(v66);
v68 = strlen(v67);
if ( v68 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v69 = v68;
if ( v68 >= 0x17 )
break;
v206.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v68);
v70 = v206.__r_.__value_.__s.__data_;
if ( v68 )
goto LABEL_105;
LABEL_106:
v70[v69] = 0;
v73 = std::string::find(&v206, 45, 0);
if ( v73 == -1 )
goto LABEL_142;
v74 = v73;
if ( (*(_BYTE *)&v206.__r_.__value_.__s.0 & 1) != 0 )
{
v75 = v206.__r_.__value_.__l.__data_;
v76 = v206.__r_.__value_.__l.__size_;
}
else
{
v76 = *(_BYTE *)&v206.__r_.__value_.__l.0 >> 1;
v75 = v206.__r_.__value_.__s.__data_;
}
if ( v76 >= v73 )
v76 = v73;
if ( v76 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v76 >= 0x17 )
{
v82 = (v76 | 7) + 1;
if ( (v76 | 7) == 0x17 )
v82 = 26;
v77 = (char *)operator new(v82);
v201 = v77;
v200[0] = v82 | 1;
v200[1] = v76;
}
else
{
LOBYTE(v200[0]) = 2 * v76;
v77 = (char *)v200 + 1;
if ( !v76 )
{
BYTE1(v200[0]) = 0;
v78 = (char *)v200 + 1;
if ( (v200[0] & 1) == 0 )
goto LABEL_117;
LABEL_116:
v78 = v201;
goto LABEL_117;
}
}
memmove(v77, v75, v76);
v77[v76] = 0;
v78 = (char *)v200 + 1;
if ( (v200[0] & 1) != 0 )
goto LABEL_116;
LABEL_117:
v79 = atoi(v78);
if ( (*(_BYTE *)&v206.__r_.__value_.__s.0 & 1) != 0 )
{
v80 = v206.__r_.__value_.__l.__size_;
if ( v206.__r_.__value_.__l.__size_ <= v74 )
LABEL_248:
sub_100056810();
v81 = v206.__r_.__value_.__l.__data_;
}
else
{
v80 = *(_BYTE *)&v206.__r_.__value_.__l.0 >> 1;
v81 = v206.__r_.__value_.__s.__data_;
if ( v74 >= v80 )
goto LABEL_248;
}
v83 = v74 + 1;
v84 = v80 - v83;
if ( v80 - v83 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v84 >= 0x17 )
{
LODWORD(v209) = v79;
v86 = (v84 | 7) + 1;
if ( (v84 | 7) == 0x17 )
v86 = 26;
v85 = (char *)operator new(v86);
v187 = v85;
*(_QWORD *)v185 = v86 | 1;
v186 = v84;
v79 = v209;
LABEL_134:
memmove(v85, &v81[v83], v84);
goto LABEL_135;
}
v185[0] = 2 * v84;
v85 = &v185[1];
if ( v80 != v83 )
goto LABEL_134;
LABEL_135:
v85[v84] = 0;
LOBYTE(v209) = v185[0];
v87 = v187;
v88 = (const char *)v187;
if ( (v185[0] & 1) == 0 )
v88 = &v185[1];
LODWORD(v89) = atoi(v88);
v90 = (v89 << 32) | v79;
v91 = *((_QWORD *)&v172 + 1);
if ( *((_QWORD *)&v172 + 1) >= (unsigned __int64)v173 )
{
v92 = *((_QWORD *)&v172 + 1) - v172;
v93 = (__int64)(*((_QWORD *)&v172 + 1) - v172) >> 3;
v205 = v87;
if ( (unsigned __int64)(v93 + 1) > 0x1FFFFFFFFFFFFFFFLL )
sub_100056B00();
v94 = (__int64)(v173 - v172) >> 2;
if ( v94 <= v93 + 1 )
v94 = (v92 >> 3) + 1;
if ( (_QWORD)v173 - (_QWORD)v172 >= 0x7FFFFFFFFFFFFFF8uLL )
v94 = 0x1FFFFFFFFFFFFFFFLL;
__src = (void *)v172;
if ( v94 )
{
if ( v94 > 0x1FFFFFFFFFFFFFFFLL )
sub_10001ADB0();
v95 = operator new(8 * v94);
}
else
{
v95 = nullptr;
}
v95[v93] = v90;
v96 = (__int64)&v95[v93 + 1];
v97 = __src;
memcpy(v95, __src, v92);
*(_QWORD *)&v172 = v95;
*((_QWORD *)&v172 + 1) = v96;
*(_QWORD *)&v173 = &v95[v94];
if ( v97 )
operator delete(v97);
v64 = (__int64)v204;
v87 = v205;
*((_QWORD *)&v172 + 1) = v96;
if ( (v209 & 1) == 0 )
goto LABEL_140;
}
else
{
**((_QWORD **)&v172 + 1) = v90;
v64 = (__int64)v204;
*((_QWORD *)&v172 + 1) = v91 + 8;
if ( (v209 & 1) == 0 )
goto LABEL_140;
}
operator delete(v87);
LABEL_140:
if ( (v200[0] & 1) != 0 )
operator delete(v201);
LABEL_142:
if ( (*(_BYTE *)&v206.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v206.__r_.__value_.__l.__data_);
v208 = (unsigned int)(v208 + 1);
}
v71 = v68 | 7;
v72 = 26;
if ( (v69 | 7) != 0x17 )
v72 = v71 + 1;
v70 = (char *)operator new(v72);
v206.__r_.__value_.__r.__words[2] = (std::string::size_type)v70;
v206.__r_.__value_.__r.__words[0] = v72 | 1;
v206.__r_.__value_.__l.__size_ = v69;
LABEL_105:
memmove(v70, v67, v69);
goto LABEL_106;
}
LABEL_157:
v98 = cocos2d::CCArray::stringAtIndex(v210, 12);
DWORD2(v173) = cocos2d::CCString::intValue(v98);
v99 = cocos2d::CCArray::stringAtIndex(v210, 13);
HIDWORD(v173) = cocos2d::CCString::intValue(v99);
v100 = cocos2d::CCArray::stringAtIndex(v210, 14);
LODWORD(v174) = cocos2d::CCString::intValue(v100);
v101 = cocos2d::CCArray::stringAtIndex(v210, 15);
DWORD1(v174) = cocos2d::CCString::intValue(v101);
v102 = cocos2d::CCArray::stringAtIndex(v210, 16);
DWORD2(v174) = cocos2d::CCString::intValue(v102);
v103 = cocos2d::CCArray::stringAtIndex(v210, 17);
HIDWORD(v174) = cocos2d::CCString::intValue(v103);
v104 = cocos2d::CCArray::stringAtIndex(v210, 18);
v175 = cocos2d::CCString::intValue(v104);
v105 = cocos2d::CCArray::stringAtIndex(v210, 19);
v106 = (const char *)cocos2d::CCString::getCString(v105);
v107 = strlen(v106);
if ( v107 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v108 = v107;
if ( v107 >= 0x17 )
{
v110 = 26;
if ( (v107 | 7) != 0x17 )
v110 = (v107 | 7) + 1;
v109 = (char *)operator new(v110);
v193.__r_.__value_.__r.__words[2] = (std::string::size_type)v109;
v193.__r_.__value_.__r.__words[0] = v110 | 1;
v193.__r_.__value_.__l.__size_ = v108;
goto LABEL_164;
}
v193.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v107);
v109 = v193.__r_.__value_.__s.__data_;
if ( v107 )
LABEL_164:
memmove(v109, v106, v108);
v109[v108] = 0;
LevelTools::base64DecodeString(&v206, &v193);
if ( (v176 & 1) != 0 )
operator delete(v177[0]);
v177[0] = v206.__r_.__value_.__l.__data_;
v176 = *(_OWORD *)&v206.__r_.__value_.__l.0;
*(_WORD *)&v206.__r_.__value_.__l.0 = 0;
if ( (*(_BYTE *)&v193.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v193.__r_.__value_.__l.__data_);
v111 = cocos2d::CCArray::stringAtIndex(v210, 20);
v112 = (const std::string::value_type *)cocos2d::CCString::getCString(v111);
std::string::assign((std::string *)&v177[1], v112);
v113 = cocos2d::CCArray::stringAtIndex(v210, 21);
v114 = (const std::string::value_type *)cocos2d::CCString::getCString(v113);
std::string::assign(v178, v114);
v115 = cocos2d::CCArray::stringAtIndex(v210, 22);
v116 = (const std::string::value_type *)cocos2d::CCString::getCString(v115);
std::string::assign(&v178[1], v116);
v117 = cocos2d::CCArray::stringAtIndex(v210, 23);
v179 = cocos2d::CCString::intValue(v117);
v118 = cocos2d::CCArray::stringAtIndex(v210, 24);
v119 = (const char *)cocos2d::CCString::getCString(v118);
v120 = strlen(v119);
if ( v120 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v121 = v120;
if ( v120 >= 0x17 )
{
v123 = 26;
if ( (v120 | 7) != 0x17 )
v123 = (v120 | 7) + 1;
v122 = (char *)operator new(v123);
v194.__r_.__value_.__r.__words[2] = (std::string::size_type)v122;
v194.__r_.__value_.__r.__words[0] = v123 | 1;
v194.__r_.__value_.__l.__size_ = v121;
}
else
{
v194.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v120);
v122 = v194.__r_.__value_.__s.__data_;
if ( !v120 )
goto LABEL_177;
}
memmove(v122, v119, v121);
LABEL_177:
v122[v121] = 0;
LevelTools::base64DecodeString(&v206, &v194);
if ( (v180 & 1) != 0 )
operator delete(v181[0]);
v181[0] = v206.__r_.__value_.__l.__data_;
v180 = *(_OWORD *)&v206.__r_.__value_.__l.0;
*(_WORD *)&v206.__r_.__value_.__l.0 = 0;
if ( (*(_BYTE *)&v194.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v194.__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1007FEF90(v210) >= 0x1A )
{
v124 = cocos2d::CCArray::stringAtIndex(v210, 25);
v125 = (const std::string::value_type *)cocos2d::CCString::getCString(v124);
std::string::assign((std::string *)&v181[1], v125);
}
if ( (*(_BYTE *)&v207.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v207.__r_.__value_.__l.__data_);
LABEL_185:
v126 = sub_10053FBE0(v190, ":");
v127 = v126;
if ( (unsigned int)sub_1007FEF90(v126) >= 3 )
{
v128 = cocos2d::CCArray::stringAtIndex(v126, 0);
LODWORD(v182) = cocos2d::CCString::intValue(v128);
v129 = cocos2d::CCArray::stringAtIndex(v126, 1);
HIDWORD(v182) = cocos2d::CCString::intValue(v129);
v127 = cocos2d::CCArray::stringAtIndex(v126, 2);
v183 = cocos2d::CCString::intValue(v127);
}
v209 = sub_1007FE900(v127);
if ( (v197 & 1) == 0 )
{
if ( !((unsigned __int8)v197 >> 1) )
goto LABEL_232;
goto LABEL_191;
}
if ( v198 )
{
LABEL_191:
v130 = sub_10053FBE0(&v197, "|");
v131 = 0;
v204 = off_100B6FD50;
v205 = (void *)v130;
while ( 1 )
{
if ( v131 >= (unsigned int)sub_1007FEF90(v130) )
goto LABEL_232;
LODWORD(v208) = v131;
v132 = cocos2d::CCArray::stringAtIndex(v130, v131);
v133 = (const char *)cocos2d::CCString::getCString(v132);
v134 = strlen(v133);
if ( v134 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v135 = v134;
if ( v134 >= 0x17 )
break;
v207.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v134);
v136 = v207.__r_.__value_.__s.__data_;
if ( v134 )
goto LABEL_202;
LABEL_203:
v136[v135] = 0;
v138 = sub_10053FBE0(&v207, ":");
v139 = v208;
if ( (*(_BYTE *)&v207.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v207.__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1007FEF90(v138) >= 0xA )
{
v140 = (char *)operator new(0xB0u);
cocos2d::CCObject::CCObject((__int64)v140);
*(_QWORD *)v140 = v204;
*(_OWORD *)(v140 + 56) = 0;
*((_DWORD *)v140 + 18) = 0;
*((_OWORD *)v140 + 5) = 0;
*((_OWORD *)v140 + 6) = 0;
*((_OWORD *)v140 + 7) = 0;
*((_OWORD *)v140 + 8) = 0;
*((_OWORD *)v140 + 9) = 0;
v140[160] = 1;
*(_QWORD *)(v140 + 164) = 0;
v140[172] = 0;
cocos2d::CCObject::autorelease((__int64)v140);
v141 = cocos2d::CCArray::stringAtIndex(v138, 0);
*((_DWORD *)v140 + 14) = cocos2d::CCString::intValue(v141);
v142 = cocos2d::CCArray::stringAtIndex(v138, 1);
*((_DWORD *)v140 + 15) = cocos2d::CCString::intValue(v142);
v143 = cocos2d::CCArray::stringAtIndex(v138, 2);
*((_DWORD *)v140 + 16) = cocos2d::CCString::intValue(v143);
v144 = cocos2d::CCArray::stringAtIndex(v138, 3);
*((_DWORD *)v140 + 17) = cocos2d::CCString::intValue(v144);
v145 = cocos2d::CCArray::stringAtIndex(v138, 4);
*((_DWORD *)v140 + 18) = cocos2d::CCString::intValue(v145);
v210 = (const std::string *)v138;
v146 = cocos2d::CCArray::stringAtIndex(v138, 5);
v147 = (const char *)cocos2d::CCString::getCString(v146);
v148 = strlen(v147);
if ( v148 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v149 = v148;
if ( v148 >= 0x17 )
{
v151 = (v148 | 7) + 1;
if ( (v148 | 7) == 0x17 )
v151 = 26;
v150 = (char *)operator new(v151);
v195.__r_.__value_.__r.__words[2] = (std::string::size_type)v150;
v195.__r_.__value_.__r.__words[0] = v151 | 1;
v195.__r_.__value_.__l.__size_ = v149;
}
else
{
v195.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v148);
v150 = v195.__r_.__value_.__s.__data_;
if ( !v148 )
{
LABEL_214:
v150[v149] = 0;
LevelTools::base64DecodeString(&v207, &v195);
v152 = v210;
if ( (v140[80] & 1) != 0 )
operator delete(*((void **)v140 + 12));
*(std::string *)(v140 + 80) = v207;
*(_WORD *)&v207.__r_.__value_.__l.0 = 0;
if ( (*(_BYTE *)&v195.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v195.__r_.__value_.__l.__data_);
v153 = cocos2d::CCArray::stringAtIndex(v152, 6);
v154 = (const char *)cocos2d::CCString::getCString(v153);
v155 = strlen(v154);
if ( v155 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v156 = v155;
if ( v155 >= 0x17 )
{
v158 = (v155 | 7) + 1;
if ( (v155 | 7) == 0x17 )
v158 = 26;
v157 = (char *)operator new(v158);
v196.__r_.__value_.__r.__words[2] = (std::string::size_type)v157;
v196.__r_.__value_.__r.__words[0] = v158 | 1;
v196.__r_.__value_.__l.__size_ = v156;
}
else
{
v196.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v155);
v157 = v196.__r_.__value_.__s.__data_;
if ( !v155 )
goto LABEL_226;
}
memmove(v157, v154, v156);
LABEL_226:
v157[v156] = 0;
LevelTools::base64DecodeString(&v207, &v196);
v130 = (__int64)v205;
v139 = v208;
v159 = v210;
if ( (v140[104] & 1) != 0 )
operator delete(*((void **)v140 + 15));
*(std::string *)(v140 + 104) = v207;
*(_WORD *)&v207.__r_.__value_.__l.0 = 0;
if ( (*(_BYTE *)&v196.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v196.__r_.__value_.__l.__data_);
v160 = cocos2d::CCArray::stringAtIndex(v159, 7);
v161 = (const char *)cocos2d::CCString::getCString(v160);
*((_QWORD *)v140 + 16) = atoll(v161);
v162 = cocos2d::CCArray::stringAtIndex(v159, 8);
v163 = (const std::string::value_type *)cocos2d::CCString::getCString(v162);
std::string::assign((std::string *)(v140 + 136), v163);
v164 = cocos2d::CCArray::stringAtIndex(v159, 9);
v140[160] = (unsigned int)cocos2d::CCString::intValue(v164) != 0;
if ( (unsigned int)sub_1007FEF90(v159) >= 0xD )
{
v165 = cocos2d::CCArray::stringAtIndex(v159, 10);
*((_DWORD *)v140 + 41) = cocos2d::CCString::intValue(v165);
v166 = cocos2d::CCArray::stringAtIndex(v159, 11);
*((_DWORD *)v140 + 42) = cocos2d::CCString::intValue(v166);
v167 = cocos2d::CCArray::stringAtIndex(v159, 12);
v140[172] = (unsigned int)cocos2d::CCString::intValue(v167) != 0;
}
sub_1007FEBF0(v209, v140);
goto LABEL_193;
}
}
memmove(v150, v147, v149);
goto LABEL_214;
}
LABEL_193:
v131 = v139 + 1;
}
v137 = (v134 | 7) + 1;
if ( (v134 | 7) == 0x17 )
v137 = 26;
v136 = (char *)operator new(v137);
v207.__r_.__value_.__r.__words[2] = (std::string::size_type)v136;
v207.__r_.__value_.__r.__words[0] = v137 | 1;
v207.__r_.__value_.__l.__size_ = v135;
LABEL_202:
memmove(v136, v133, v135);
goto LABEL_203;
}
LABEL_232:
v168 = *(_QWORD *)(v202 + 1256);
if ( v168 )
(*(void (__fastcall **)(__int64, __int64, __int64, _BYTE *))(*(_QWORD *)v168 + 304LL))(v168, v203, v209, __dst);
sub_100590940(__dst);
if ( (v190[0] & 1) != 0 )
{
operator delete(v191);
if ( (v197 & 1) == 0 )
{
LABEL_236:
if ( (v188[0] & 1) != 0 )
goto LABEL_240;
return;
}
}
else if ( (v197 & 1) == 0 )
{
goto LABEL_236;
}
operator delete(v199);
if ( (v188[0] & 1) != 0 )
LABEL_240:
operator delete(v189);
}