//
// MusicDownloadManager::parseSFXLibrary from 0x10065f910 to 0x100660941 (4145 bytes)
//
// 3 xrefs:
// > SFXBrowser::init @ 0x10042dd55
// > MusicDownloadManager::onDownloadSFXLibraryCompleted @ 0x10065f829
// > MusicDownloadManager::tryLoadLibraries @ 0x100660cbf
//
// 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:34:56 +0000
//
void __fastcall MusicDownloadManager::parseSFXLibrary(__int64 a1)
{
__int64 v1; // rax
std::string::pointer data; // rsi
std::string::value_type *v3; // rax
std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v4; // al
std::string::size_type v5; // rbx
std::string::size_type v6; // rax
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // rcx
_DWORD *v9; // rdi
_DWORD *v10; // rdi
_QWORD *v11; // rax
_QWORD *v12; // rdi
__int64 v13; // rax
unsigned __int64 i; // r12
void **v15; // rbx
void **v16; // r14
char *v17; // r13
const char *v18; // r13
size_t v19; // rax
std::string::size_type v20; // rbx
char *v21; // r14
char *v22; // rbx
int v23; // r14d
int v24; // r13d
int v25; // r15d
const char *v26; // rbx
size_t v27; // r15
int v28; // ebx
const char *v29; // rdi
int v30; // eax
char *v31; // rbx
__int64 v32; // rsi
__int64 v33; // rax
char *v34; // rbx
__int64 v35; // rsi
__int64 v36; // rax
std::string::size_type v37; // rax
unsigned __int64 j; // r12
void **v39; // rbx
void **v40; // r13
void *v41; // rax
__int64 v42; // rbx
char *v43; // rax
_DWORD *v44; // rdi
__int64 v45; // rax
char v46; // cl
unsigned __int64 v47; // rdx
char v48; // al
__int128 v49; // kr00_16
__int64 v50; // r13
void **v51; // rdi
unsigned __int8 *v52; // rdi
unsigned int v53; // edx
void **v54; // rbx
void **v55; // r14
int v56; // ebx
int v57; // r15d
const char *v58; // r14
int v59; // r12d
_QWORD *v60; // r14
__int64 v61; // rax
unsigned int v62; // eax
__int128 v63; // kr20_16
__int64 v64; // r15
void *v65; // rdi
unsigned __int8 *v66; // rdi
unsigned int v67; // edx
void *v68; // rax
__int64 v69; // rbx
char *v70; // rax
void **v71; // rbx
void **v72; // r12
void **v73; // rbx
void **v74; // rdi
void **v75; // r14
__int64 v76; // rax
__int64 v77; // rbx
__int64 v78; // r14
__int64 v79; // rdi
__int64 v80; // rax
std::string::size_type v81; // rbx
std::string::size_type v82; // r14
void *v83; // rdi
void **v84; // rbx
void **v85; // r14
void *v86; // rdi
void **v87; // rbx
void **v88; // r14
void *v89; // rdi
std::string::size_type size; // r14
void *v91; // rdi
std::string v92; // [rsp+0h] [rbp-280h] BYREF
std::string v93; // [rsp+20h] [rbp-260h] BYREF
std::string v94; // [rsp+38h] [rbp-248h] BYREF
std::string v95; // [rsp+50h] [rbp-230h] BYREF
__int128 v96; // [rsp+70h] [rbp-210h] BYREF
void *v97; // [rsp+80h] [rbp-200h]
std::string v98; // [rsp+90h] [rbp-1F0h] BYREF
std::string v99; // [rsp+B0h] [rbp-1D0h] BYREF
std::string v100; // [rsp+D0h] [rbp-1B0h] BYREF
std::string v101; // [rsp+F0h] [rbp-190h] BYREF
__int64 v102; // [rsp+108h] [rbp-178h] BYREF
__int128 v103; // [rsp+110h] [rbp-170h] BYREF
__int64 v104; // [rsp+120h] [rbp-160h]
__int128 v105; // [rsp+130h] [rbp-150h] BYREF
__int64 v106; // [rsp+140h] [rbp-140h]
void *v107[2]; // [rsp+150h] [rbp-130h] BYREF
__int64 v108; // [rsp+160h] [rbp-120h]
void *v109[2]; // [rsp+170h] [rbp-110h] BYREF
__int64 v110; // [rsp+180h] [rbp-100h]
void *v111[2]; // [rsp+190h] [rbp-F0h] BYREF
__int64 v112; // [rsp+1A0h] [rbp-E0h]
__int128 v113; // [rsp+1B0h] [rbp-D0h] BYREF
void *__p; // [rsp+1C0h] [rbp-C0h]
void *v115[2]; // [rsp+1D0h] [rbp-B0h] BYREF
__int64 v116; // [rsp+1E0h] [rbp-A0h]
std::string v117; // [rsp+1F0h] [rbp-90h] BYREF
void *v118[2]; // [rsp+210h] [rbp-70h] BYREF
__int64 v119; // [rsp+220h] [rbp-60h]
int v120; // [rsp+22Ch] [rbp-54h]
std::string __dst; // [rsp+230h] [rbp-50h] BYREF
__int64 v122; // [rsp+250h] [rbp-30h]
v122 = a1;
MusicDownloadManager::pathForSFXFolder(&v93, a1, 0);
std::string::append(&v93, "sfxlibrary.dat");
v102 = 0;
v1 = cocos2d::CCFileUtils::sharedFileUtils(&v93, "sfxlibrary.dat");
if ( (*(_BYTE *)&v93.__r_.__value_.__s.0 & 1) != 0 )
data = v93.__r_.__value_.__l.__data_;
else
data = v93.__r_.__value_.__s.__data_;
v3 = (std::string::value_type *)(*(__int64 (__fastcall **)(__int64, std::string::pointer, const char *, __int64 *))(*(_QWORD *)v1 + 32LL))(
v1,
data,
"r",
&v102);
v113 = 0;
__p = nullptr;
if ( !v3 )
goto LABEL_224;
cocos2d::ZipUtils::decompressString2(&v117, v3, 0, v102, 11);
if ( (v113 & 1) != 0 )
operator delete(__p);
__p = v117.__r_.__value_.__l.__data_;
v113 = *(_OWORD *)&v117.__r_.__value_.__l.0;
v4 = v117.__r_.__value_.__s.0;
if ( (*(_BYTE *)&v117.__r_.__value_.__s.0 & 1) == 0 )
{
if ( !(*(_BYTE *)&v117.__r_.__value_.__l.0 >> 1) )
goto LABEL_222;
LABEL_11:
memset(&v117, 0, sizeof(v117));
sub_10064E0E0((unsigned __int8 *)&v113, "|", (__int64)&v117);
v5 = v117.__r_.__value_.__r.__words[0];
if ( 0xAAAAAAAAAAAAAAABLL * ((__int64)(v117.__r_.__value_.__l.__size_ - v117.__r_.__value_.__r.__words[0]) >> 3) < 2 )
{
LABEL_213:
if ( v5 )
{
size = v117.__r_.__value_.__l.__size_;
v91 = (void *)v5;
if ( v117.__r_.__value_.__l.__size_ != v5 )
{
do
{
if ( (*(_BYTE *)(size - 24) & 1) != 0 )
operator delete(*(void **)(size - 8));
size -= 24LL;
}
while ( size != v5 );
v91 = (void *)v117.__r_.__value_.__r.__words[0];
}
v117.__r_.__value_.__l.__size_ = v5;
operator delete(v91);
}
v4 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)v113;
goto LABEL_222;
}
*(_OWORD *)v115 = 0;
v116 = 0;
sub_10064E0E0((unsigned __int8 *)v117.__r_.__value_.__r.__words[0], ";", (__int64)v115);
v6 = v117.__r_.__value_.__r.__words[0];
if ( (*(_BYTE *)v117.__r_.__value_.__r.__words[0] & 1) != 0 )
{
**(_BYTE **)(v117.__r_.__value_.__r.__words[0] + 16) = 0;
*(_QWORD *)(v6 + 8) = 0;
}
else
{
*(_WORD *)v117.__r_.__value_.__r.__words[0] = 0;
}
*(_OWORD *)v118 = 0;
v119 = 0;
v7 = (unsigned __int8 *)v115[0];
v8 = (unsigned __int8 *)v115[1];
if ( v115[1] != v115[0] )
{
v9 = *(_DWORD **)(v122 + 400);
if ( v9 )
{
cocos2d::CCObject::release(v9);
v10 = *(_DWORD **)(v122 + 408);
if ( v10 )
cocos2d::CCObject::release(v10);
}
v11 = cocos2d::CCDictionary::create();
*(_QWORD *)(v122 + 400) = v11;
v12 = v11;
cocos2d::CCObject::retain((__int64)v11);
v13 = sub_1007FE900(v12);
*(_QWORD *)(v122 + 408) = v13;
cocos2d::CCObject::retain(v13);
*(_DWORD *)(v122 + 428) = 0;
v7 = (unsigned __int8 *)v115[0];
v8 = (unsigned __int8 *)v115[1];
}
if ( v8 != v7 )
{
for ( i = 0; 0xAAAAAAAAAAAAAAABLL * (((char *)v115[1] - (char *)v115[0]) >> 3) > i; ++i )
{
v15 = (void **)v118[0];
v16 = (void **)v118[1];
if ( v118[1] != v118[0] )
{
do
{
if ( (*(_BYTE *)(v16 - 3) & 1) != 0 )
operator delete(*(v16 - 1));
v16 -= 3;
}
while ( v16 != v15 );
v7 = (unsigned __int8 *)v115[0];
}
v118[1] = v15;
sub_10064E0E0(&v7[24 * i], ",", (__int64)v118);
v17 = (char *)v118[0];
if ( 0xAAAAAAAAAAAAAAABLL * (((char *)v118[1] - (char *)v118[0]) >> 3) < 6 )
goto LABEL_22;
if ( (*(_BYTE *)v118[0] & 1) != 0 )
{
v120 = atoi(*((const char **)v118[0] + 2));
if ( (v17[24] & 1) != 0 )
{
LABEL_32:
v18 = *((const char **)v17 + 5);
goto LABEL_35;
}
}
else
{
v120 = atoi((const char *)v118[0] + 1);
if ( (v17[24] & 1) != 0 )
goto LABEL_32;
}
v18 = v17 + 25;
LABEL_35:
v19 = strlen(v18);
if ( v19 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v20 = v19;
if ( v19 >= 0x17 )
{
v27 = (v19 | 7) + 1;
if ( (v19 | 7) == 0x17 )
v27 = 26;
v21 = (char *)operator new(v27);
__dst.__r_.__value_.__r.__words[2] = (std::string::size_type)v21;
__dst.__r_.__value_.__r.__words[0] = v27 | 1;
__dst.__r_.__value_.__l.__size_ = v20;
}
else
{
__dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v19);
v21 = __dst.__r_.__value_.__s.__data_;
if ( !v19 )
{
__dst.__r_.__value_.__s.__data_[0] = 0;
v22 = (char *)v118[0];
if ( (*((_BYTE *)v118[0] + 48) & 1) == 0 )
goto LABEL_39;
goto LABEL_47;
}
}
memmove(v21, v18, v20);
v21[v20] = 0;
v22 = (char *)v118[0];
if ( (*((_BYTE *)v118[0] + 48) & 1) == 0 )
{
LABEL_39:
v23 = atoi(v22 + 49);
if ( (v22[72] & 1) != 0 )
goto LABEL_40;
goto LABEL_48;
}
LABEL_47:
v23 = atoi(*((const char **)v22 + 8));
if ( (v22[72] & 1) != 0 )
{
LABEL_40:
v24 = atoi(*((const char **)v22 + 11));
if ( (v22[96] & 1) != 0 )
goto LABEL_41;
goto LABEL_49;
}
LABEL_48:
v24 = atoi(v22 + 73);
if ( (v22[96] & 1) != 0 )
{
LABEL_41:
v25 = atoi(*((const char **)v22 + 14));
if ( (v22[120] & 1) != 0 )
goto LABEL_42;
goto LABEL_50;
}
LABEL_49:
v25 = atoi(v22 + 97);
if ( (v22[120] & 1) != 0 )
{
LABEL_42:
v26 = *((const char **)v22 + 17);
goto LABEL_51;
}
LABEL_50:
v26 = v22 + 121;
LABEL_51:
v28 = atoi(v26);
if ( v120 == 1 )
{
v29 = __dst.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
v29 = __dst.__r_.__value_.__l.__data_;
v30 = atoi(v29);
*(_DWORD *)(v122 + 424) = v30;
std::string::assign(&__dst, "Root");
}
if ( v23 )
{
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
{
sub_10001AD30(&v96, __dst.__r_.__value_.__l.__data_, __dst.__r_.__value_.__l.__size_);
}
else
{
v97 = __dst.__r_.__value_.__l.__data_;
v96 = *(_OWORD *)&__dst.__r_.__value_.__l.0;
}
v31 = SFXFolderObject::create(v120, &v96, v24);
cocos2d::CCDictionary::setObject_1(*(_QWORD *)(v122 + 400), (__int64)v31, *((int *)v31 + 14));
v32 = *((int *)v31 + 15);
if ( v32 > 0 )
{
v33 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(v122 + 400), v32);
if ( v33 )
{
if ( *(_BYTE *)(v33 + 72) == 1 )
sub_1007FEBF0(*(_QWORD *)(v33 + 152), v31);
}
}
if ( (v96 & 1) != 0 )
operator delete(v97);
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_22;
}
else
{
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
sub_10001AD30(&v95, __dst.__r_.__value_.__l.__data_, __dst.__r_.__value_.__l.__size_);
else
v95 = __dst;
v34 = SFXInfoObject::create(v120, &v95, v24, v25, v28);
cocos2d::CCDictionary::setObject_1(*(_QWORD *)(v122 + 400), (__int64)v34, *((int *)v34 + 14));
v35 = *((int *)v34 + 15);
if ( v35 > 0 )
{
v36 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(v122 + 400), v35);
if ( v36 )
{
if ( *(_BYTE *)(v36 + 72) == 1 )
sub_1007FEBF0(*(_QWORD *)(v36 + 152), v34);
}
}
if ( (*(_BYTE *)&v95.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v95.__r_.__value_.__l.__data_);
++*(_DWORD *)(v122 + 428);
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_22;
}
operator delete(__dst.__r_.__value_.__l.__data_);
LABEL_22:
v7 = (unsigned __int8 *)v115[0];
}
}
memset(&__dst, 0, sizeof(__dst));
sub_10064E0E0((unsigned __int8 *)(v117.__r_.__value_.__r.__words[0] + 24), ";", (__int64)&__dst);
v37 = __dst.__r_.__value_.__r.__words[0];
if ( __dst.__r_.__value_.__l.__size_ != __dst.__r_.__value_.__r.__words[0] )
{
for ( j = 0;
0xAAAAAAAAAAAAAAABLL
* ((__int64)(__dst.__r_.__value_.__l.__size_ - __dst.__r_.__value_.__r.__words[0]) >> 3) > j;
++j )
{
v39 = (void **)v118[0];
v40 = (void **)v118[1];
if ( v118[1] != v118[0] )
{
do
{
if ( (*(_BYTE *)(v40 - 3) & 1) != 0 )
operator delete(*(v40 - 1));
v40 -= 3;
}
while ( v40 != v39 );
v37 = __dst.__r_.__value_.__r.__words[0];
}
v118[1] = v39;
sub_10064E0E0((unsigned __int8 *)(v37 + 24 * j), ",", (__int64)v118);
v41 = v118[0];
if ( 0xAAAAAAAAAAAAAAABLL * (((char *)v118[1] - (char *)v118[0]) >> 3) < 2 )
goto LABEL_80;
v42 = *(_QWORD *)(v122 + 408);
if ( (*(_BYTE *)v118[0] & 1) != 0 )
{
sub_10001AD30(&v98, *((const void **)v118[0] + 2), *((_QWORD *)v118[0] + 1));
v41 = v118[0];
if ( (*((_BYTE *)v118[0] + 24) & 1) != 0 )
{
LABEL_92:
sub_10001AD30(&v92, *((const void **)v41 + 5), *((_QWORD *)v41 + 4));
goto LABEL_93;
}
}
else
{
v98 = *(std::string *)v118[0];
if ( (*((_BYTE *)v118[0] + 24) & 1) != 0 )
goto LABEL_92;
}
v92 = *(std::string *)((_BYTE *)v41 + 1);
LABEL_93:
v43 = CCURLObject::create(&v98, &v92);
sub_1007FEBF0(v42, v43);
if ( (*(_BYTE *)&v92.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v92.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v98.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v98.__r_.__value_.__l.__data_);
LABEL_80:
v37 = __dst.__r_.__value_.__r.__words[0];
}
}
v44 = *(_DWORD **)(v122 + 416);
if ( v44 )
cocos2d::CCObject::release(v44);
v45 = sub_1007FE900(v44);
*(_QWORD *)(v122 + 416) = v45;
cocos2d::CCObject::retain(v45);
if ( 0xAAAAAAAAAAAAAAABLL * ((__int64)(v117.__r_.__value_.__l.__size_ - v117.__r_.__value_.__r.__words[0]) >> 3) >= 3 )
{
v46 = *(_BYTE *)(v117.__r_.__value_.__r.__words[0] + 48);
if ( (v46 & 1) != 0 )
{
v47 = *(_QWORD *)(v117.__r_.__value_.__r.__words[0] + 56);
if ( v47 )
{
sub_10001AD30(&v99, *(const void **)(v117.__r_.__value_.__r.__words[0] + 64), v47);
goto LABEL_105;
}
}
else if ( v46 )
{
v99 = *(std::string *)(v117.__r_.__value_.__r.__words[0] + 48);
LABEL_105:
LevelTools::base64DecodeString(&v94, &v99);
if ( (*(_BYTE *)&v99.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v99.__r_.__value_.__l.__data_);
v48 = *(_BYTE *)&v94.__r_.__value_.__s.0 & 1;
if ( (*(_BYTE *)&v94.__r_.__value_.__s.0 & 1) != 0 )
{
if ( !v94.__r_.__value_.__l.__size_ )
{
LABEL_179:
if ( v48 )
operator delete(v94.__r_.__value_.__l.__data_);
goto LABEL_181;
}
}
else if ( !(*(_BYTE *)&v94.__r_.__value_.__l.0 >> 1) )
{
goto LABEL_179;
}
v103 = 0;
v104 = 0;
sub_10064E0E0((unsigned __int8 *)&v94, "$", (__int64)&v103);
v49 = v103;
if ( *((_QWORD *)&v103 + 1) == (_QWORD)v103 )
{
LABEL_178:
sub_100036390((void **)&v103);
v48 = *(_BYTE *)&v94.__r_.__value_.__s.0 & 1;
goto LABEL_179;
}
v50 = 0;
while ( 1 )
{
v52 = (unsigned __int8 *)(v49 + 24 * v50);
v53 = *v52;
if ( (v53 & 1) != 0 )
{
if ( *((_QWORD *)v52 + 1) )
{
LABEL_121:
*(_OWORD *)v111 = 0;
v112 = 0;
sub_10064E0E0(v52, ":", (__int64)v111);
v54 = (void **)v111[0];
if ( v111[0] != v111[1] )
{
*(_OWORD *)v107 = 0;
v108 = 0;
sub_10064E0E0((unsigned __int8 *)v111[0], ",", (__int64)v107);
v55 = (void **)v107[0];
if ( 0xAAAAAAAAAAAAAAABLL * (((char *)v107[1] - (char *)v107[0]) >> 3) >= 3 )
{
if ( (*(_BYTE *)v107[0] & 1) != 0 )
{
v56 = atoi(*((const char **)v107[0] + 2));
if ( ((_BYTE)v55[3] & 1) == 0 )
goto LABEL_128;
LABEL_125:
v57 = atoi((const char *)v55[5]);
if ( ((_BYTE)v55[6] & 1) != 0 )
goto LABEL_126;
LABEL_129:
v58 = (char *)v55 + 49;
}
else
{
v56 = atoi((const char *)v107[0] + 1);
if ( ((_BYTE)v55[3] & 1) != 0 )
goto LABEL_125;
LABEL_128:
v57 = atoi((const char *)v55 + 25);
if ( ((_BYTE)v55[6] & 1) == 0 )
goto LABEL_129;
LABEL_126:
v58 = (const char *)v55[8];
}
v59 = atoi(v58);
v60 = operator new(0x50u);
cocos2d::CCObject::CCObject((__int64)v60);
*v60 = off_100B83208;
v60[9] = 0;
*((_DWORD *)v60 + 14) = v56;
*((_DWORD *)v60 + 15) = v57;
*((_DWORD *)v60 + 16) = v59;
v61 = sub_1007FE900(v60);
v60[9] = v61;
cocos2d::CCObject::retain(v61);
cocos2d::CCObject::autorelease((__int64)v60);
if ( 0xAAAAAAAAAAAAAAABLL * (((char *)v111[1] - (char *)v111[0]) >> 3) >= 2 )
{
v62 = *((unsigned __int8 *)v111[0] + 24);
if ( (v62 & 1) != 0 )
{
if ( !*((_QWORD *)v111[0] + 4) )
goto LABEL_162;
}
else if ( !(v62 >> 1) )
{
goto LABEL_162;
}
v105 = 0;
v106 = 0;
sub_10064E0E0((unsigned __int8 *)v111[0] + 24, ";", (__int64)&v105);
v63 = v105;
if ( *((_QWORD *)&v105 + 1) == (_QWORD)v105 )
{
LABEL_161:
sub_100036390((void **)&v105);
goto LABEL_162;
}
v64 = 0;
while ( 2 )
{
v66 = (unsigned __int8 *)(v63 + 24 * v64);
v67 = *v66;
if ( (v67 & 1) != 0 )
{
if ( !*((_QWORD *)v66 + 1) )
goto LABEL_140;
}
else if ( !(v67 >> 1) )
{
goto LABEL_140;
}
*(_OWORD *)v109 = 0;
v110 = 0;
sub_10064E0E0(v66, "~", (__int64)v109);
v68 = v109[0];
if ( 0xAAAAAAAAAAAAAAABLL * (((char *)v109[1] - (char *)v109[0]) >> 3) >= 2 )
{
v69 = v60[9];
if ( (*(_BYTE *)v109[0] & 1) != 0 )
{
sub_10001AD30(&v100, *((const void **)v109[0] + 2), *((_QWORD *)v109[0] + 1));
v68 = v109[0];
if ( (*((_BYTE *)v109[0] + 24) & 1) != 0 )
goto LABEL_150;
LABEL_148:
v101 = *(std::string *)((_BYTE *)v68 + 1);
}
else
{
v100 = *(std::string *)v109[0];
if ( (*((_BYTE *)v109[0] + 24) & 1) == 0 )
goto LABEL_148;
LABEL_150:
sub_10001AD30(&v101, *((const void **)v68 + 5), *((_QWORD *)v68 + 4));
}
v70 = CCURLObject::create(&v100, &v101);
sub_1007FEBF0(v69, v70);
if ( (*(_BYTE *)&v101.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v101.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v100.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v100.__r_.__value_.__l.__data_);
}
v71 = (void **)v109[0];
if ( v109[0] )
{
v72 = (void **)v109[1];
v65 = v109[0];
if ( v109[1] != v109[0] )
{
do
{
if ( (*(_BYTE *)(v72 - 3) & 1) != 0 )
operator delete(*(v72 - 1));
v72 -= 3;
}
while ( v72 != v71 );
v65 = v109[0];
}
v109[1] = v71;
operator delete(v65);
}
v63 = v105;
LABEL_140:
if ( ++v64 >= 0xAAAAAAAAAAAAAAABLL * ((__int64)(*((_QWORD *)&v63 + 1) - v63) >> 3) )
goto LABEL_161;
continue;
}
}
LABEL_162:
sub_1007FEBF0(*(_QWORD *)(v122 + 416), v60);
v55 = (void **)v107[0];
}
if ( v55 )
{
v73 = (void **)v107[1];
v74 = v55;
if ( v107[1] != v55 )
{
do
{
if ( (*(_BYTE *)(v73 - 3) & 1) != 0 )
operator delete(*(v73 - 1));
v73 -= 3;
}
while ( v73 != v55 );
v74 = (void **)v107[0];
}
v107[1] = v55;
operator delete(v74);
}
v54 = (void **)v111[0];
}
if ( v54 )
{
v75 = (void **)v111[1];
v51 = v54;
if ( v111[1] != v54 )
{
do
{
if ( (*(_BYTE *)(v75 - 3) & 1) != 0 )
operator delete(*(v75 - 1));
v75 -= 3;
}
while ( v75 != v54 );
v51 = (void **)v111[0];
}
v111[1] = v54;
operator delete(v51);
}
v49 = v103;
}
}
else if ( v53 >> 1 )
{
goto LABEL_121;
}
if ( ++v50 >= 0xAAAAAAAAAAAAAAABLL * ((__int64)(*((_QWORD *)&v49 + 1) - v49) >> 3) )
goto LABEL_178;
}
}
}
LABEL_181:
v76 = *(_QWORD *)(v122 + 824);
if ( v76 )
{
v77 = *(_QWORD *)(v76 + 56);
while ( v77 )
{
v78 = *(_QWORD *)(v77 + 264);
v77 = *(_QWORD *)(v77 + 288);
if ( !*(_BYTE *)(v78 + 72) )
{
v79 = *(_QWORD *)(v122 + 400);
if ( v79 )
{
v80 = cocos2d::CCDictionary::objectForKey_1(v79, *(int *)(v78 + 56));
if ( v80 )
*(_QWORD *)(v78 + 64) = *(_QWORD *)(v80 + 64);
}
}
}
}
v81 = __dst.__r_.__value_.__r.__words[0];
if ( __dst.__r_.__value_.__r.__words[0] )
{
v82 = __dst.__r_.__value_.__l.__size_;
v83 = (void *)__dst.__r_.__value_.__r.__words[0];
if ( __dst.__r_.__value_.__l.__size_ != __dst.__r_.__value_.__r.__words[0] )
{
do
{
if ( (*(_BYTE *)(v82 - 24) & 1) != 0 )
operator delete(*(void **)(v82 - 8));
v82 -= 24LL;
}
while ( v82 != v81 );
v83 = (void *)__dst.__r_.__value_.__r.__words[0];
}
__dst.__r_.__value_.__l.__size_ = v81;
operator delete(v83);
}
v84 = (void **)v118[0];
if ( v118[0] )
{
v85 = (void **)v118[1];
v86 = v118[0];
if ( v118[1] != v118[0] )
{
do
{
if ( (*(_BYTE *)(v85 - 3) & 1) != 0 )
operator delete(*(v85 - 1));
v85 -= 3;
}
while ( v85 != v84 );
v86 = v118[0];
}
v118[1] = v84;
operator delete(v86);
}
v87 = (void **)v115[0];
if ( v115[0] )
{
v88 = (void **)v115[1];
v89 = v115[0];
if ( v115[1] != v115[0] )
{
do
{
if ( (*(_BYTE *)(v88 - 3) & 1) != 0 )
operator delete(*(v88 - 1));
v88 -= 3;
}
while ( v88 != v87 );
v89 = v115[0];
}
v115[1] = v87;
operator delete(v89);
}
v5 = v117.__r_.__value_.__r.__words[0];
goto LABEL_213;
}
if ( *((_QWORD *)&v113 + 1) )
goto LABEL_11;
LABEL_222:
if ( (*(_BYTE *)&v4 & 1) != 0 )
operator delete(__p);
LABEL_224:
if ( (*(_BYTE *)&v93.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v93.__r_.__value_.__l.__data_);
}