//
// sub_100573E40 from 0x100573e40 to 0x100574fb7 (4471 bytes)
//
// 2 xrefs:
// > sub_100539560 @ 0x100539c3f
// > sub_10053B360 @ 0x10053b4c5
//
// 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:32:16 +0000
//
void __fastcall sub_100573E40(_QWORD *a1, int a2, const std::string *a3)
{
void *v4; // rdi
std::string::size_type v5; // rax
std::string::size_type v6; // rbx
unsigned int v7; // r12d
char *data; // r14
std::string::size_type size; // r12
void *v10; // rsi
char *v11; // r13
unsigned int v12; // eax
std::string::size_type v13; // rax
size_t v14; // r14
std::string::size_type v15; // rbx
std::string::size_type v16; // r15
char *v17; // r12
std::string::size_type v18; // rax
std::string::size_type v19; // rbx
std::string::size_type v20; // rax
std::string::pointer v21; // rsi
char *v22; // r13
size_t v23; // r14
std::string::size_type v24; // r14
std::string::size_type v25; // r15
char *v26; // r12
unsigned __int128 v27; // kr00_16
size_t v28; // r13
char *v29; // r15
unsigned int i; // r15d
__int64 v31; // rax
const char *CString; // r13
size_t v33; // rax
std::string::size_type v34; // rbx
char *v35; // r12
std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v36; // r14
__int64 v37; // rax
size_t v38; // r14
_QWORD *v39; // rax
__int64 v40; // rbx
int v41; // r13d
int v42; // r12d
__int64 v43; // r14
__int64 v44; // rax
const char *v45; // rbx
size_t v46; // rax
std::string::size_type v47; // r15
char *v48; // r12
size_t v49; // r13
std::string::pointer v50; // rdi
unsigned int v51; // eax
__int64 v52; // rax
const char *v53; // rbx
size_t v54; // rax
std::string::size_type v55; // r15
char *v56; // r14
__int64 v57; // rax
size_t v58; // r12
__int64 v59; // r15
__int64 v60; // rax
__int64 v61; // rax
__int64 v62; // rax
const char *v63; // rbx
size_t v64; // rax
std::string::size_type v65; // r14
char *v66; // r13
__int64 v67; // rax
size_t v68; // r12
__int64 v69; // rbx
__int64 v70; // rax
__int64 v71; // rax
__int64 v72; // rax
__int64 v73; // rax
__int64 v74; // rax
__int64 v75; // rax
__int64 v76; // rbx
__int64 v77; // rax
const char *v78; // r14
size_t v79; // rax
std::string::size_type v80; // r15
char *v81; // r12
size_t v82; // r13
std::string::pointer v83; // rdi
unsigned int v84; // eax
__int64 v85; // rax
const char *v86; // rbx
size_t v87; // rax
std::string::size_type v88; // r14
char *v89; // r15
__int64 v90; // rax
size_t v91; // r12
__int64 v92; // rbx
__int64 v93; // rax
int v94; // eax
__int64 v95; // rax
int v96; // eax
__int64 v97; // rax
const char *v98; // r15
size_t v99; // rax
std::string::size_type v100; // r12
char *v101; // r13
__int64 v102; // rax
size_t v103; // r14
__int64 v104; // rax
int v105; // eax
__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
int v117; // eax
__int64 v118; // rax
int v119; // eax
__int64 v120; // rax
int v121; // eax
__int64 v122; // rax
int v123; // eax
__int64 v124; // rax
int v125; // eax
__int64 v126; // rax
int v127; // eax
__int64 v128; // rax
int v129; // eax
__int64 v130; // rax
int v131; // eax
__int64 v132; // rbx
__int64 v133; // rax
const char *v134; // r14
size_t v135; // rax
std::string::size_type v136; // r15
char *v137; // r12
size_t v138; // r13
size_t v139; // r12
char v140; // [rsp+0h] [rbp-190h]
char v141; // [rsp+0h] [rbp-190h]
char v142; // [rsp+0h] [rbp-190h]
std::string v143; // [rsp+8h] [rbp-188h] BYREF
__int128 v144; // [rsp+20h] [rbp-170h] BYREF
void *v145; // [rsp+30h] [rbp-160h]
std::string v146; // [rsp+40h] [rbp-150h] BYREF
std::string v147; // [rsp+60h] [rbp-130h] BYREF
std::string __str; // [rsp+80h] [rbp-110h] BYREF
__int64 v149; // [rsp+98h] [rbp-F8h]
std::string v150; // [rsp+A0h] [rbp-F0h] BYREF
std::string v151; // [rsp+B8h] [rbp-D8h] BYREF
__int128 v152; // [rsp+D0h] [rbp-C0h] BYREF
void *v153; // [rsp+E0h] [rbp-B0h]
__int128 v154; // [rsp+F0h] [rbp-A0h] BYREF
void *__p; // [rsp+100h] [rbp-90h]
__int64 v156; // [rsp+108h] [rbp-88h]
_QWORD *v157; // [rsp+110h] [rbp-80h]
int v158; // [rsp+11Ch] [rbp-74h]
std::string v159; // [rsp+120h] [rbp-70h] BYREF
void *__src; // [rsp+138h] [rbp-58h]
unsigned int j; // [rsp+144h] [rbp-4Ch]
__int64 v162; // [rsp+148h] [rbp-48h]
std::string __dst[2]; // [rsp+150h] [rbp-40h] BYREF
v158 = a2;
v157 = a1;
if ( (*(_BYTE *)&a3->__r_.__value_.__s.0 & 1) != 0 )
{
sub_10001AD30(&v154, a3->__r_.__value_.__l.__data_, a3->__r_.__value_.__l.__size_);
}
else
{
__p = a3->__r_.__value_.__l.__data_;
v154 = *(_OWORD *)&a3->__r_.__value_.__l.0;
}
memset(&v159, 0, sizeof(v159));
v152 = 0;
v153 = nullptr;
v4 = (void *)a3;
v5 = std::string::find(a3, 35, 0);
if ( v5 != -1 )
{
v6 = v5;
v7 = (unsigned int)a3->__r_.__value_.__l.0;
data = a3->__r_.__value_.__s.__data_;
if ( (v7 & 1) != 0 )
{
size = a3->__r_.__value_.__l.__size_;
v10 = a3->__r_.__value_.__l.__data_;
}
else
{
size = v7 >> 1;
v10 = (char *)&a3->__r_.__value_.__l.0 + 1;
}
if ( size >= v5 )
size = v5;
if ( size >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( size >= 0x17 )
{
__src = v10;
v162 = (__int64)a3->__r_.__value_.__r.__words + 1;
v14 = 26;
if ( (size | 7) != 0x17 )
v14 = (size | 7) + 1;
v11 = (char *)operator new(v14);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v11;
__dst[0].__r_.__value_.__r.__words[0] = v14 | 1;
__dst[0].__r_.__value_.__l.__size_ = size;
data = (char *)v162;
v10 = __src;
}
else
{
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * size);
v11 = __dst[0].__r_.__value_.__s.__data_;
if ( !size )
{
__dst[0].__r_.__value_.__s.__data_[0] = 0;
if ( (v154 & 1) == 0 )
goto LABEL_15;
goto LABEL_14;
}
}
memmove(v11, v10, size);
v11[size] = 0;
if ( (v154 & 1) == 0 )
{
LABEL_15:
__p = __dst[0].__r_.__value_.__l.__data_;
v154 = *(_OWORD *)&__dst[0].__r_.__value_.__l.0;
v12 = (unsigned int)a3->__r_.__value_.__l.0;
if ( (v12 & 1) != 0 )
{
v13 = a3->__r_.__value_.__l.__size_;
if ( v13 <= v6 )
goto LABEL_221;
data = a3->__r_.__value_.__l.__data_;
}
else
{
v13 = v12 >> 1;
if ( v6 >= v13 )
LABEL_221:
sub_100056810();
}
v15 = v6 + 1;
v16 = v13 - v15;
if ( v13 - v15 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v16 >= 0x17 )
{
v22 = data;
v23 = 26;
if ( (v16 | 7) != 0x17 )
v23 = (v16 | 7) + 1;
v17 = (char *)operator new(v23);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v17;
__dst[0].__r_.__value_.__r.__words[0] = v23 | 1;
__dst[0].__r_.__value_.__l.__size_ = v16;
data = v22;
}
else
{
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v16);
v17 = __dst[0].__r_.__value_.__s.__data_;
if ( v13 == v15 )
{
*((_BYTE *)&__dst[0].__r_.__value_.__l.0 + v16 + 1) = 0;
if ( (*(_BYTE *)&v159.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_30;
goto LABEL_29;
}
}
memmove(v17, &data[v15], v16);
v17[v16] = 0;
if ( (*(_BYTE *)&v159.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_30:
v159 = __dst[0];
v4 = &v159;
v18 = std::string::find(&v159, 35, 0);
if ( v18 == -1 )
goto LABEL_62;
v19 = v18;
if ( (*(_BYTE *)&v159.__r_.__value_.__s.0 & 1) != 0 )
{
v20 = v159.__r_.__value_.__l.__size_;
if ( v159.__r_.__value_.__l.__size_ > v19 )
{
v21 = v159.__r_.__value_.__l.__data_;
LABEL_41:
v24 = v19 + 1;
v25 = v20 - (v19 + 1);
if ( v25 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v25 >= 0x17 )
{
v162 = (__int64)v21;
v28 = 26;
if ( (v25 | 7) != 0x17 )
v28 = (v25 | 7) + 1;
v26 = (char *)operator new(v28);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v26;
__dst[0].__r_.__value_.__r.__words[0] = v28 | 1;
__dst[0].__r_.__value_.__l.__size_ = v25;
v21 = (std::string::pointer)v162;
}
else
{
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v25);
v26 = __dst[0].__r_.__value_.__s.__data_;
if ( v20 == v24 )
{
*((_BYTE *)&__dst[0].__r_.__value_.__l.0 + v25 + 1) = 0;
if ( (v152 & 1) == 0 )
goto LABEL_46;
goto LABEL_45;
}
}
v4 = v26;
memmove(v26, &v21[v24], v25);
v26[v25] = 0;
if ( (v152 & 1) == 0 )
{
LABEL_46:
v153 = __dst[0].__r_.__value_.__l.__data_;
v152 = *(_OWORD *)&__dst[0].__r_.__value_.__l.0;
if ( (*(_BYTE *)&v159.__r_.__value_.__s.0 & 1) != 0 )
v27 = *(_OWORD *)&v159.__r_.__value_.__r.__words[1];
else
v27 = __PAIR128__(
(std::string *)((char *)&v159.__r_.__value_.__l.0 + 1),
*(_BYTE *)&v159.__r_.__value_.__l.0 >> 1);
if ( (unsigned __int64)v27 < v19 )
v19 = v27;
if ( v19 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v19 >= 0x17 )
{
v139 = 26;
if ( (v19 | 7) != 0x17 )
v139 = (v19 | 7) + 1;
v29 = (char *)operator new(v139);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v29;
__dst[0].__r_.__value_.__r.__words[0] = v139 | 1;
__dst[0].__r_.__value_.__l.__size_ = v19;
}
else
{
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v19);
v29 = __dst[0].__r_.__value_.__s.__data_;
if ( !v19 )
{
__dst[0].__r_.__value_.__s.__data_[0] = 0;
if ( (*(_BYTE *)&v159.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_61:
v159 = __dst[0];
goto LABEL_62;
}
LABEL_60:
v4 = v159.__r_.__value_.__l.__data_;
operator delete(v159.__r_.__value_.__l.__data_);
goto LABEL_61;
}
}
v4 = v29;
memmove(v29, *((const void **)&v27 + 1), v19);
v29[v19] = 0;
if ( (*(_BYTE *)&v159.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_61;
goto LABEL_60;
}
LABEL_45:
v4 = v153;
operator delete(v153);
goto LABEL_46;
}
}
else
{
v20 = *(_BYTE *)&v159.__r_.__value_.__l.0 >> 1;
if ( v19 < v20 )
{
v21 = v159.__r_.__value_.__s.__data_;
goto LABEL_41;
}
}
sub_100056810();
}
LABEL_29:
operator delete(v159.__r_.__value_.__l.__data_);
goto LABEL_30;
}
LABEL_14:
operator delete(__p);
goto LABEL_15;
}
LABEL_62:
__src = (void *)sub_1007FE900(v4);
if ( (v154 & 1) == 0 )
{
if ( !((unsigned __int8)v154 >> 1) )
goto LABEL_90;
goto LABEL_66;
}
if ( *((_QWORD *)&v154 + 1) )
{
LABEL_66:
v162 = sub_10053FBE0((unsigned __int8 *)&v154, "|");
for ( i = 0; i < (unsigned int)sub_1007FEF90(v162); ++i )
{
v31 = sub_1007FEFE0(v162, i);
CString = (const char *)cocos2d::CCString::getCString(v31);
v33 = strlen(CString);
if ( v33 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v34 = v33;
if ( v33 >= 0x17 )
{
v37 = v33 | 7;
v38 = 26;
if ( (v34 | 7) != 0x17 )
v38 = v37 + 1;
v35 = (char *)operator new(v38);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v35;
__dst[0].__r_.__value_.__r.__words[0] = v38 | 1;
__dst[0].__r_.__value_.__l.__size_ = v34;
}
else
{
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v33);
v35 = __dst[0].__r_.__value_.__s.__data_;
if ( !v33 )
{
__dst[0].__r_.__value_.__s.__data_[0] = 0;
v36 = __dst[0].__r_.__value_.__s.0;
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_73;
goto LABEL_78;
}
}
memmove(v35, CString, v34);
v35[v34] = 0;
v36 = __dst[0].__r_.__value_.__s.0;
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_73:
v145 = __dst[0].__r_.__value_.__l.__data_;
v144 = *(_OWORD *)&__dst[0].__r_.__value_.__l.0;
goto LABEL_79;
}
LABEL_78:
sub_10001AD30(&v144, __dst[0].__r_.__value_.__l.__data_, __dst[0].__r_.__value_.__l.__size_);
LABEL_79:
v39 = GameLevelManager::responseToDict((__int64)&v144, 0);
v40 = GJUserScore::create((__int64)v39);
if ( (v144 & 1) != 0 )
operator delete(v145);
if ( v40 && *(int *)(v40 + 376) > 0 )
{
sub_1007FEBF0(__src, v40);
v41 = *(_DWORD *)(v40 + 372);
v42 = *(_DWORD *)(v40 + 376);
if ( (*(_BYTE *)(v40 + 320) & 1) != 0 )
sub_10001AD30(&v146, *(const void **)(v40 + 336), *(_QWORD *)(v40 + 328));
else
v146 = *(std::string *)(v40 + 320);
GameLevelManager::storeUserName((__int64)v157, v41, v42, &v146);
if ( (*(_BYTE *)&v146.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v146.__r_.__value_.__l.__data_);
}
if ( (*(_BYTE *)&v36 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
}
}
LABEL_90:
v43 = v157[137];
v44 = sub_10088E820("%i", v140);
v45 = (const char *)cocos2d::CCString::getCString(v44);
v46 = strlen(v45);
if ( v46 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v47 = v46;
if ( v46 >= 0x17 )
{
v49 = 26;
if ( (v46 | 7) != 0x17 )
v49 = (v46 | 7) + 1;
v48 = (char *)operator new(v49);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v48;
__dst[0].__r_.__value_.__r.__words[0] = v49 | 1;
__dst[0].__r_.__value_.__l.__size_ = v47;
goto LABEL_97;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v46);
v48 = __dst[0].__r_.__value_.__s.__data_;
if ( v46 )
LABEL_97:
memmove(v48, v45, v47);
v48[v47] = 0;
v50 = (std::string::pointer)v43;
cocos2d::CCDictionary::setObject(v43, (__int64)__src, (char *)__dst);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
{
v50 = __dst[0].__r_.__value_.__l.__data_;
operator delete(__dst[0].__r_.__value_.__l.__data_);
}
v149 = sub_1007FE900(v50);
if ( (*(_BYTE *)&v159.__r_.__value_.__s.0 & 1) == 0 )
{
if ( !(*(_BYTE *)&v159.__r_.__value_.__l.0 >> 1) )
goto LABEL_145;
goto LABEL_104;
}
if ( v159.__r_.__value_.__l.__size_ )
{
LABEL_104:
v162 = sub_10053FBE0((unsigned __int8 *)&v159, "|");
for ( LODWORD(__src) = 0; ; LODWORD(__src) = (_DWORD)__src + 1 )
{
v51 = sub_1007FEF90(v162);
if ( (unsigned int)__src >= v51 )
goto LABEL_145;
v52 = cocos2d::CCArray::stringAtIndex(v162, (unsigned int)__src);
v53 = (const char *)cocos2d::CCString::getCString(v52);
v54 = strlen(v53);
if ( v54 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v55 = v54;
if ( v54 >= 0x17 )
break;
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v54);
v56 = __dst[0].__r_.__value_.__s.__data_;
if ( v54 )
goto LABEL_114;
LABEL_115:
v56[v55] = 0;
v59 = sub_10053FBE0((unsigned __int8 *)__dst, ":");
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1007FEF90(v59) >= 3 )
{
v60 = cocos2d::CCArray::stringAtIndex(v59, 0);
j = cocos2d::CCString::intValue(v60);
v61 = cocos2d::CCArray::stringAtIndex(v59, 1);
LODWORD(v156) = cocos2d::CCString::intValue(v61);
v62 = cocos2d::CCArray::stringAtIndex(v59, 2);
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);
v150.__r_.__value_.__r.__words[2] = (std::string::size_type)v66;
v150.__r_.__value_.__r.__words[0] = v68 | 1;
v150.__r_.__value_.__l.__size_ = v65;
}
else
{
v150.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v64);
v66 = v150.__r_.__value_.__s.__data_;
if ( !v64 )
{
LABEL_126:
v66[v65] = 0;
LevelTools::base64DecodeString(__dst, &v150);
if ( (*(_BYTE *)&v150.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v150.__r_.__value_.__l.__data_);
if ( (int)j > 0 )
{
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
{
if ( __dst[0].__r_.__value_.__l.__size_ )
{
sub_10001AD30(&v147, __dst[0].__r_.__value_.__l.__data_, __dst[0].__r_.__value_.__l.__size_);
LABEL_134:
GameLevelManager::storeUserName((__int64)v157, v156, j, &v147);
if ( (*(_BYTE *)&v147.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v147.__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1007FEF90(v59) >= 9 )
{
v69 = GJUserScore::create_1();
*(_DWORD *)(v69 + 376) = j;
*(_DWORD *)(v69 + 372) = v156;
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
sub_10001AD30(&__str, __dst[0].__r_.__value_.__l.__data_, __dst[0].__r_.__value_.__l.__size_);
else
__str = __dst[0];
std::string::operator=((std::string *)(v69 + 320), &__str);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
v70 = cocos2d::CCArray::stringAtIndex(v59, 3);
*(_DWORD *)(v69 + 412) = cocos2d::CCString::intValue(v70);
v71 = cocos2d::CCArray::stringAtIndex(v59, 4);
*(_DWORD *)(v69 + 416) = cocos2d::CCString::intValue(v71);
v72 = cocos2d::CCArray::stringAtIndex(v59, 5);
*(_DWORD *)(v69 + 420) = cocos2d::CCString::intValue(v72);
v73 = cocos2d::CCArray::stringAtIndex(v59, 6);
*(_DWORD *)(v69 + 424) = cocos2d::CCString::intValue(v73);
v74 = cocos2d::CCArray::stringAtIndex(v59, 7);
*(_DWORD *)(v69 + 432) = cocos2d::CCString::intValue(v74);
v75 = cocos2d::CCArray::stringAtIndex(v59, 8);
*(_DWORD *)(v69 + 428) = cocos2d::CCString::intValue(v75);
sub_1007FEBF0(v149, v69);
}
}
}
else if ( __dst[0].__r_.__value_.__s.0 )
{
v147 = __dst[0];
goto LABEL_134;
}
}
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
continue;
}
}
memmove(v66, v63, v65);
goto LABEL_126;
}
}
v57 = v54 | 7;
v58 = 26;
if ( (v55 | 7) != 0x17 )
v58 = v57 + 1;
v56 = (char *)operator new(v58);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v56;
__dst[0].__r_.__value_.__r.__words[0] = v58 | 1;
__dst[0].__r_.__value_.__l.__size_ = v55;
LABEL_114:
memmove(v56, v53, v55);
goto LABEL_115;
}
LABEL_145:
v76 = v157[139];
v77 = sub_10088E820("%i", v141);
v78 = (const char *)cocos2d::CCString::getCString(v77);
v79 = strlen(v78);
if ( v79 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v80 = v79;
if ( v79 >= 0x17 )
{
v82 = 26;
if ( (v79 | 7) != 0x17 )
v82 = (v79 | 7) + 1;
v81 = (char *)operator new(v82);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v81;
__dst[0].__r_.__value_.__r.__words[0] = v82 | 1;
__dst[0].__r_.__value_.__l.__size_ = v80;
goto LABEL_152;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v79);
v81 = __dst[0].__r_.__value_.__s.__data_;
if ( v79 )
LABEL_152:
memmove(v81, v78, v80);
v81[v80] = 0;
v83 = (std::string::pointer)v76;
cocos2d::CCDictionary::setObject(v76, v149, (char *)__dst);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
{
v83 = __dst[0].__r_.__value_.__l.__data_;
operator delete(__dst[0].__r_.__value_.__l.__data_);
}
v156 = sub_1007FE900(v83);
if ( (v152 & 1) == 0 )
{
if ( !((unsigned __int8)v152 >> 1) )
goto LABEL_189;
goto LABEL_159;
}
if ( *((_QWORD *)&v152 + 1) )
{
LABEL_159:
__src = (void *)sub_10053FBE0((unsigned __int8 *)&v152, "|");
for ( j = 0; ; ++j )
{
v84 = sub_1007FEF90(__src);
if ( j >= v84 )
goto LABEL_189;
v85 = cocos2d::CCArray::stringAtIndex(__src, j);
v86 = (const char *)cocos2d::CCString::getCString(v85);
v87 = strlen(v86);
if ( v87 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v88 = v87;
if ( v87 >= 0x17 )
break;
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v87);
v89 = __dst[0].__r_.__value_.__s.__data_;
if ( v87 )
goto LABEL_169;
LABEL_170:
v89[v88] = 0;
v92 = sub_10053FBE0((unsigned __int8 *)__dst, ":");
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1007FEF90(v92) >= 4 )
{
v162 = GJUserScore::create_1();
v93 = cocos2d::CCArray::stringAtIndex(v92, 0);
v94 = cocos2d::CCString::intValue(v93);
*(_DWORD *)(v162 + 376) = v94;
v95 = cocos2d::CCArray::stringAtIndex(v92, 1);
v96 = cocos2d::CCString::intValue(v95);
*(_DWORD *)(v162 + 372) = v96;
v97 = cocos2d::CCArray::stringAtIndex(v92, 2);
v98 = (const char *)cocos2d::CCString::getCString(v97);
v99 = strlen(v98);
if ( v99 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v100 = v99;
if ( v99 >= 0x17 )
{
v102 = v99 | 7;
v103 = 26;
if ( (v100 | 7) != 0x17 )
v103 = v102 + 1;
v101 = (char *)operator new(v103);
v151.__r_.__value_.__r.__words[2] = (std::string::size_type)v101;
v151.__r_.__value_.__r.__words[0] = v103 | 1;
v151.__r_.__value_.__l.__size_ = v100;
}
else
{
v151.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v99);
v101 = v151.__r_.__value_.__s.__data_;
if ( !v99 )
goto LABEL_181;
}
memmove(v101, v98, v100);
LABEL_181:
v101[v100] = 0;
LevelTools::base64DecodeString(&v143, &v151);
std::string::operator=((std::string *)(v162 + 320), &v143);
if ( (*(_BYTE *)&v143.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v143.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v151.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v151.__r_.__value_.__l.__data_);
v104 = cocos2d::CCArray::stringAtIndex(v92, 3);
v105 = cocos2d::CCString::intValue(v104);
*(_DWORD *)(v162 + 396) = v105;
if ( (unsigned int)sub_1007FEF90(v92) >= 0x11 )
{
v106 = cocos2d::CCArray::stringAtIndex(v92, 4);
v107 = cocos2d::CCString::intValue(v106);
*(_DWORD *)(v162 + 412) = v107;
v108 = cocos2d::CCArray::stringAtIndex(v92, 5);
v109 = cocos2d::CCString::intValue(v108);
*(_DWORD *)(v162 + 416) = v109;
v110 = cocos2d::CCArray::stringAtIndex(v92, 6);
v111 = cocos2d::CCString::intValue(v110);
*(_DWORD *)(v162 + 420) = v111;
v112 = cocos2d::CCArray::stringAtIndex(v92, 7);
v113 = cocos2d::CCString::intValue(v112);
*(_DWORD *)(v162 + 424) = v113;
v114 = cocos2d::CCArray::stringAtIndex(v92, 8);
v115 = cocos2d::CCString::intValue(v114);
*(_DWORD *)(v162 + 432) = v115;
v116 = cocos2d::CCArray::stringAtIndex(v92, 9);
v117 = cocos2d::CCString::intValue(v116);
*(_DWORD *)(v162 + 428) = v117;
v118 = cocos2d::CCArray::stringAtIndex(v92, 10);
v119 = cocos2d::CCString::intValue(v118);
*(_DWORD *)(v162 + 380) = v119;
v120 = cocos2d::CCArray::stringAtIndex(v92, 11);
v121 = cocos2d::CCString::intValue(v120);
*(_DWORD *)(v162 + 384) = v121;
v122 = cocos2d::CCArray::stringAtIndex(v92, 12);
v123 = cocos2d::CCString::intValue(v122);
*(_DWORD *)(v162 + 392) = v123;
v124 = cocos2d::CCArray::stringAtIndex(v92, 13);
v125 = cocos2d::CCString::intValue(v124);
*(_DWORD *)(v162 + 404) = v125;
v126 = cocos2d::CCArray::stringAtIndex(v92, 14);
v127 = cocos2d::CCString::intValue(v126);
*(_DWORD *)(v162 + 408) = v127;
v128 = cocos2d::CCArray::stringAtIndex(v92, 15);
v129 = cocos2d::CCString::intValue(v128);
*(_DWORD *)(v162 + 388) = v129;
v130 = cocos2d::CCArray::stringAtIndex(v92, 16);
v131 = cocos2d::CCString::intValue(v130);
*(_DWORD *)(v162 + 456) = v131;
}
if ( *(int *)(v162 + 376) > 0 )
sub_1007FEBF0(v156, v162);
continue;
}
}
v90 = v87 | 7;
v91 = 26;
if ( (v88 | 7) != 0x17 )
v91 = v90 + 1;
v89 = (char *)operator new(v91);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v89;
__dst[0].__r_.__value_.__r.__words[0] = v91 | 1;
__dst[0].__r_.__value_.__l.__size_ = v88;
LABEL_169:
memmove(v89, v86, v88);
goto LABEL_170;
}
LABEL_189:
v132 = v157[138];
v133 = sub_10088E820("%i", v142);
v134 = (const char *)cocos2d::CCString::getCString(v133);
v135 = strlen(v134);
if ( v135 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v136 = v135;
if ( v135 >= 0x17 )
{
v138 = 26;
if ( (v135 | 7) != 0x17 )
v138 = (v135 | 7) + 1;
v137 = (char *)operator new(v138);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)v137;
__dst[0].__r_.__value_.__r.__words[0] = v138 | 1;
__dst[0].__r_.__value_.__l.__size_ = v136;
goto LABEL_196;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v135);
v137 = __dst[0].__r_.__value_.__s.__data_;
if ( v135 )
LABEL_196:
memmove(v137, v134, v136);
v137[v136] = 0;
cocos2d::CCDictionary::setObject(v132, v156, (char *)__dst);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
{
operator delete(__dst[0].__r_.__value_.__l.__data_);
if ( (v152 & 1) == 0 )
{
LABEL_199:
if ( (*(_BYTE *)&v159.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_200;
goto LABEL_205;
}
}
else if ( (v152 & 1) == 0 )
{
goto LABEL_199;
}
operator delete(v153);
if ( (*(_BYTE *)&v159.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_200:
if ( (v154 & 1) == 0 )
return;
goto LABEL_201;
}
LABEL_205:
operator delete(v159.__r_.__value_.__l.__data_);
if ( (v154 & 1) != 0 )
LABEL_201:
operator delete(__p);
}