// // MusicDownloadManager::parseMusicLibrary from 0x100591f00 to 0x1005937ab (6315 bytes) // // 3 xrefs: // > MusicDownloadManager::onDownloadMusicLibraryCompleted @ 0x100591d99 // > MusicDownloadManager::tryLoadLibraries @ 0x1005966a9 // > MusicBrowser::init @ 0x10060e88e // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall MusicDownloadManager::parseMusicLibrary(MusicDownloadManager *a1) { cocos2d::CCFileUtils *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 cocos2d::CCObject *m_musicObjects; // rdi cocos2d::CCObject *m_musicArtists; // rdi cocos2d::CCDictionary *v8; // rax cocos2d::CCDictionary *v9; // rax MusicDownloadManager *v10; // rbx std::__compressed_pair *>> *p_pair1; // r14 _QWORD *left; // rsi std::string::size_type v13; // rbx const char *v14; // rdi int v15; // eax std::string::size_type v16; // xmm0_8 unsigned __int8 *v17; // rax unsigned __int64 i; // r12 void **v19; // rbx void **v20; // r14 char *v21; // rbx const char *v22; // rbx size_t v23; // rax size_t v24; // r13 char *v25; // r14 char *v26; // rbx const char *v27; // rbx size_t v28; // r15 size_t v29; // rax std::string::size_type v30; // r13 char *v31; // r14 char *v32; // rbx const char *v33; // rbx size_t v34; // r15 size_t v35; // rax std::string::size_type v36; // r13 char *v37; // r14 unsigned int v38; // eax std::string::size_type size; // rax size_t v40; // r15 unsigned int v41; // eax char v42; // r14 char *v43; // rbx std::string::size_type v44; // xmm0_8 __int64 v45; // rax unsigned __int64 j; // r15 void **v47; // rbx void **v48; // r14 char *v49; // rbx unsigned int v50; // r13d const char *v51; // rbx size_t v52; // rax std::string::size_type v53; // r14 char *v54; // r15 char *v55; // rbx const char *v56; // rdi size_t v57; // r12 bool v58; // zf int v59; // eax const char *v60; // rbx int v61; // eax size_t v62; // rax std::string::size_type v63; // r14 char *v64; // r15 const char *v65; // rbx size_t v66; // r12 char *v67; // rbx size_t v68; // rax size_t v69; // r14 char *v70; // r15 const char *v71; // rbx size_t v72; // r12 size_t v73; // rax std::string::size_type v74; // r14 char *v75; // r15 size_t v76; // r12 int v77; // r15d int v78; // r14d char *v79; // rbx const char *v80; // rdi const char *v81; // rbx size_t v82; // rax std::string::size_type v83; // r12 char *v84; // r13 unsigned int v85; // eax int v86; // r13d size_t v87; // r14 cocos2d::CCObject *v88; // rax std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v89; // r14 char v90; // r12 __int64 v91; // rbx std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v92; // r15 const char *v93; // rdi std::string::size_type v94; // rbx std::string::size_type v95; // r14 __int64 v96; // r12 void **v97; // r14 void **v98; // r15 char *v99; // r13 int v100; // ebx const char *v101; // r13 size_t v102; // rax std::string::size_type v103; // r12 char *v104; // r14 size_t v105; // r15 std::__compressed_pair *>> *v106; // r14 std::__tree_end_node *>::pointer v107; // rax std::__compressed_pair *>> *v108; // r15 int v109; // eax char *v110; // r12 std::__tree_end_node *> *v111; // rax MusicDownloadManager *v112; // rbx void *v113; // rdi __int64 v114; // rbx __int64 v115; // r14 void *v116; // rdi void **v117; // rbx void **v118; // r14 void *v119; // rdi void **v120; // rbx void **v121; // r14 void *v122; // rdi std::string::size_type v123; // r14 void *v124; // rdi __int16 v125; // [rsp+40h] [rbp-320h] BYREF __int16 v126; // [rsp+58h] [rbp-308h] BYREF unsigned __int64 v127; // [rsp+70h] [rbp-2F0h] std::__compressed_pair *>> *v128; // [rsp+78h] [rbp-2E8h] std::map *p_m_musicTags; // [rsp+80h] [rbp-2E0h] std::string v130; // [rsp+88h] [rbp-2D8h] BYREF __int128 v131; // [rsp+A0h] [rbp-2C0h] BYREF void *v132; // [rsp+B0h] [rbp-2B0h] __int128 v133; // [rsp+C0h] [rbp-2A0h] BYREF void *v134; // [rsp+D0h] [rbp-290h] std::string v135; // [rsp+E0h] [rbp-280h] BYREF __int128 v136; // [rsp+100h] [rbp-260h] BYREF void *v137; // [rsp+110h] [rbp-250h] __int128 v138; // [rsp+120h] [rbp-240h] BYREF void *v139; // [rsp+130h] [rbp-230h] __int128 v140; // [rsp+140h] [rbp-220h] BYREF void *v141; // [rsp+150h] [rbp-210h] __int128 v142; // [rsp+160h] [rbp-200h] BYREF void *v143; // [rsp+170h] [rbp-1F0h] __int128 v144; // [rsp+180h] [rbp-1E0h] BYREF void *v145; // [rsp+190h] [rbp-1D0h] __int128 v146; // [rsp+1A0h] [rbp-1C0h] BYREF void *v147; // [rsp+1B0h] [rbp-1B0h] __int64 v148; // [rsp+1C0h] [rbp-1A0h] BYREF cocos2d::CCDictionary **p_m_musicObjects; // [rsp+1C8h] [rbp-198h] int v150; // [rsp+1D4h] [rbp-18Ch] float v151; // [rsp+1D8h] [rbp-188h] int v152; // [rsp+1DCh] [rbp-184h] __int128 v153; // [rsp+1E0h] [rbp-180h] BYREF void *__p; // [rsp+1F0h] [rbp-170h] void *v155[2]; // [rsp+200h] [rbp-160h] BYREF __int64 v156; // [rsp+210h] [rbp-150h] std::string v157; // [rsp+220h] [rbp-140h] BYREF int v158; // [rsp+244h] [rbp-11Ch] int v159; // [rsp+248h] [rbp-118h] int v160; // [rsp+24Ch] [rbp-114h] __int128 v161; // [rsp+250h] [rbp-110h] BYREF void *v162; // [rsp+260h] [rbp-100h] std::string v163; // [rsp+268h] [rbp-F8h] BYREF std::string v164; // [rsp+280h] [rbp-E0h] BYREF std::string v165; // [rsp+2A0h] [rbp-C0h] BYREF __int128 __dst; // [rsp+2C0h] [rbp-A0h] BYREF void *v167; // [rsp+2D0h] [rbp-90h] __int64 v168; // [rsp+2D8h] [rbp-88h] void *v169[2]; // [rsp+2E0h] [rbp-80h] BYREF __int64 v170; // [rsp+2F0h] [rbp-70h] MusicDownloadManager *v171; // [rsp+2F8h] [rbp-68h] std::string __str; // [rsp+300h] [rbp-60h] BYREF std::string v173; // [rsp+320h] [rbp-40h] BYREF v171 = a1; MusicDownloadManager::pathForSongFolder(&v130, (__int64)a1, 0); std::string::append(&v130, "musiclibrary.dat"); v148 = 0; v1 = cocos2d::CCFileUtils::sharedFileUtils(); if ( (*(_BYTE *)&v130.__r_.__value_.__s.0 & 1) != 0 ) data = v130.__r_.__value_.__l.__data_; else data = v130.__r_.__value_.__s.__data_; v3 = (std::string::value_type *)((__int64 (__fastcall *)(cocos2d::CCFileUtils *, std::string::pointer, const char *, __int64 *))v1->addSearchResolutionsOrder)( v1, data, "r", &v148); v153 = 0; __p = nullptr; if ( !v3 ) goto LABEL_333; cocos2d::ZipUtils::decompressString2(&v157, v3, 0, v148, 11); if ( (v153 & 1) != 0 ) operator delete(__p); __p = v157.__r_.__value_.__l.__data_; v153 = *(_OWORD *)&v157.__r_.__value_.__l.0; v4 = v157.__r_.__value_.__s.0; if ( (*(_BYTE *)&v157.__r_.__value_.__s.0 & 1) == 0 ) { if ( !(*(_BYTE *)&v157.__r_.__value_.__l.0 >> 1) ) goto LABEL_331; LABEL_11: memset(&v157, 0, sizeof(v157)); sub_10058DFB0((unsigned __int8 *)&v153, "|", (__int64)&v157, 0.0); v5 = v157.__r_.__value_.__r.__words[0]; if ( 0xAAAAAAAAAAAAAAABLL * ((__int64)(v157.__r_.__value_.__l.__size_ - v157.__r_.__value_.__r.__words[0]) >> 3) >= 4 ) { *(_OWORD *)v169 = 0; v170 = 0; m_musicObjects = v171->m_musicObjects; if ( m_musicObjects ) cocos2d::CCObject::release(m_musicObjects); m_musicArtists = v171->m_musicArtists; if ( m_musicArtists ) cocos2d::CCObject::release(m_musicArtists); p_m_musicObjects = &v171->m_musicObjects; *(_OWORD *)&v171->m_musicObjects = 0; v8 = cocos2d::CCDictionary::create(); *p_m_musicObjects = v8; cocos2d::CCObject::retain(v8); v9 = cocos2d::CCDictionary::create(); v171->m_musicArtists = v9; cocos2d::CCObject::retain(v9); v10 = v171; p_pair1 = &v171->m_musicTags.__tree_.__pair1_; left = v171->m_musicTags.__tree_.__pair1_.__value_.__left_; p_m_musicTags = &v171->m_musicTags; sub_10008FD20((__int64)&v171->m_musicTags, left); v128 = p_pair1; v10->m_musicTags.__tree_.__begin_node_ = &p_pair1->__value_; *(_OWORD *)&v10->m_musicTags.__tree_.__pair1_.__value_.__left_ = 0; *(_QWORD *)&v10->m_musicObjectCount = 0; v13 = v157.__r_.__value_.__r.__words[0]; if ( (*(_BYTE *)v157.__r_.__value_.__r.__words[0] & 1) != 0 ) v14 = *(const char **)(v157.__r_.__value_.__r.__words[0] + 16); else v14 = (const char *)(v157.__r_.__value_.__r.__words[0] + 1); v15 = atoi(v14); v171->m_musicLibraryVersion = v15; v16 = 0; *(_OWORD *)v155 = 0; v156 = 0; sub_10058DFB0((unsigned __int8 *)(v13 + 24), ";", (__int64)v155, 0.0); v17 = (unsigned __int8 *)v155[0]; if ( v155[1] != v155[0] ) { for ( i = 0; 0xAAAAAAAAAAAAAAABLL * (((char *)v155[1] - (char *)v155[0]) >> 3) > i; ++i ) { v19 = (void **)v169[0]; v20 = (void **)v169[1]; if ( v169[1] != v169[0] ) { do { if ( (*(_BYTE *)(v20 - 3) & 1) != 0 ) operator delete(*(v20 - 1)); v20 -= 3; } while ( v20 != v19 ); v17 = (unsigned __int8 *)v155[0]; } v169[1] = v19; sub_10058DFB0(&v17[24 * i], ",", (__int64)v169, *(double *)&v16); v21 = (char *)v169[0]; if ( 0xAAAAAAAAAAAAAAABLL * (((char *)v169[1] - (char *)v169[0]) >> 3) < 4 ) goto LABEL_21; if ( (*(_BYTE *)v169[0] & 1) != 0 ) { LODWORD(v168) = atoi(*((const char **)v169[0] + 2)); if ( (v21[24] & 1) != 0 ) { LABEL_31: v22 = *((const char **)v21 + 5); goto LABEL_34; } } else { LODWORD(v168) = atoi((const char *)v169[0] + 1); if ( (v21[24] & 1) != 0 ) goto LABEL_31; } v22 = v21 + 25; LABEL_34: v23 = strlen(v22); if ( v23 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v16); v24 = v23; if ( v23 >= 0x17 ) { v28 = (v23 | 7) + 1; if ( (v23 | 7) == 0x17 ) v28 = 26; v25 = (char *)operator new(v28); v167 = v25; *(_QWORD *)&__dst = v28 | 1; *((_QWORD *)&__dst + 1) = v24; } else { LOBYTE(__dst) = 2 * v23; v25 = (char *)&__dst + 1; if ( !v23 ) { BYTE1(__dst) = 0; v26 = (char *)v169[0]; if ( (*((_BYTE *)v169[0] + 48) & 1) == 0 ) goto LABEL_38; goto LABEL_43; } } memmove(v25, v22, v24); v25[v24] = 0; v26 = (char *)v169[0]; if ( (*((_BYTE *)v169[0] + 48) & 1) == 0 ) { LABEL_38: v27 = v26 + 49; goto LABEL_44; } LABEL_43: v27 = *((const char **)v26 + 8); LABEL_44: v29 = strlen(v27); if ( v29 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v16); v30 = v29; if ( v29 >= 0x17 ) { v34 = (v29 | 7) + 1; if ( (v29 | 7) == 0x17 ) v34 = 26; v31 = (char *)operator new(v34); v173.__r_.__value_.__r.__words[2] = (std::string::size_type)v31; v173.__r_.__value_.__r.__words[0] = v34 | 1; v173.__r_.__value_.__l.__size_ = v30; } else { v173.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v29); v31 = v173.__r_.__value_.__s.__data_; if ( !v29 ) { v173.__r_.__value_.__s.__data_[0] = 0; v32 = (char *)v169[0]; if ( (*((_BYTE *)v169[0] + 72) & 1) == 0 ) goto LABEL_48; goto LABEL_53; } } memmove(v31, v27, v30); v31[v30] = 0; v32 = (char *)v169[0]; if ( (*((_BYTE *)v169[0] + 72) & 1) == 0 ) { LABEL_48: v33 = v32 + 73; goto LABEL_54; } LABEL_53: v33 = *((const char **)v32 + 11); LABEL_54: v35 = strlen(v33); if ( v35 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v16); v36 = v35; if ( v35 >= 0x17 ) { v40 = (v35 | 7) + 1; if ( (v35 | 7) == 0x17 ) v40 = 26; v37 = (char *)operator new(v40); __str.__r_.__value_.__r.__words[2] = (std::string::size_type)v37; __str.__r_.__value_.__r.__words[0] = v40 | 1; __str.__r_.__value_.__l.__size_ = v36; } else { __str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v35); v37 = __str.__r_.__value_.__s.__data_; if ( !v35 ) { __str.__r_.__value_.__s.__data_[0] = 0; v38 = (unsigned int)v173.__r_.__value_.__l.0; if ( (*(_BYTE *)&v173.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_58; goto LABEL_63; } } memmove(v37, v33, v36); v37[v36] = 0; v38 = (unsigned int)v173.__r_.__value_.__l.0; if ( (*(_BYTE *)&v173.__r_.__value_.__s.0 & 1) != 0 ) { LABEL_58: size = v173.__r_.__value_.__l.__size_; goto LABEL_64; } LABEL_63: size = v38 >> 1; LABEL_64: if ( size > 1 ) { cocos2d::ZipUtils::urlDecode(&v161, &v173, *(double *)&v16); if ( (*(_BYTE *)&v173.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v173.__r_.__value_.__l.__data_); v173.__r_.__value_.__r.__words[2] = (std::string::size_type)v162; v16 = v161; *(_OWORD *)&v173.__r_.__value_.__l.0 = v161; v41 = (unsigned int)__str.__r_.__value_.__l.0; if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) { LABEL_66: if ( __str.__r_.__value_.__l.__size_ <= 1 ) goto LABEL_74; goto LABEL_67; } } else { std::string::assign(&v173, ""); v41 = (unsigned int)__str.__r_.__value_.__l.0; if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_66; } if ( v41 >> 1 <= 1uLL ) { LABEL_74: std::string::assign(&__str, ""); goto LABEL_75; } LABEL_67: cocos2d::ZipUtils::urlDecode(&v161, &__str, *(double *)&v16); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__str.__r_.__value_.__l.__data_); __str.__r_.__value_.__r.__words[2] = (std::string::size_type)v162; v16 = v161; *(_OWORD *)&__str.__r_.__value_.__l.0 = v161; LABEL_75: v42 = __dst; if ( (__dst & 1) != 0 ) { sub_100006B70(&v131, v167, *((unsigned __int64 *)&__dst + 1), *(double *)&v16); } else { v132 = v167; v16 = __dst; v131 = __dst; } if ( (*(_BYTE *)&v173.__r_.__value_.__s.0 & 1) != 0 ) { sub_100006B70(&v133, v173.__r_.__value_.__l.__data_, v173.__r_.__value_.__l.__size_, *(double *)&v16); } else { v134 = v173.__r_.__value_.__l.__data_; v16 = v173.__r_.__value_.__r.__words[0]; v133 = *(_OWORD *)&v173.__r_.__value_.__l.0; } if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) { sub_100006B70(&v135, __str.__r_.__value_.__l.__data_, __str.__r_.__value_.__l.__size_, *(double *)&v16); } else { v135 = __str; v16 = __str.__r_.__value_.__r.__words[0]; } v43 = MusicArtistObject::create(v168, &v131, &v133, &v135); if ( (*(_BYTE *)&v135.__r_.__value_.__s.0 & 1) != 0 ) { operator delete(v135.__r_.__value_.__l.__data_); if ( (v133 & 1) == 0 ) { LABEL_86: if ( (v131 & 1) == 0 ) goto LABEL_88; LABEL_87: operator delete(v132); goto LABEL_88; } } else if ( (v133 & 1) == 0 ) { goto LABEL_86; } operator delete(v134); if ( (v131 & 1) != 0 ) goto LABEL_87; LABEL_88: cocos2d::CCDictionary::setObject(v171->m_musicArtists, (cocos2d::CCObject *)v43, (int)v168); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) { operator delete(__str.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v173.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_90: if ( (v42 & 1) != 0 ) goto LABEL_97; goto LABEL_21; } } else if ( (*(_BYTE *)&v173.__r_.__value_.__s.0 & 1) == 0 ) { goto LABEL_90; } operator delete(v173.__r_.__value_.__l.__data_); if ( (v42 & 1) != 0 ) LABEL_97: operator delete(v167); LABEL_21: v17 = (unsigned __int8 *)v155[0]; } } v44 = 0; __dst = 0; v167 = nullptr; sub_10058DFB0((unsigned __int8 *)(v157.__r_.__value_.__r.__words[0] + 48), ";", (__int64)&__dst, 0.0); v45 = __dst; if ( *((_QWORD *)&__dst + 1) != (_QWORD)__dst ) { for ( j = 0; 0xAAAAAAAAAAAAAAABLL * ((__int64)(*((_QWORD *)&__dst + 1) - __dst) >> 3) > j; ++j ) { v47 = (void **)v169[0]; v48 = (void **)v169[1]; if ( v169[1] != v169[0] ) { do { if ( (*(_BYTE *)(v48 - 3) & 1) != 0 ) operator delete(*(v48 - 1)); v48 -= 3; } while ( v48 != v47 ); v45 = __dst; } v169[1] = v47; sub_10058DFB0((unsigned __int8 *)(v45 + 24 * j), ",", (__int64)v169, *(double *)&v44); v49 = (char *)v169[0]; v50 = -1431655765 * ((unsigned __int64)((char *)v169[1] - (char *)v169[0]) >> 3); if ( (int)v50 < 6 ) goto LABEL_100; if ( (*(_BYTE *)v169[0] & 1) != 0 ) { v150 = atoi(*((const char **)v169[0] + 2)); if ( (v49[24] & 1) != 0 ) { LABEL_110: v51 = *((const char **)v49 + 5); goto LABEL_113; } } else { v150 = atoi((const char *)v169[0] + 1); if ( (v49[24] & 1) != 0 ) goto LABEL_110; } v51 = v49 + 25; LABEL_113: v52 = strlen(v51); if ( v52 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v44); v53 = v52; v127 = j; if ( v52 >= 0x17 ) { v57 = (v52 | 7) + 1; if ( (v52 | 7) == 0x17 ) v57 = 26; v54 = (char *)operator new(v57); v173.__r_.__value_.__r.__words[2] = (std::string::size_type)v54; v173.__r_.__value_.__r.__words[0] = v57 | 1; v173.__r_.__value_.__l.__size_ = v53; } else { v173.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v52); v54 = v173.__r_.__value_.__s.__data_; if ( !v52 ) { v173.__r_.__value_.__s.__data_[0] = 0; v55 = (char *)v169[0]; if ( (*((_BYTE *)v169[0] + 48) & 1) == 0 ) goto LABEL_117; goto LABEL_123; } } memmove(v54, v51, v53); v54[v53] = 0; v55 = (char *)v169[0]; if ( (*((_BYTE *)v169[0] + 48) & 1) == 0 ) { LABEL_117: v158 = atoi(v55 + 49); if ( (v55[72] & 1) != 0 ) goto LABEL_118; goto LABEL_124; } LABEL_123: v158 = atoi(*((const char **)v55 + 8)); if ( (v55[72] & 1) != 0 ) { LABEL_118: v56 = *((const char **)v55 + 11); goto LABEL_125; } LABEL_124: v56 = v55 + 73; LABEL_125: *(float *)&v44 = (float)atoi(v56) * 0.00000095367432; v58 = (v55[96] & 1) == 0; v151 = *(float *)&v44; if ( v58 ) { v59 = atoi(v55 + 97); v58 = (v55[120] & 1) == 0; v152 = v59; if ( !v58 ) goto LABEL_127; } else { v61 = atoi(*((const char **)v55 + 14)); v58 = (v55[120] & 1) == 0; v152 = v61; if ( !v58 ) { LABEL_127: v60 = *((const char **)v55 + 17); goto LABEL_130; } } v60 = v55 + 121; LABEL_130: v62 = strlen(v60); if ( v62 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v44); v63 = v62; if ( v62 >= 0x17 ) { v66 = (v62 | 7) + 1; if ( (v62 | 7) == 0x17 ) v66 = 26; v64 = (char *)operator new(v66); __str.__r_.__value_.__r.__words[2] = (std::string::size_type)v64; __str.__r_.__value_.__r.__words[0] = v66 | 1; __str.__r_.__value_.__l.__size_ = v63; } else { __str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v62); v64 = __str.__r_.__value_.__s.__data_; if ( !v62 ) { __str.__r_.__value_.__s.__data_[0] = 0; if ( v50 == 6 ) goto LABEL_134; goto LABEL_139; } } memmove(v64, v60, v63); v64[v63] = 0; if ( v50 == 6 ) { LABEL_134: LODWORD(v168) = 0; v65 = ""; goto LABEL_146; } LABEL_139: v67 = (char *)v169[0]; if ( (*((_BYTE *)v169[0] + 144) & 1) != 0 ) { LODWORD(v168) = atoi(*((const char **)v169[0] + 20)); if ( v50 < 8 ) { LABEL_141: v65 = ""; goto LABEL_146; } } else { LODWORD(v168) = atoi((const char *)v169[0] + 145); if ( v50 < 8 ) goto LABEL_141; } if ( (v67[168] & 1) != 0 ) v65 = *((const char **)v67 + 23); else v65 = v67 + 169; LABEL_146: v68 = strlen(v65); if ( v68 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v44); v69 = v68; if ( v68 >= 0x17 ) { v72 = (v68 | 7) + 1; if ( (v68 | 7) == 0x17 ) v72 = 26; v70 = (char *)operator new(v72); v162 = v70; *(_QWORD *)&v161 = v72 | 1; *((_QWORD *)&v161 + 1) = v69; } else { LOBYTE(v161) = 2 * v68; v70 = (char *)&v161 + 1; if ( !v68 ) { BYTE1(v161) = 0; v71 = ""; if ( v50 < 9 ) goto LABEL_158; goto LABEL_155; } } memmove(v70, v65, v69); v70[v69] = 0; v71 = ""; if ( v50 < 9 ) goto LABEL_158; LABEL_155: if ( (*((_BYTE *)v169[0] + 192) & 1) != 0 ) v71 = *((const char **)v169[0] + 26); else v71 = (char *)v169[0] + 193; LABEL_158: v73 = strlen(v71); if ( v73 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v44); v74 = v73; if ( v73 >= 0x17 ) { v76 = (v73 | 7) + 1; if ( (v73 | 7) == 0x17 ) v76 = 26; v75 = (char *)operator new(v76); v164.__r_.__value_.__r.__words[2] = (std::string::size_type)v75; v164.__r_.__value_.__r.__words[0] = v76 | 1; v164.__r_.__value_.__l.__size_ = v74; LABEL_165: memmove(v75, v71, v74); goto LABEL_166; } v164.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v73); v75 = v164.__r_.__value_.__s.__data_; if ( v73 ) goto LABEL_165; LABEL_166: v75[v74] = 0; v77 = 0; v78 = 0; if ( v50 < 0xA ) goto LABEL_172; v79 = (char *)v169[0]; if ( (*((_BYTE *)v169[0] + 216) & 1) != 0 ) v80 = *((const char **)v169[0] + 29); else v80 = (char *)v169[0] + 217; LOBYTE(v78) = atoi(v80) != 0; if ( v50 == 10 ) { v77 = 0; LABEL_172: v159 = v78; v160 = 0; LABEL_173: v81 = ""; goto LABEL_174; } if ( (v79[240] & 1) != 0 ) { v77 = atoi(*((const char **)v79 + 32)); if ( v50 < 0xC ) goto LABEL_172; } else { v77 = atoi(v79 + 241); if ( v50 < 0xC ) goto LABEL_172; } if ( (v79[264] & 1) != 0 ) v93 = *((const char **)v79 + 35); else v93 = v79 + 265; v160 = atoi(v93); v159 = v78; if ( v50 == 12 ) goto LABEL_173; if ( (v79[288] & 1) != 0 ) v81 = *((const char **)v79 + 38); else v81 = v79 + 289; LABEL_174: v82 = strlen(v81); if ( v82 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)&v44); v83 = v82; if ( v82 >= 0x17 ) { v87 = (v82 | 7) + 1; if ( (v82 | 7) == 0x17 ) v87 = 26; v84 = (char *)operator new(v87); v165.__r_.__value_.__r.__words[2] = (std::string::size_type)v84; v165.__r_.__value_.__r.__words[0] = v87 | 1; v165.__r_.__value_.__l.__size_ = v83; } else { v165.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v82); v84 = v165.__r_.__value_.__s.__data_; if ( !v82 ) { v165.__r_.__value_.__s.__data_[0] = 0; v85 = (unsigned int)v164.__r_.__value_.__l.0; if ( (*(_BYTE *)&v164.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_178; goto LABEL_186; } } memmove(v84, v81, v83); v84[v83] = 0; v85 = (unsigned int)v164.__r_.__value_.__l.0; if ( (*(_BYTE *)&v164.__r_.__value_.__s.0 & 1) != 0 ) { LABEL_178: v86 = v158; if ( v164.__r_.__value_.__l.__size_ <= 1 ) goto LABEL_187; goto LABEL_179; } LABEL_186: v86 = v158; if ( v85 >> 1 <= 1uLL ) { LABEL_187: std::string::assign(&v164, ""); goto LABEL_188; } LABEL_179: cocos2d::ZipUtils::urlDecode(&v163, &v164, *(double *)&v44); if ( (*(_BYTE *)&v164.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v164.__r_.__value_.__l.__data_); v164 = v163; v44 = v163.__r_.__value_.__r.__words[0]; LABEL_188: if ( (*(_BYTE *)&v165.__r_.__value_.__s.0 & 1) != 0 ) { if ( v165.__r_.__value_.__l.__size_ <= 1 ) goto LABEL_194; } else if ( *(_BYTE *)&v165.__r_.__value_.__l.0 >> 1 <= 1uLL ) { LABEL_194: std::string::assign(&v165, ""); goto LABEL_195; } cocos2d::ZipUtils::urlDecode(&v163, &v165, *(double *)&v44); if ( (*(_BYTE *)&v165.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v165.__r_.__value_.__l.__data_); v165 = v163; v44 = v163.__r_.__value_.__r.__words[0]; LABEL_195: v163.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4; strcpy(v163.__r_.__value_.__s.__data_, "NA"); v88 = cocos2d::CCDictionary::objectForKey(v171->m_musicArtists, v86); if ( v88 ) std::string::operator=(&v163, (const std::string *)&v88[1].m_uID); v89 = v173.__r_.__value_.__s.0; if ( (*(_BYTE *)&v173.__r_.__value_.__s.0 & 1) != 0 ) { sub_100006B70(&v136, v173.__r_.__value_.__l.__data_, v173.__r_.__value_.__l.__size_, *(double *)&v44); } else { v137 = v173.__r_.__value_.__l.__data_; v44 = v173.__r_.__value_.__r.__words[0]; v136 = *(_OWORD *)&v173.__r_.__value_.__l.0; } if ( (*(_BYTE *)&v163.__r_.__value_.__s.0 & 1) != 0 ) { sub_100006B70(&v138, v163.__r_.__value_.__l.__data_, v163.__r_.__value_.__l.__size_, *(double *)&v44); } else { v139 = v163.__r_.__value_.__l.__data_; v44 = v163.__r_.__value_.__r.__words[0]; v138 = *(_OWORD *)&v163.__r_.__value_.__l.0; } v125 = 0; v126 = 0; if ( (*(_BYTE *)&v164.__r_.__value_.__s.0 & 1) != 0 ) { sub_100006B70(&v140, v164.__r_.__value_.__l.__data_, v164.__r_.__value_.__l.__size_, *(double *)&v44); } else { v141 = v164.__r_.__value_.__l.__data_; v44 = v164.__r_.__value_.__r.__words[0]; v140 = *(_OWORD *)&v164.__r_.__value_.__l.0; } if ( (*(_BYTE *)&v165.__r_.__value_.__s.0 & 1) != 0 ) { sub_100006B70(&v142, v165.__r_.__value_.__l.__data_, v165.__r_.__value_.__l.__size_, *(double *)&v44); } else { v143 = v165.__r_.__value_.__l.__data_; v44 = v165.__r_.__value_.__r.__words[0]; v142 = *(_OWORD *)&v165.__r_.__value_.__l.0; } v90 = v161; if ( (v161 & 1) != 0 ) { sub_100006B70(&v144, v162, *((unsigned __int64 *)&v161 + 1), *(double *)&v44); } else { v145 = v162; v144 = v161; } v44 = LODWORD(v151); v91 = SongInfoObject::create( v150, (unsigned int)&v136, (unsigned int)&v138, v86, (unsigned int)&v125, (unsigned int)&v126, (__int64)&v140, (__int64)&v142, v168, (__int64)&v144, v159, v77, 0); if ( (v144 & 1) != 0 ) { operator delete(v145); if ( (v142 & 1) == 0 ) { LABEL_214: if ( (v140 & 1) == 0 ) goto LABEL_215; goto LABEL_222; } } else if ( (v142 & 1) == 0 ) { goto LABEL_214; } operator delete(v143); if ( (v140 & 1) == 0 ) { LABEL_215: if ( (v138 & 1) == 0 ) goto LABEL_216; goto LABEL_223; } LABEL_222: operator delete(v141); if ( (v138 & 1) == 0 ) { LABEL_216: if ( (v136 & 1) == 0 ) goto LABEL_218; LABEL_217: operator delete(v137); goto LABEL_218; } LABEL_223: operator delete(v139); if ( (v136 & 1) != 0 ) goto LABEL_217; LABEL_218: *(_DWORD *)(v91 + 512) = v152; *(_DWORD *)(v91 + 528) = v160; *(_BYTE *)(v91 + 505) = 1; v92 = __str.__r_.__value_.__s.0; if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) { sub_100006B70(&v146, __str.__r_.__value_.__l.__data_, __str.__r_.__value_.__l.__size_, *(double *)&v44); } else { v147 = __str.__r_.__value_.__l.__data_; v44 = __str.__r_.__value_.__r.__words[0]; v146 = *(_OWORD *)&__str.__r_.__value_.__l.0; } SongInfoObject::addTags(v91, &v146); if ( (v146 & 1) != 0 ) operator delete(v147); cocos2d::CCDictionary::setObject(*p_m_musicObjects, (cocos2d::CCObject *)v91, *(int *)(v91 + 316)); ++v171->m_musicObjectCount; if ( (_DWORD)v168 == 1 ) { ++v171->m_ncsSongCount; if ( (*(_BYTE *)&v163.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_230; } else if ( (*(_BYTE *)&v163.__r_.__value_.__s.0 & 1) != 0 ) { LABEL_230: operator delete(v163.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v165.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_231; goto LABEL_238; } if ( (*(_BYTE *)&v165.__r_.__value_.__s.0 & 1) != 0 ) { LABEL_231: operator delete(v165.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v164.__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_232; goto LABEL_239; } LABEL_238: if ( (*(_BYTE *)&v164.__r_.__value_.__s.0 & 1) != 0 ) { LABEL_232: operator delete(v164.__r_.__value_.__l.__data_); if ( (v90 & 1) != 0 ) goto LABEL_233; goto LABEL_240; } LABEL_239: if ( (v90 & 1) != 0 ) { LABEL_233: operator delete(v162); if ( (*(_BYTE *)&v92 & 1) != 0 ) goto LABEL_234; goto LABEL_241; } LABEL_240: if ( (*(_BYTE *)&v92 & 1) != 0 ) { LABEL_234: operator delete(__str.__r_.__value_.__l.__data_); j = v127; if ( (*(_BYTE *)&v89 & 1) != 0 ) goto LABEL_242; goto LABEL_100; } LABEL_241: j = v127; if ( (*(_BYTE *)&v89 & 1) != 0 ) LABEL_242: operator delete(v173.__r_.__value_.__l.__data_); LABEL_100: v45 = __dst; } } memset(&v173, 0, sizeof(v173)); sub_10058DFB0((unsigned __int8 *)(v157.__r_.__value_.__r.__words[0] + 72), ";", (__int64)&v173, 0.0); v95 = v173.__r_.__value_.__l.__size_; v94 = v173.__r_.__value_.__r.__words[0]; if ( v173.__r_.__value_.__l.__size_ != v173.__r_.__value_.__r.__words[0] ) { v96 = 0; while ( 1 ) { v97 = (void **)v169[0]; v98 = (void **)v169[1]; if ( v169[1] != v169[0] ) { do { if ( (*(_BYTE *)(v98 - 3) & 1) != 0 ) operator delete(*(v98 - 1)); v98 -= 3; } while ( v98 != v97 ); v94 = v173.__r_.__value_.__r.__words[0]; } v169[1] = v97; v168 = v96; sub_10058DFB0((unsigned __int8 *)(v94 + 24 * v96), ",", (__int64)v169, 0.0); v99 = (char *)v169[0]; if ( 0xAAAAAAAAAAAAAAABLL * (((char *)v169[1] - (char *)v169[0]) >> 3) >= 2 ) break; LABEL_256: v96 = v168 + 1; v95 = v173.__r_.__value_.__l.__size_; v94 = v173.__r_.__value_.__r.__words[0]; if ( 0xAAAAAAAAAAAAAAABLL * ((__int64)(v173.__r_.__value_.__l.__size_ - v173.__r_.__value_.__r.__words[0]) >> 3) <= v168 + 1 ) goto LABEL_289; } if ( (*(_BYTE *)v169[0] & 1) != 0 ) { v100 = atoi(*((const char **)v169[0] + 2)); if ( (v99[24] & 1) != 0 ) goto LABEL_266; } else { v100 = atoi((const char *)v169[0] + 1); if ( (v99[24] & 1) != 0 ) { LABEL_266: v101 = *((const char **)v99 + 5); goto LABEL_269; } } v101 = v99 + 25; LABEL_269: v102 = strlen(v101); if ( v102 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(0.0); v103 = v102; if ( v102 >= 0x17 ) { v105 = (v102 | 7) + 1; if ( (v102 | 7) == 0x17 ) v105 = 26; v104 = (char *)operator new(v105); __str.__r_.__value_.__r.__words[2] = (std::string::size_type)v104; __str.__r_.__value_.__r.__words[0] = v105 | 1; __str.__r_.__value_.__l.__size_ = v103; } else { __str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v102); v104 = __str.__r_.__value_.__s.__data_; if ( !v102 ) { LABEL_277: v104[v103] = 0; v106 = v128; while ( 1 ) { v107 = v106->__value_.__left_; v108 = v106; if ( !v106->__value_.__left_ ) break; while ( 1 ) { v106 = (std::__compressed_pair *>> *)v107; v109 = *((_DWORD *)v107 + 8); if ( v100 < v109 ) break; if ( v100 <= v109 ) { v110 = (char *)v106; goto LABEL_287; } v107 = v106[1].__value_.__left_; if ( !v107 ) { v108 = v106 + 1; goto LABEL_283; } } } LABEL_283: v110 = (char *)operator new(0x40u); *((_DWORD *)v110 + 8) = v100; *(_OWORD *)(v110 + 40) = 0; *((_QWORD *)v110 + 7) = 0; *(_OWORD *)v110 = 0; *((_QWORD *)v110 + 2) = v106; v108->__value_.__left_ = (std::__tree_end_node *>::pointer)v110; v111 = (std::__tree_end_node *> *)p_m_musicTags->__tree_.__begin_node_->__left_; if ( v111 ) p_m_musicTags->__tree_.__begin_node_ = v111; v112 = v171; sub_100054DD0((__int64 *)v171->m_musicTags.__tree_.__pair1_.__value_.__left_, (__int64 *)v110); ++v112->m_musicTags.__tree_.__pair3_.__value_; LABEL_287: std::string::operator=((std::string *)(v110 + 40), &__str); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__str.__r_.__value_.__l.__data_); goto LABEL_256; } } memmove(v104, v101, v103); goto LABEL_277; } LABEL_289: if ( v94 ) { v113 = (void *)v94; if ( v95 != v94 ) { do { if ( (*(_BYTE *)(v95 - 24) & 1) != 0 ) operator delete(*(void **)(v95 - 8)); v95 -= 24LL; } while ( v95 != v94 ); v113 = (void *)v173.__r_.__value_.__r.__words[0]; } v173.__r_.__value_.__l.__size_ = v94; operator delete(v113); } v114 = __dst; if ( (_QWORD)__dst ) { v115 = *((_QWORD *)&__dst + 1); v116 = (void *)__dst; if ( *((_QWORD *)&__dst + 1) != (_QWORD)__dst ) { do { if ( (*(_BYTE *)(v115 - 24) & 1) != 0 ) operator delete(*(void **)(v115 - 8)); v115 -= 24; } while ( v115 != v114 ); v116 = (void *)__dst; } *((_QWORD *)&__dst + 1) = v114; operator delete(v116); } v117 = (void **)v155[0]; if ( v155[0] ) { v118 = (void **)v155[1]; v119 = v155[0]; if ( v155[1] != v155[0] ) { do { if ( (*(_BYTE *)(v118 - 3) & 1) != 0 ) operator delete(*(v118 - 1)); v118 -= 3; } while ( v118 != v117 ); v119 = v155[0]; } v155[1] = v117; operator delete(v119); } v120 = (void **)v169[0]; if ( v169[0] ) { v121 = (void **)v169[1]; v122 = v169[0]; if ( v169[1] != v169[0] ) { do { if ( (*(_BYTE *)(v121 - 3) & 1) != 0 ) operator delete(*(v121 - 1)); v121 -= 3; } while ( v121 != v120 ); v122 = v169[0]; } v169[1] = v120; operator delete(v122); } v5 = v157.__r_.__value_.__r.__words[0]; } if ( v5 ) { v123 = v157.__r_.__value_.__l.__size_; v124 = (void *)v5; if ( v157.__r_.__value_.__l.__size_ != v5 ) { do { if ( (*(_BYTE *)(v123 - 24) & 1) != 0 ) operator delete(*(void **)(v123 - 8)); v123 -= 24LL; } while ( v123 != v5 ); v124 = (void *)v157.__r_.__value_.__r.__words[0]; } v157.__r_.__value_.__l.__size_ = v5; operator delete(v124); } v4 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)v153; goto LABEL_331; } if ( *((_QWORD *)&v153 + 1) ) goto LABEL_11; LABEL_331: if ( (*(_BYTE *)&v4 & 1) != 0 ) operator delete(__p); LABEL_333: if ( (*(_BYTE *)&v130.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v130.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source