// // SFXSearchResult::updateObjects from 0x571328 to 0x57183a (1298 bytes) // // 0 xrefs: // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:52:38 +0000 // cocos2d::CCObject *__fastcall SFXSearchResult::updateObjects(cocos2d::CCDictionary *SFXObject, int a2) { cocos2d::CCDictionary *v2; // r4 int v4; // r3 int v5; // r3 unsigned __int8 *v6; // r2 unsigned __int8 *v7; // r3 int v8; // t1 int v9; // r1 cocos2d::CCDictionary *v10; // r0 int v11; // r3 cocos2d::CCArray *FilesMatchingSearch; // r5 cocos2d::CCDictionary *v13; // r0 _DWORD *i; // r6 MusicDownloadManager *v15; // r0 MusicDownloadManager *v16; // r0 int CustomSFXObject; // r0 _DWORD *j; // r6 MusicDownloadManager *v19; // r0 MusicDownloadManager *v20; // r0 cocos2d::CCObject *v21; // r1 cocos2d::CCObject **v22; // r7 cocos2d::CCObject *v23; // t1 int v24; // r3 int v25; // r3 int v26; // r3 int v27; // r7 int v28; // r6 MusicDownloadManager *v29; // r0 int *v30; // r2 int v31; // r3 int *v32; // r2 int *v33; // r3 int v34; // r1 int v35; // t1 cocos2d::CCObject *v36; // r0 cocos2d::CCObject *v37; // r1 int v39; // r2 int v40; // r3 int v41; // r3 MusicDownloadManager *v42; // r0 cocos2d::CCArray *AllSFXObjects; // r6 cocos2d::CCObject *v44; // r1 cocos2d::CCArray *v45; // r7 GameManager *v46; // r0 int Object; // r6 int v48; // r3 _DWORD *v49; // r2 cocos2d::CCObject **v50; // r6 cocos2d::CCObject **v51; // r9 cocos2d::CCObject *v52; // r1 cocos2d::CCObject *v53; // t1 cocos2d::CCDictionary *v54; // r0 int v55; // r6 MusicDownloadManager *v56; // r11 MusicDownloadManager *v57; // r0 int v58; // r3 SFXInfoObject *v59; // r11 MusicDownloadManager *v60; // r11 int v61; // r0 _DWORD *v62; // r2 cocos2d::CCObject **v63; // r6 cocos2d::CCArray *v64; // r0 cocos2d::CCArray *v65; // r0 unsigned int v66; // r1 _DWORD *v67; // r2 cocos2d::CCObject **v68; // r7 cocos2d::CCObject **v69; // r6 cocos2d::CCObject *v70; // r1 cocos2d::CCObject *v71; // t1 cocos2d::CCArray *v72; // r0 unsigned int v73; // r1 int v74; // r3 int v75; // r3 GameManager *v76; // r0 int *v77; // r2 int v78; // r3 int *v79; // r2 int *v80; // r3 int v81; // r1 int v82; // t1 cocos2d::CCObject *v83; // r1 int v84; // r6 int k; // r7 cocos2d::CCArray *v86; // r10 unsigned __int8 *v87; // r3 char *v88; // r9 unsigned __int8 *v89; // r3 int v90; // r0 int v91; // r7 unsigned __int8 *v92; // r6 unsigned int v93; // r1 unsigned __int8 *v94; // r3 unsigned int v95; // r2 unsigned __int8 *v96; // r9 bool v97; // r6 int v98; // r3 _DWORD *v99; // r3 int v100; // r7 unsigned __int8 **v101; // r3 unsigned int v102; // r7 unsigned __int8 **v103; // r9 unsigned __int8 *v104; // r1 unsigned __int8 *v105; // t1 int v106; // r3 MusicDownloadManager *v107; // r5 const char *v108; // r0 int v109; // r0 cocos2d::CCObject *v110; // r1 int v111; // [sp+14h] [bp-40h] int v112; // [sp+18h] [bp-3Ch] int v113; // [sp+24h] [bp-30h] unsigned __int8 *v114; // [sp+2Ch] [bp-28h] BYREF int v115; // [sp+34h] [bp-20h] BYREF unsigned int v116; // [sp+38h] [bp-1Ch] unsigned __int8 *v117; // [sp+3Ch] [bp-18h] int v118; // [sp+40h] [bp-14h] BYREF unsigned int v119; // [sp+44h] [bp-10h] unsigned __int8 *v120; // [sp+48h] [bp-Ch] v2 = SFXObject; if ( !*((_DWORD *)SFXObject + 26) ) { v4 = *((unsigned __int8 *)SFXObject + 80); if ( (v4 & 1) != 0 ) { v5 = *((_DWORD *)SFXObject + 21); if ( v5 ) { v6 = *((unsigned __int8 **)SFXObject + 22); LABEL_7: v7 = &v6[v5]; while ( v6 != v7 ) { v8 = *v6++; if ( (unsigned int)(v8 - 48) > 9 ) goto LABEL_10; } v107 = (MusicDownloadManager *)MusicDownloadManager::sharedState(SFXObject); if ( (*((_BYTE *)v2 + 80) & 1) != 0 ) v108 = *((const char **)v2 + 22); else v108 = (char *)v2 + 81; v109 = atoi(v108); SFXObject = MusicDownloadManager::getSFXObject(v107, v109); if ( SFXObject ) { v37 = (cocos2d::CCObject *)cocos2d::CCArray::createWithObject(SFXObject, v110); v36 = (cocos2d::CCDictionary *)((char *)v2 + 56); return sub_56AE78(v36, v37); } } } else { v5 = v4 >> 1; if ( v5 ) { v6 = (unsigned __int8 *)SFXObject + 81; goto LABEL_7; } } } LABEL_10: v9 = *((_DWORD *)v2 + 26); *((_DWORD *)v2 + 23) = a2; if ( (unsigned int)(v9 - 1) <= 2 ) { v10 = (cocos2d::CCDictionary *)cocos2d::CCArray::create(SFXObject); v11 = *((_DWORD *)v2 + 26); FilesMatchingSearch = v10; switch ( v11 ) { case 1: v13 = (cocos2d::CCDictionary *)MusicDownloadManager::sharedState(v10); for ( i = *((_DWORD **)v13 + 108); ; i = (_DWORD *)*i ) { v15 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v13); if ( !i ) break; v16 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v15); v13 = MusicDownloadManager::getSFXObject(v16, i[2]); if ( v13 ) { if ( !*((_BYTE *)v13 + 68) ) v13 = (cocos2d::CCDictionary *)cocos2d::CCArray::addObject(FilesMatchingSearch, v13); } } CustomSFXObject = MusicDownloadManager::sharedState(v15); for ( j = *(_DWORD **)(CustomSFXObject + 452); ; j = (_DWORD *)*j ) { v19 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)CustomSFXObject); if ( !j ) break; v20 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v19); CustomSFXObject = MusicDownloadManager::getCustomSFXObject(v20, j[2]); if ( CustomSFXObject && !*(_BYTE *)(CustomSFXObject + 68) ) CustomSFXObject = cocos2d::CCArray::addObject(FilesMatchingSearch, (cocos2d::CCObject *)CustomSFXObject); } break; case 3: v26 = *((_DWORD *)v2 + 17); if ( !v26 ) goto LABEL_31; v62 = *(_DWORD **)(v26 + 52); if ( *v62 ) { v22 = (cocos2d::CCObject **)v62[3]; v63 = &v22[*v62] + 0x3FFFFFFF; while ( v22 <= v63 ) { v23 = *v22++; v21 = v23; if ( !v23 ) break; cocos2d::CCArray::addObject(FilesMatchingSearch, v21); } } break; case 2: v54 = (cocos2d::CCDictionary *)MusicDownloadManager::sharedState(v10); v55 = 0; v112 = (*((_DWORD *)v54 + 122) - *((_DWORD *)v54 + 121)) >> 3; while ( v55 != v112 ) { v56 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v54); v57 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v56); v113 = *(_DWORD *)(*((_DWORD *)v57 + 121) + 8 * v55); v58 = *(_DWORD *)(*(_DWORD *)(MusicDownloadManager::sharedState(v57) + 484) + 8 * v55 + 4); v118 = 0; v119 = 0; v111 = v58; v120 = nullptr; std::string::__init(&v118, &unk_B6B226, 0); v59 = MusicDownloadManager::resolveSFXPlacement(v56, v113, v111, (unsigned __int8 *)&v118); v54 = (cocos2d::CCDictionary *)std::string::~string((int)&v118); if ( v59 || (v60 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v54), v61 = MusicDownloadManager::sharedState(v60), v54 = MusicDownloadManager::getSFXObject(v60, *(_DWORD *)(*(_DWORD *)(v61 + 484) + 8 * v55)), (v59 = v54) != nullptr) ) { if ( !*((_BYTE *)v59 + 68) ) v54 = (cocos2d::CCDictionary *)cocos2d::CCArray::addObject(FilesMatchingSearch, v59); } ++v55; } break; default: LABEL_31: v27 = 0; v28 = (*((_DWORD *)v2 + 28) - *((_DWORD *)v2 + 27)) >> 2; while ( v27 != v28 ) { v29 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v10); v10 = MusicDownloadManager::getSFXObject(v29, *(_DWORD *)(*((_DWORD *)v2 + 27) + 4 * v27)); if ( v10 && !*((_BYTE *)v10 + 68) ) v10 = (cocos2d::CCDictionary *)cocos2d::CCArray::addObject(FilesMatchingSearch, v10); ++v27; } break; } v24 = *((unsigned __int8 *)v2 + 80); if ( (v24 & 1) != 0 ) v25 = *((_DWORD *)v2 + 21); else v25 = v24 >> 1; if ( v25 ) { if ( FilesMatchingSearch ) { v30 = *((int **)FilesMatchingSearch + 13); v31 = *v30; if ( *v30 ) { v32 = (int *)v30[3]; v33 = &v32[v31 - 1]; while ( v32 <= v33 ) { v35 = *v32++; v34 = v35; if ( !v35 ) break; *(_BYTE *)(v34 + 69) = 0; } } } std::string::basic_string(&v118, (int)v2 + 80); FilesMatchingSearch = MusicSearchResult::getFilesMatchingSearch(v2, (int)FilesMatchingSearch, (int)&v118); std::string::~string((int)&v118); } if ( *((_DWORD *)v2 + 26) == 2 ) goto LABEL_48; goto LABEL_47; } v39 = *((_DWORD *)v2 + 31); if ( !v39 ) goto LABEL_57; v40 = *((unsigned __int8 *)v2 + 80); SFXObject = (cocos2d::CCDictionary *)(v40 << 31); if ( (v40 & 1) != 0 ) v41 = *((_DWORD *)v2 + 21); else v41 = v40 >> 1; if ( !v41 ) { AllSFXObjects = *(cocos2d::CCArray **)(v39 + 112); goto LABEL_81; } if ( !v9 && *(_DWORD *)(v39 + 52) == 1 ) { LABEL_57: v42 = (MusicDownloadManager *)MusicDownloadManager::sharedState(SFXObject); AllSFXObjects = MusicDownloadManager::getAllSFXObjects(v42, 1); LABEL_81: v65 = (cocos2d::CCArray *)cocos2d::CCArray::count(AllSFXObjects); v46 = (GameManager *)cocos2d::CCArray::createWithCapacity(v65, v66); FilesMatchingSearch = v46; if ( AllSFXObjects ) { v67 = *((_DWORD **)AllSFXObjects + 13); if ( *v67 ) { v68 = (cocos2d::CCObject **)v67[3]; v69 = &v68[*v67] + 0x3FFFFFFF; while ( v68 <= v69 ) { v71 = *v68++; v70 = v71; if ( !v71 ) break; v46 = (GameManager *)cocos2d::CCArray::addObject(FilesMatchingSearch, v70); } } } goto LABEL_89; } FilesMatchingSearch = (cocos2d::CCArray *)cocos2d::CCArray::create(SFXObject); v45 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(*((cocos2d::CCArray **)v2 + 31), v44); while ( 1 ) { v46 = (GameManager *)cocos2d::CCArray::count(v45); if ( !v46 ) break; Object = cocos2d::CCArray::lastObject(v45); cocos2d::CCArray::removeLastObject(v45, 1); v48 = *(_DWORD *)(Object + 112); if ( v48 ) { v49 = *(_DWORD **)(v48 + 52); if ( *v49 ) { v50 = (cocos2d::CCObject **)v49[3]; v51 = &v50[*v49] + 0x3FFFFFFF; while ( v50 <= v51 ) { v53 = *v50++; v52 = v53; if ( !v53 ) break; if ( *((_BYTE *)v52 + 68) ) v64 = v45; else v64 = FilesMatchingSearch; cocos2d::CCArray::addObject(v64, v52); } } } } if ( !FilesMatchingSearch ) { v72 = (cocos2d::CCArray *)cocos2d::CCArray::count(nullptr); v46 = (GameManager *)cocos2d::CCArray::createWithCapacity(v72, v73); FilesMatchingSearch = v46; } LABEL_89: v74 = *((unsigned __int8 *)v2 + 80); if ( (v74 & 1) != 0 ) v75 = *((_DWORD *)v2 + 21); else v75 = v74 >> 1; if ( v75 ) { if ( FilesMatchingSearch ) { v77 = *((int **)FilesMatchingSearch + 13); v78 = *v77; if ( *v77 ) { v79 = (int *)v77[3]; v46 = nullptr; v80 = &v79[v78 - 1]; while ( v79 <= v80 ) { v82 = *v79++; v81 = v82; if ( !v82 ) break; *(_BYTE *)(v81 + 69) = 0; } } } v76 = (GameManager *)GameManager::sharedState(v46); if ( GameManager::getGameVariable(v76, "0147") && *((_DWORD *)v2 + 31) ) { std::string::basic_string(&v115, (int)v2 + 80); if ( (v115 & 1) != 0 ) v84 = v116; else v84 = (int)(unsigned __int8)v115 >> 1; for ( k = 0; k != v84; ++k ) { if ( (v115 & 1) != 0 ) v87 = v117; else v87 = (unsigned __int8 *)&v115 + 1; v88 = (char *)&v87[k]; if ( (v115 & 1) != 0 ) v89 = v117; else v89 = (unsigned __int8 *)&v115 + 1; v90 = v89[k]; *v88 = tolower(v90); } v86 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(*((cocos2d::CCArray **)v2 + 31), v83); while ( 1 ) { if ( !cocos2d::CCArray::count(v86) ) { std::string::~string((int)&v115); break; } v91 = cocos2d::CCArray::lastObject(v86); cocos2d::CCArray::removeLastObject(v86, 1); SFXInfoObject::getLowerCaseName((SFXInfoObject *)&v118, v91); if ( *(_BYTE *)(v91 + 69) ) goto LABEL_127; if ( (v118 & 1) != 0 ) { v92 = v120; v93 = v119; } else { v93 = (int)(unsigned __int8)v118 >> 1; v92 = (unsigned __int8 *)&v118 + 1; } if ( (v115 & 1) != 0 ) { v94 = v117; v95 = v116; } else { v95 = (int)(unsigned __int8)v115 >> 1; v94 = (unsigned __int8 *)&v115 + 1; } if ( v93 < v95 ) { LABEL_136: v97 = 0; goto LABEL_128; } if ( !v95 ) { LABEL_127: v97 = 1; } else { v96 = &v92[v93]; std::__search( &v114, v92, &v92[v93], v94, &v94[v95], (int (__fastcall *)(int, _DWORD))std::char_traits::eq); if ( v114 == v96 ) goto LABEL_136; v97 = v114 - v92 != -1; } LABEL_128: v98 = *(_DWORD *)(v91 + 112); if ( v98 ) { v99 = *(_DWORD **)(v98 + 52); if ( *v99 ) { v100 = *v99 + 0x40000000; v101 = (unsigned __int8 **)v99[3]; v102 = (unsigned int)&v101[v100 - 1]; v103 = v101; while ( (unsigned int)v103 <= v102 ) { v105 = *v103++; v104 = v105; if ( !v105 ) break; v106 = v104[68]; v104[69] = v97; if ( v106 ) cocos2d::CCArray::addObject(v86, (cocos2d::CCObject *)v104); } } } std::string::~string((int)&v118); } } std::string::basic_string(&v118, (int)v2 + 80); FilesMatchingSearch = MusicSearchResult::getFilesMatchingSearch(v2, (int)FilesMatchingSearch, (int)&v118); std::string::~string((int)&v118); } LABEL_47: sub_56ACD0((size_t **)FilesMatchingSearch, a2); LABEL_48: v36 = (cocos2d::CCDictionary *)((char *)v2 + 56); v37 = FilesMatchingSearch; return sub_56AE78(v36, v37); }
GD Web Decomp Icon

GD Web Decomp

Raw Source