//
// sub_100532390 from 0x100532390 to 0x100533bc7 (6199 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x1005209e1
//
// 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:51 +0000
//
void __fastcall sub_100532390(__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
char *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::value_type *v26; // r15
size_t v27; // r15
size_t v28; // r13
size_t v29; // r12
char *v30; // rbx
unsigned __int64 v31; // r13
size_t v32; // r13
unsigned int v33; // eax
unsigned __int64 v34; // rax
unsigned __int64 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
const char *CString; // rbx
size_t v44; // rax
size_t v45; // r14
char *v46; // r15
size_t v47; // r12
__int64 v48; // r12
unsigned int v49; // eax
__int64 v50; // rax
const char *v51; // rbx
size_t v52; // rax
std::string::size_type v53; // r13
char *v54; // r14
__int64 v55; // rax
size_t v56; // r15
std::string::size_type v57; // rax
std::string::size_type v58; // r13
size_t v59; // rbx
std::string::pointer v60; // r14
char *v61; // r15
char *v62; // rdi
unsigned int v63; // ebx
std::string::size_type v64; // rax
std::string::pointer v65; // r12
size_t v66; // r12
std::string::size_type v67; // r13
size_t v68; // r14
char *v69; // r15
size_t v70; // rbx
void *v71; // r14
const char *v72; // rdi
__int64 v73; // rax
__int64 v74; // r13
char *v75; // rbx
signed __int64 v76; // rbx
signed __int64 v77; // r15
unsigned __int64 v78; // r12
_QWORD *v79; // r14
char *v80; // r15
void *v81; // r13
__int64 v82; // rax
__int64 v83; // rax
__int64 v84; // rax
__int64 v85; // rax
__int64 v86; // rax
const char *v87; // rbx
size_t v88; // rax
std::string::size_type v89; // r14
char *v90; // r15
size_t v91; // r12
__int64 v92; // rax
const std::string::value_type *v93; // rax
__int64 v94; // rbx
__int64 v95; // rdi
__int64 v96; // rax
unsigned __int64 v97; // r13
unsigned int i; // eax
__int64 v99; // rax
const char *v100; // rbx
size_t v101; // rax
size_t v102; // r14
char *v103; // r15
size_t v104; // r12
__int64 v105; // r14
__int64 v106; // rax
int v107; // eax
__int64 v108; // rax
int v109; // eax
__int64 v110; // rax
int v111; // eax
__int64 v112; // rax
int v113; // eax
__int64 v114; // rax
int v115; // eax
__int64 v116; // rax
const char *v117; // rbx
size_t v118; // rax
size_t v119; // r14
char *v120; // r15
unsigned int v121; // eax
size_t v122; // r12
unsigned int v123; // eax
__int64 v124; // rax
const char *v125; // r14
size_t v126; // rax
std::string::size_type v127; // r15
char *v128; // rbx
__int64 v129; // rax
size_t v130; // r12
std::string::size_type v131; // rax
std::string::size_type v132; // r14
std::string::pointer v133; // rbx
size_t v134; // r15
char *v135; // r12
char *v136; // rdi
int v137; // eax
std::string::size_type v138; // rdx
std::string::pointer v139; // rbx
size_t v140; // r13
std::string::size_type v141; // r14
size_t v142; // r12
char *v143; // r13
size_t v144; // r15
char v145; // r12
void *v146; // r15
const char *v147; // rdi
__int64 v148; // rax
__int64 v149; // r14
char *v150; // rbx
unsigned __int64 v151; // rax
void *v152; // rsi
signed __int64 v153; // rbx
__int64 v154; // r13
unsigned __int64 v155; // rcx
__int64 v156; // rax
unsigned __int64 v157; // r15
_QWORD *v158; // r12
__int64 v159; // r14
__int64 v160; // rax
char v161; // r12
__int64 v162; // rax
int v163; // eax
__int64 v164; // rax
const char *v165; // rbx
size_t v166; // rax
std::string::size_type v167; // r14
char *v168; // r15
size_t v169; // r12
std::string *v170; // rbx
__int64 v171; // rax
const char *v172; // rbx
size_t v173; // rax
std::string::size_type v174; // r14
char *v175; // r15
size_t v176; // r12
__int64 v177; // rbx
__int64 v178; // rax
const char *v179; // rax
__int64 v180; // rax
__int64 v181; // rax
const char *v182; // rax
__int64 v183; // rax
__int64 v184; // rax
int v185; // eax
__int64 v186; // rax
const std::string::value_type *v187; // rax
__int64 v188; // rax
const char *v189; // rax
__int64 v190; // rax
__int64 v191; // rax
int v192; // eax
__int64 v193; // rdi
void *v194; // rdi
void **v195; // [rsp+10h] [rbp-1F0h]
__int64 v196; // [rsp+20h] [rbp-1E0h]
__int64 v197; // [rsp+28h] [rbp-1D8h]
_QWORD v198[2]; // [rsp+30h] [rbp-1D0h] BYREF
void *v199; // [rsp+40h] [rbp-1C0h]
_QWORD v200[2]; // [rsp+48h] [rbp-1B8h] BYREF
void *v201; // [rsp+58h] [rbp-1A8h]
std::string v202; // [rsp+60h] [rbp-1A0h] BYREF
std::string v203; // [rsp+78h] [rbp-188h] BYREF
std::string v204; // [rsp+90h] [rbp-170h] BYREF
size_t __dst; // [rsp+A8h] [rbp-158h] BYREF
size_t v206; // [rsp+B0h] [rbp-150h]
void *__p[2]; // [rsp+B8h] [rbp-148h]
__int128 v208; // [rsp+C8h] [rbp-138h]
int v209; // [rsp+D8h] [rbp-128h]
_BYTE v210[56]; // [rsp+DCh] [rbp-124h] BYREF
int v211; // [rsp+114h] [rbp-ECh]
__int64 v212; // [rsp+118h] [rbp-E8h] BYREF
size_t v213; // [rsp+120h] [rbp-E0h]
void *v214; // [rsp+128h] [rbp-D8h]
__int64 v215; // [rsp+130h] [rbp-D0h]
__int64 v216; // [rsp+138h] [rbp-C8h]
char v217[8]; // [rsp+140h] [rbp-C0h] BYREF
size_t v218; // [rsp+148h] [rbp-B8h]
void *v219; // [rsp+150h] [rbp-B0h]
void *__src; // [rsp+158h] [rbp-A8h]
__int64 v221; // [rsp+160h] [rbp-A0h] BYREF
size_t v222; // [rsp+168h] [rbp-98h]
char *v223; // [rsp+170h] [rbp-90h]
void *v224; // [rsp+178h] [rbp-88h]
__int64 v225; // [rsp+180h] [rbp-80h] BYREF
size_t v226; // [rsp+188h] [rbp-78h]
void *v227; // [rsp+190h] [rbp-70h]
std::string v228; // [rsp+198h] [rbp-68h] BYREF
__int64 v229; // [rsp+1B0h] [rbp-50h]
__int64 v230; // [rsp+1B8h] [rbp-48h]
__int64 v231; // [rsp+1C0h] [rbp-40h]
char v232; // [rsp+1CFh] [rbp-31h]
std::string::size_type v233; // [rsp+1D0h] [rbp-30h]
v4 = a2;
v215 = 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_313;
v7 = v6;
v233 = *(_QWORD *)(v215 + 1088);
if ( v6 >= 0x17 )
{
v229 = (__int64)a2;
v9 = 26;
if ( (v6 | 7) != 0x17 )
v9 = (v6 | 7) + 1;
v8 = (char *)operator new(v9);
__p[0] = v8;
__dst = v9 + 1;
v4 = (const std::string *)v229;
v206 = v7;
goto LABEL_11;
}
v8 = (char *)&__dst + 1;
LOBYTE(__dst) = 2 * v6;
if ( v6 )
LABEL_11:
memmove(v8, data, v7);
v8[v7] = 0;
cocos2d::CCDictionary::removeObjectForKey(v233, (char *)&__dst);
if ( (__dst & 1) != 0 )
operator delete(__p[0]);
v216 = 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]);
v216 = v12;
}
LOBYTE(__dst) = 4;
*(_WORD *)((char *)&__dst + 1) = 12589;
BYTE3(__dst) = 0;
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, (char *)&__dst + 1, v16) != 0))
|| (v17 = std::string::find(v4, 35, 0), v17 == -1)
|| (v18 = v17, v230 = v17 + 1, v233 = std::string::find(v4, 35, v17 + 1), v233 == -1) )
{
v22 = *(_QWORD *)(v215 + 1256);
if ( v22 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v22 + 264LL))(v22, v216);
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_313:
sub_100003630();
v229 = (__int64)v4;
if ( v20 >= 0x17 )
{
v27 = 26;
if ( (v20 | 7) != 0x17 )
v27 = (v20 | 7) + 1;
v23 = (char *)operator new(v27);
v199 = v23;
v198[0] = v27 + 1;
v4 = (const std::string *)v229;
v198[1] = v20;
}
else
{
LOBYTE(v198[0]) = 2 * v20;
v23 = (char *)v198 + 1;
if ( !v20 )
{
BYTE1(v198[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_319;
v26 = *(std::string::value_type **)(v229 + 16);
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_319:
sub_100056810();
LABEL_47:
v28 = v233 + ~v18;
v29 = v25 - v230;
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);
v214 = v30;
v212 = v32 | 1;
v213 = v29;
v31 = v233;
goto LABEL_56;
}
LOBYTE(v212) = 2 * v29;
v30 = (char *)&v212 + 1;
v31 = v233;
if ( v29 )
LABEL_56:
memmove(v30, &v26[v230], v29);
v30[v29] = 0;
v33 = *(unsigned __int8 *)v229;
if ( (v33 & 1) != 0 )
{
v34 = *(_QWORD *)(v229 + 8);
if ( v34 <= v31 )
goto LABEL_321;
v13 = *(std::string::value_type **)(v229 + 16);
}
else
{
v34 = v33 >> 1;
if ( v31 >= v34 )
LABEL_321:
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);
v201 = v37;
v200[0] = v38 | 1;
v200[1] = v36;
goto LABEL_69;
}
LOBYTE(v200[0]) = 2 * v36;
v37 = (char *)v200 + 1;
if ( v34 != v35 )
LABEL_69:
memmove(v37, &v13[v35], v36);
v37[v36] = 0;
__dst = 0;
LODWORD(v206) = 0;
*(_OWORD *)__p = 0;
v208 = 0;
v209 = -1;
memset(v210, 0, sizeof(v210));
v211 = 20;
v230 = sub_10053FBE0(v198, ":");
if ( (unsigned int)sub_1007FEF90(v230) < 7 )
goto LABEL_161;
v39 = cocos2d::CCArray::stringAtIndex(v230, 0);
LODWORD(__dst) = cocos2d::CCString::intValue(v39);
v40 = cocos2d::CCArray::stringAtIndex(v230, 1);
HIDWORD(__dst) = cocos2d::CCString::intValue(v40);
v41 = cocos2d::CCArray::stringAtIndex(v230, 2);
LODWORD(v206) = cocos2d::CCString::intValue(v41);
v42 = cocos2d::CCArray::stringAtIndex(v230, 3);
CString = (const char *)cocos2d::CCString::getCString(v42);
v44 = strlen(CString);
if ( v44 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v45 = v44;
if ( v44 >= 0x17 )
{
v47 = 26;
if ( (v44 | 7) != 0x17 )
v47 = (v44 | 7) + 1;
v46 = (char *)operator new(v47);
v227 = v46;
v225 = v47 | 1;
v226 = v45;
goto LABEL_78;
}
LOBYTE(v225) = 2 * v44;
v46 = (char *)&v225 + 1;
if ( v44 )
LABEL_78:
memmove(v46, CString, v45);
v46[v45] = 0;
if ( (v225 & 1) == 0 )
{
if ( !((unsigned __int8)v225 >> 1) )
goto LABEL_145;
goto LABEL_83;
}
if ( v226 )
{
LABEL_83:
v48 = sub_10053FBE0(&v225, ",");
v233 = 0;
v224 = (void *)v48;
while ( 1 )
{
v49 = sub_1007FEF90(v48);
if ( (unsigned int)v233 >= v49 )
goto LABEL_145;
v50 = cocos2d::CCArray::stringAtIndex(v48, v233);
v51 = (const char *)cocos2d::CCString::getCString(v50);
v52 = strlen(v51);
if ( v52 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v53 = v52;
if ( v52 >= 0x17 )
break;
v228.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v52);
v54 = v228.__r_.__value_.__s.__data_;
if ( v52 )
goto LABEL_93;
LABEL_94:
v54[v53] = 0;
v57 = std::string::find(&v228, 45, 0);
if ( v57 == -1 )
goto LABEL_130;
v58 = v57;
if ( (*(_BYTE *)&v228.__r_.__value_.__s.0 & 1) != 0 )
{
v60 = v228.__r_.__value_.__l.__data_;
v59 = v228.__r_.__value_.__l.__size_;
}
else
{
v59 = *(_BYTE *)&v228.__r_.__value_.__l.0 >> 1;
v60 = v228.__r_.__value_.__s.__data_;
}
if ( v59 >= v57 )
v59 = v57;
if ( v59 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v59 >= 0x17 )
{
v66 = (v59 | 7) + 1;
if ( (v59 | 7) == 0x17 )
v66 = 26;
v61 = (char *)operator new(v66);
v223 = v61;
v221 = v66 | 1;
v222 = v59;
}
else
{
LOBYTE(v221) = 2 * v59;
v61 = (char *)&v221 + 1;
if ( !v59 )
{
BYTE1(v221) = 0;
v62 = (char *)&v221 + 1;
if ( (v221 & 1) == 0 )
goto LABEL_105;
LABEL_104:
v62 = v223;
goto LABEL_105;
}
}
memmove(v61, v60, v59);
v61[v59] = 0;
v62 = (char *)&v221 + 1;
if ( (v221 & 1) != 0 )
goto LABEL_104;
LABEL_105:
v63 = atoi(v62);
if ( (*(_BYTE *)&v228.__r_.__value_.__s.0 & 1) != 0 )
{
v64 = v228.__r_.__value_.__l.__size_;
if ( v228.__r_.__value_.__l.__size_ <= v58 )
LABEL_316:
sub_100056810();
v65 = v228.__r_.__value_.__l.__data_;
}
else
{
v64 = *(_BYTE *)&v228.__r_.__value_.__l.0 >> 1;
v65 = v228.__r_.__value_.__s.__data_;
if ( v58 >= v64 )
goto LABEL_316;
}
v67 = v58 + 1;
v68 = v64 - v67;
if ( v64 - v67 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v68 >= 0x17 )
{
LODWORD(v229) = v63;
v70 = (v68 | 7) + 1;
if ( (v68 | 7) == 0x17 )
v70 = 26;
v69 = (char *)operator new(v70);
v219 = v69;
*(_QWORD *)v217 = v70 | 1;
v218 = v68;
v63 = v229;
LABEL_122:
memmove(v69, &v65[v67], v68);
goto LABEL_123;
}
v217[0] = 2 * v68;
v69 = &v217[1];
if ( v64 != v67 )
goto LABEL_122;
LABEL_123:
v69[v68] = 0;
LOBYTE(v229) = v217[0];
v71 = v219;
v72 = (const char *)v219;
if ( (v217[0] & 1) == 0 )
v72 = &v217[1];
LODWORD(v73) = atoi(v72);
v74 = (v73 << 32) | v63;
v75 = (char *)__p[1];
if ( __p[1] >= (void *)v208 )
{
v76 = (char *)__p[1] - (char *)__p[0];
v77 = ((char *)__p[1] - (char *)__p[0]) >> 3;
v231 = (__int64)v71;
if ( (unsigned __int64)(v77 + 1) > 0x1FFFFFFFFFFFFFFFLL )
sub_100056B00();
v78 = (__int64)(v208 - (unsigned __int64)__p[0]) >> 2;
if ( v78 <= v77 + 1 )
v78 = (v76 >> 3) + 1;
if ( (unsigned __int64)v208 - (unsigned __int64)__p[0] >= 0x7FFFFFFFFFFFFFF8LL )
v78 = 0x1FFFFFFFFFFFFFFFLL;
__src = __p[0];
if ( v78 )
{
if ( v78 > 0x1FFFFFFFFFFFFFFFLL )
sub_10001ADB0();
v79 = operator new(8 * v78);
}
else
{
v79 = nullptr;
}
v79[v77] = v74;
v80 = (char *)&v79[v77 + 1];
v81 = __src;
memcpy(v79, __src, v76);
__p[0] = v79;
__p[1] = v80;
*(_QWORD *)&v208 = &v79[v78];
if ( v81 )
operator delete(v81);
v48 = (__int64)v224;
v71 = (void *)v231;
__p[1] = v80;
if ( (v229 & 1) == 0 )
goto LABEL_128;
}
else
{
*(_QWORD *)__p[1] = v74;
v48 = (__int64)v224;
__p[1] = v75 + 8;
if ( (v229 & 1) == 0 )
goto LABEL_128;
}
operator delete(v71);
LABEL_128:
if ( (v221 & 1) != 0 )
operator delete(v223);
LABEL_130:
if ( (*(_BYTE *)&v228.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v228.__r_.__value_.__l.__data_);
v233 = (unsigned int)(v233 + 1);
}
v55 = v52 | 7;
v56 = 26;
if ( (v53 | 7) != 0x17 )
v56 = v55 + 1;
v54 = (char *)operator new(v56);
v228.__r_.__value_.__r.__words[2] = (std::string::size_type)v54;
v228.__r_.__value_.__r.__words[0] = v56 | 1;
v228.__r_.__value_.__l.__size_ = v53;
LABEL_93:
memmove(v54, v51, v53);
goto LABEL_94;
}
LABEL_145:
v82 = cocos2d::CCArray::stringAtIndex(v230, 4);
DWORD2(v208) = cocos2d::CCString::intValue(v82);
v83 = cocos2d::CCArray::stringAtIndex(v230, 5);
HIDWORD(v208) = cocos2d::CCString::intValue(v83);
v84 = cocos2d::CCArray::stringAtIndex(v230, 6);
v209 = cocos2d::CCString::intValue(v84);
if ( (unsigned int)sub_1007FEF90(v230) >= 0xA )
{
v85 = cocos2d::CCArray::stringAtIndex(v230, 7);
*(_DWORD *)v210 = cocos2d::CCString::intValue(v85);
v86 = cocos2d::CCArray::stringAtIndex(v230, 8);
v87 = (const char *)cocos2d::CCString::getCString(v86);
v88 = strlen(v87);
if ( v88 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v89 = v88;
if ( v88 >= 0x17 )
{
v91 = 26;
if ( (v88 | 7) != 0x17 )
v91 = (v88 | 7) + 1;
v90 = (char *)operator new(v91);
v202.__r_.__value_.__r.__words[2] = (std::string::size_type)v90;
v202.__r_.__value_.__r.__words[0] = v91 | 1;
v202.__r_.__value_.__l.__size_ = v89;
}
else
{
v202.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v88);
v90 = v202.__r_.__value_.__s.__data_;
if ( !v88 )
goto LABEL_154;
}
memmove(v90, v87, v89);
LABEL_154:
v90[v89] = 0;
LevelTools::base64DecodeString(&v228, &v202);
if ( (v210[4] & 1) != 0 )
operator delete(*(void **)&v210[20]);
*(std::string *)&v210[4] = v228;
*(_WORD *)&v228.__r_.__value_.__l.0 = 0;
if ( (*(_BYTE *)&v202.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v202.__r_.__value_.__l.__data_);
v92 = cocos2d::CCArray::stringAtIndex(v230, 9);
v93 = (const std::string::value_type *)cocos2d::CCString::getCString(v92);
std::string::assign((std::string *)&v210[28], v93);
}
if ( (v225 & 1) != 0 )
operator delete(v227);
LABEL_161:
v94 = sub_10053FBE0(v200, ":");
v95 = v94;
if ( (unsigned int)sub_1007FEF90(v94) >= 3 )
{
v96 = cocos2d::CCArray::stringAtIndex(v94, 1);
*(_DWORD *)&v210[52] = cocos2d::CCString::intValue(v96);
v95 = cocos2d::CCArray::stringAtIndex(v94, 2);
v211 = cocos2d::CCString::intValue(v95);
}
v197 = sub_1007FE900(v95);
if ( (v212 & 1) == 0 )
{
if ( !((unsigned __int8)v212 >> 1) )
goto LABEL_286;
goto LABEL_167;
}
if ( v213 )
{
LABEL_167:
v196 = sub_10053FBE0(&v212, "|");
v97 = 0;
for ( i = sub_1007FEF90(v196); ; i = sub_1007FEF90(v196) )
{
if ( (unsigned int)v97 >= i )
goto LABEL_286;
v99 = cocos2d::CCArray::stringAtIndex(v196, (unsigned int)v97);
v100 = (const char *)cocos2d::CCString::getCString(v99);
v101 = strlen(v100);
if ( v101 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v102 = v101;
if ( v101 >= 0x17 )
break;
LOBYTE(v225) = 2 * v101;
v103 = (char *)&v225 + 1;
if ( v101 )
goto LABEL_177;
LABEL_178:
v103[v102] = 0;
v231 = sub_10053FBE0(&v225, ":");
if ( (v225 & 1) != 0 )
operator delete(v227);
if ( (unsigned int)sub_1007FEF90(v231) >= 0xA )
{
v233 = (std::string::size_type)operator new(0xE0u);
v105 = v233;
cocos2d::CCObject::CCObject(v233);
*(_QWORD *)v105 = off_100B6FC60;
*(_OWORD *)(v105 + 56) = 0;
*(_DWORD *)(v105 + 72) = 0;
*(_OWORD *)(v105 + 80) = 0;
*(_OWORD *)(v105 + 89) = 0;
*(_OWORD *)(v105 + 112) = 0;
*(_OWORD *)(v105 + 128) = 0;
*(_OWORD *)(v105 + 144) = 0;
*(_OWORD *)(v105 + 160) = 0;
*(_BYTE *)(v105 + 176) = 1;
*(_QWORD *)(v105 + 184) = 0;
*(_DWORD *)(v105 + 192) = 0;
*(_OWORD *)(v105 + 200) = 0;
*(_QWORD *)(v105 + 216) = 0;
cocos2d::CCObject::autorelease(v105);
v106 = cocos2d::CCArray::stringAtIndex(v231, 0);
v107 = cocos2d::CCString::intValue(v106);
*(_DWORD *)(v233 + 56) = v107;
v108 = cocos2d::CCArray::stringAtIndex(v231, 1);
v109 = cocos2d::CCString::intValue(v108);
*(_DWORD *)(v233 + 60) = v109;
v110 = cocos2d::CCArray::stringAtIndex(v231, 2);
v111 = cocos2d::CCString::intValue(v110);
*(_DWORD *)(v233 + 64) = v111;
v112 = cocos2d::CCArray::stringAtIndex(v231, 3);
v113 = cocos2d::CCString::intValue(v112);
*(_DWORD *)(v233 + 68) = v113;
v114 = cocos2d::CCArray::stringAtIndex(v231, 4);
v115 = cocos2d::CCString::intValue(v114);
*(_DWORD *)(v233 + 72) = v115;
v116 = cocos2d::CCArray::stringAtIndex(v231, 5);
v117 = (const char *)cocos2d::CCString::getCString(v116);
v118 = strlen(v117);
if ( v118 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v119 = v118;
if ( v118 >= 0x17 )
{
v122 = (v118 | 7) + 1;
if ( (v118 | 7) == 0x17 )
v122 = 26;
v120 = (char *)operator new(v122);
v227 = v120;
v225 = v122 | 1;
v226 = v119;
}
else
{
LOBYTE(v225) = 2 * v118;
v120 = (char *)&v225 + 1;
if ( !v118 )
{
BYTE1(v225) = 0;
v121 = (unsigned __int8)v225;
if ( (v225 & 1) != 0 )
{
LABEL_185:
if ( v226 )
goto LABEL_192;
LABEL_254:
v162 = cocos2d::CCArray::stringAtIndex(v231, 6);
v163 = cocos2d::CCString::intValue(v162);
*(_BYTE *)(v233 + 104) = v163 != 0;
v164 = cocos2d::CCArray::stringAtIndex(v231, 7);
v165 = (const char *)cocos2d::CCString::getCString(v164);
v166 = strlen(v165);
if ( v166 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v167 = v166;
if ( v166 >= 0x17 )
{
v169 = (v166 | 7) + 1;
if ( (v166 | 7) == 0x17 )
v169 = 26;
v168 = (char *)operator new(v169);
v203.__r_.__value_.__r.__words[2] = (std::string::size_type)v168;
v203.__r_.__value_.__r.__words[0] = v169 | 1;
v203.__r_.__value_.__l.__size_ = v167;
}
else
{
v203.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v166);
v168 = v203.__r_.__value_.__s.__data_;
if ( !v166 )
{
LABEL_262:
v168[v167] = 0;
LevelTools::base64DecodeString(&v228, &v203);
v170 = (std::string *)(v233 + 112);
if ( (*(_BYTE *)(v233 + 112) & 1) != 0 )
operator delete(*(void **)(v233 + 128));
*v170 = v228;
*(_WORD *)&v228.__r_.__value_.__l.0 = 0;
if ( (*(_BYTE *)&v203.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v203.__r_.__value_.__l.__data_);
v171 = cocos2d::CCArray::stringAtIndex(v231, 8);
v172 = (const char *)cocos2d::CCString::getCString(v171);
v173 = strlen(v172);
if ( v173 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v174 = v173;
if ( v173 >= 0x17 )
{
v176 = (v173 | 7) + 1;
if ( (v173 | 7) == 0x17 )
v176 = 26;
v175 = (char *)operator new(v176);
v204.__r_.__value_.__r.__words[2] = (std::string::size_type)v175;
v204.__r_.__value_.__r.__words[0] = v176 | 1;
v204.__r_.__value_.__l.__size_ = v174;
}
else
{
v204.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v173);
v175 = v204.__r_.__value_.__s.__data_;
if ( !v173 )
goto LABEL_274;
}
memmove(v175, v172, v174);
LABEL_274:
v175[v174] = 0;
LevelTools::base64DecodeString(&v228, &v204);
v177 = v233;
if ( (*(_BYTE *)(v233 + 136) & 1) != 0 )
operator delete(*(void **)(v233 + 152));
*(std::string *)(v177 + 136) = v228;
*(_WORD *)&v228.__r_.__value_.__l.0 = 0;
if ( (*(_BYTE *)&v204.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v204.__r_.__value_.__l.__data_);
v178 = cocos2d::CCArray::stringAtIndex(v231, 9);
v179 = (const char *)cocos2d::CCString::getCString(v178);
v180 = atoll(v179);
*(_QWORD *)(v233 + 160) = v180;
if ( (unsigned int)sub_1007FEF90(v231) >= 0xD )
{
v181 = cocos2d::CCArray::stringAtIndex(v231, 10);
v182 = (const char *)cocos2d::CCString::getCString(v181);
v183 = atoll(v182);
*(_QWORD *)(v233 + 184) = v183;
v184 = cocos2d::CCArray::stringAtIndex(v231, 11);
v185 = cocos2d::CCString::intValue(v184);
*(_DWORD *)(v233 + 192) = v185;
v186 = cocos2d::CCArray::stringAtIndex(v231, 12);
v187 = (const std::string::value_type *)cocos2d::CCString::getCString(v186);
std::string::assign((std::string *)(v233 + 200), v187);
}
if ( (unsigned int)sub_1007FEF90(v231) >= 0xE )
{
v188 = cocos2d::CCArray::stringAtIndex(v231, 13);
v189 = (const char *)cocos2d::CCString::getCString(v188);
v190 = atoll(v189);
*(_QWORD *)(v233 + 168) = v190;
}
if ( (unsigned int)sub_1007FEF90(v231) >= 0xF )
{
v191 = cocos2d::CCArray::stringAtIndex(v231, 14);
v192 = cocos2d::CCString::intValue(v191);
*(_BYTE *)(v233 + 176) = v192 != 0;
}
sub_1007FEBF0(v197, v233);
if ( (v225 & 1) != 0 )
operator delete(v227);
goto LABEL_168;
}
}
memmove(v168, v165, v167);
goto LABEL_262;
}
LABEL_191:
if ( !(v121 >> 1) )
goto LABEL_254;
LABEL_192:
v229 = sub_10053FBE0(&v225, ",");
v195 = (void **)(v233 + 80);
LODWORD(v230) = 0;
__src = (void *)v97;
while ( 2 )
{
v123 = sub_1007FEF90(v229);
if ( (unsigned int)v230 >= v123 )
goto LABEL_254;
v124 = cocos2d::CCArray::stringAtIndex(v229, (unsigned int)v230);
v125 = (const char *)cocos2d::CCString::getCString(v124);
v126 = strlen(v125);
if ( v126 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v127 = v126;
if ( v126 >= 0x17 )
{
v129 = v126 | 7;
v130 = 26;
if ( (v127 | 7) != 0x17 )
v130 = v129 + 1;
v128 = (char *)operator new(v130);
v228.__r_.__value_.__r.__words[2] = (std::string::size_type)v128;
v228.__r_.__value_.__r.__words[0] = v130 | 1;
v228.__r_.__value_.__l.__size_ = v127;
}
else
{
v228.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v126);
v128 = v228.__r_.__value_.__s.__data_;
if ( !v126 )
{
LABEL_203:
v128[v127] = 0;
v131 = std::string::find(&v228, 45, 0);
if ( v131 == -1 )
goto LABEL_239;
v132 = v131;
if ( (*(_BYTE *)&v228.__r_.__value_.__s.0 & 1) != 0 )
{
v133 = v228.__r_.__value_.__l.__data_;
v134 = v228.__r_.__value_.__l.__size_;
}
else
{
v134 = *(_BYTE *)&v228.__r_.__value_.__l.0 >> 1;
v133 = v228.__r_.__value_.__s.__data_;
}
if ( v134 >= v131 )
v134 = v131;
if ( v134 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v134 >= 0x17 )
{
v140 = (v134 | 7) + 1;
if ( (v134 | 7) == 0x17 )
v140 = 26;
v135 = (char *)operator new(v140);
v223 = v135;
v221 = v140 | 1;
v222 = v134;
}
else
{
LOBYTE(v221) = 2 * v134;
v135 = (char *)&v221 + 1;
if ( !v134 )
{
BYTE1(v221) = 0;
v136 = (char *)&v221 + 1;
if ( (v221 & 1) != 0 )
goto LABEL_213;
goto LABEL_214;
}
}
memmove(v135, v133, v134);
v135[v134] = 0;
v136 = (char *)&v221 + 1;
if ( (v221 & 1) != 0 )
LABEL_213:
v136 = v223;
LABEL_214:
v137 = atoi(v136);
if ( (*(_BYTE *)&v228.__r_.__value_.__s.0 & 1) != 0 )
{
v138 = v228.__r_.__value_.__l.__size_;
if ( v228.__r_.__value_.__l.__size_ <= v132 )
LABEL_304:
sub_100056810();
v139 = v228.__r_.__value_.__l.__data_;
}
else
{
v138 = *(_BYTE *)&v228.__r_.__value_.__l.0 >> 1;
v139 = v228.__r_.__value_.__s.__data_;
if ( v132 >= v138 )
goto LABEL_304;
}
v141 = v132 + 1;
v142 = v138 - v141;
if ( v138 - v141 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
LODWORD(v224) = v137;
if ( v142 >= 0x17 )
{
v144 = (v142 | 7) + 1;
if ( (v142 | 7) == 0x17 )
v144 = 26;
v143 = (char *)operator new(v144);
v219 = v143;
*(_QWORD *)v217 = v144 | 1;
v218 = v142;
}
else
{
v217[0] = 2 * v142;
v143 = &v217[1];
if ( v138 == v141 )
{
LABEL_232:
v143[v142] = 0;
v145 = v217[0];
v146 = v219;
v147 = (const char *)v219;
if ( (v217[0] & 1) == 0 )
v147 = &v217[1];
LODWORD(v148) = atoi(v147);
v149 = (v148 << 32) | (unsigned int)v224;
v150 = *(char **)(v233 + 88);
v151 = *(_QWORD *)(v233 + 96);
if ( (unsigned __int64)v150 >= v151 )
{
v224 = v146;
v152 = *v195;
v153 = v150 - (_BYTE *)*v195;
v154 = v153 >> 3;
v155 = (v153 >> 3) + 1;
v232 = v145;
if ( v155 > 0x1FFFFFFFFFFFFFFFLL )
sub_100056B00();
v156 = v151 - (_QWORD)v152;
v157 = v156 >> 2;
if ( v156 >> 2 <= v155 )
v157 = (v153 >> 3) + 1;
if ( (unsigned __int64)v156 >= 0x7FFFFFFFFFFFFFF8LL )
v157 = 0x1FFFFFFFFFFFFFFFLL;
if ( v157 )
{
if ( v157 > 0x1FFFFFFFFFFFFFFFLL )
sub_10001ADB0();
v158 = operator new(8 * v157);
}
else
{
v158 = nullptr;
}
v158[v154] = v149;
v159 = (__int64)&v158[v154 + 1];
memcpy(v158, v152, v153);
v160 = v233;
*(_QWORD *)(v233 + 80) = v158;
*(_QWORD *)(v160 + 88) = v159;
*(_QWORD *)(v160 + 96) = &v158[v157];
if ( v152 )
operator delete(v152);
LODWORD(v97) = (_DWORD)__src;
v146 = v224;
v161 = v232;
*(_QWORD *)(v233 + 88) = v159;
if ( (v161 & 1) != 0 )
LABEL_236:
operator delete(v146);
}
else
{
*(_QWORD *)v150 = v149;
LODWORD(v97) = (_DWORD)__src;
*(_QWORD *)(v233 + 88) = v150 + 8;
if ( (v145 & 1) != 0 )
goto LABEL_236;
}
if ( (v221 & 1) != 0 )
operator delete(v223);
LABEL_239:
if ( (*(_BYTE *)&v228.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v228.__r_.__value_.__l.__data_);
LODWORD(v230) = v230 + 1;
continue;
}
}
memmove(v143, &v139[v141], v142);
goto LABEL_232;
}
}
break;
}
memmove(v128, v125, v127);
goto LABEL_203;
}
}
memmove(v120, v117, v119);
v120[v119] = 0;
v121 = (unsigned __int8)v225;
if ( (v225 & 1) != 0 )
goto LABEL_185;
goto LABEL_191;
}
LABEL_168:
v97 = (unsigned int)(v97 + 1);
}
v104 = (v101 | 7) + 1;
if ( (v101 | 7) == 0x17 )
v104 = 26;
v103 = (char *)operator new(v104);
v227 = v103;
v225 = v104 | 1;
v226 = v102;
LABEL_177:
memmove(v103, v100, v102);
goto LABEL_178;
}
LABEL_286:
v193 = *(_QWORD *)(v215 + 1256);
if ( v193 )
(*(void (__fastcall **)(__int64, __int64, __int64, size_t *))(*(_QWORD *)v193 + 256LL))(v193, v216, v197, &__dst);
if ( (v210[28] & 1) != 0 )
{
operator delete(*(void **)&v210[44]);
if ( (v210[4] & 1) == 0 )
{
LABEL_290:
v194 = __p[0];
if ( !__p[0] )
goto LABEL_292;
goto LABEL_291;
}
}
else if ( (v210[4] & 1) == 0 )
{
goto LABEL_290;
}
operator delete(*(void **)&v210[20]);
v194 = __p[0];
if ( __p[0] )
{
LABEL_291:
__p[1] = v194;
operator delete(v194);
}
LABEL_292:
if ( (v200[0] & 1) != 0 )
{
operator delete(v201);
if ( (v212 & 1) == 0 )
{
LABEL_294:
if ( (v198[0] & 1) != 0 )
goto LABEL_301;
return;
}
}
else if ( (v212 & 1) == 0 )
{
goto LABEL_294;
}
operator delete(v214);
if ( (v198[0] & 1) != 0 )
LABEL_301:
operator delete(v199);
}