// // SFXBrowser::setupList from 0x6c5cac to 0x6c6334 (1672 bytes) // // 10 xrefs: // > SFXBrowser::onToggleCompactMode @ 0x6c636c // > SFXBrowser::onToggleSearch @ 0x6c64e6 // > SFXBrowser::textChanged @ 0x6c65da // > SFXBrowser::setupSFXBrowser @ 0x6c672c // > SFXBrowser::setupSFXBrowser @ 0x6c6a62 // > SFXBrowser::switchToView @ 0x6c84b8 // > SFXBrowser::refreshCustomList @ 0x6c8560 // > SFXBrowser::onExitFolder @ 0x6c895a // > SFXBrowser::onPage @ 0x6c8a14 // > SFXBrowser::cellPerformedAction @ 0x6c90b8 // // 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:56:55 +0000 // int *__fastcall SFXBrowser::setupList(int *this, cocos2d::CCArray **a2) { int v2; // r4 int v4; // r5 int v5; // r0 cocos2d::CCString *v6; // r0 const char *CString; // r8 size_t v8; // r0 void (__fastcall *v9)(int, cocos2d::CCNode *, int); // r9 cocos2d::CCNode *v10; // r0 MusicDownloadManager *v11; // r0 MusicDownloadManager *v12; // r0 const char *v13; // r5 int v14; // r0 cocos2d::CCString *v15; // r0 const char *v16; // r5 size_t v17; // r0 char *v18; // r1 cocos2d::CCObject *v19; // r0 SFXSearchResult *v20; // r0 int v21; // r3 _BOOL4 v22; // r3 int v23; // r5 void (__fastcall *v24)(int, _BOOL4); // r6 _BOOL4 v25; // r1 int v26; // r3 int v27; // r1 int v28; // r1 SFXSearchResult *v29; // r0 int v30; // r3 char *v31; // r1 int ActiveFolder; // r0 unsigned __int8 *v33; // r0 MusicDownloadManager *v34; // r9 int v35; // r0 int *v36; // r8 int v37; // r0 int v38; // r1 _BYTE *v39; // r2 char *v40; // r1 cocos2d::CCObject *v41; // r0 int v42; // r0 cocos2d::CCTouchDispatcher *v43; // r0 cocos2d::CCArray *v44; // r0 cocos2d::CCArray *v45; // r10 cocos2d::CCArray *v46; // r9 int v47; // r8 signed int v48; // r11 signed int i; // r7 cocos2d::CCObject *v50; // r0 cocos2d::CCDirector *v51; // r0 int v52; // r3 cocos2d::CCLayer *v53; // r0 cocos2d::CCLayerColor *v54; // r0 int v55; // r8 void (__fastcall *v56)(int, _BYTE *); // r9 GameManager *updated; // r0 _BOOL4 v58; // r8 GameManager *v59; // r0 int v60; // r9 int v61; // r3 const char *v62; // r1 void (__fastcall *v63)(int, cocos2d::CCNode *, int); // r11 size_t v64; // r0 cocos2d::CCNode *v65; // r0 int v66; // r0 unsigned __int8 *v67; // r0 MusicDownloadManager *v68; // r9 int v69; // r0 int v70; // r0 int v71; // r1 _BYTE *v72; // r2 int v73; // r10 int v74; // r3 int v75; // r10 int v76; // r1 int v77; // r0 int v78; // r0 int v79; // r1 int v80; // r1 char *v81; // r2 int v82; // r3 const char *v83; // [sp+1Ch] [bp-78h] float v84[2]; // [sp+28h] [bp-6Ch] BYREF _BYTE v85[8]; // [sp+30h] [bp-64h] BYREF int v86[2]; // [sp+38h] [bp-5Ch] BYREF char *v87; // [sp+40h] [bp-54h] int v88[2]; // [sp+44h] [bp-50h] BYREF char *v89; // [sp+4Ch] [bp-48h] int v90; // [sp+50h] [bp-44h] BYREF int v91; // [sp+54h] [bp-40h] _BYTE *v92; // [sp+58h] [bp-3Ch] int v93; // [sp+5Ch] [bp-38h] BYREF int v94; // [sp+60h] [bp-34h] _BYTE *v95; // [sp+64h] [bp-30h] int v96; // [sp+68h] [bp-2Ch] BYREF int v97; // [sp+6Ch] [bp-28h] _BYTE *v98; // [sp+70h] [bp-24h] int v99[3]; // [sp+74h] [bp-20h] BYREF int v100; // [sp+80h] [bp-14h] BYREF int v101; // [sp+84h] [bp-10h] int v102; // [sp+88h] [bp-Ch] v2 = (int)this; if ( !a2 ) return this; v4 = *(this + 190); if ( v4 > 0 ) { this = (int *)MusicDownloadManager::sharedState((MusicDownloadManager *)this); if ( v4 != *(this + 80) ) { v5 = MusicDownloadManager::sharedState((MusicDownloadManager *)this); v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"SFX Library Updated to version %i", *(const char **)(v5 + 320)); v96 = 0; v97 = 0; v98 = nullptr; CString = (const char *)cocos2d::CCString::getCString(v6); v8 = strlen(CString); std::string::__init(&v96, CString, v8); v9 = *(void (__fastcall **)(int, cocos2d::CCNode *, int))(*(_DWORD *)v2 + 232); std::string::basic_string(v99, (int)&v96); v100 = 0; v101 = 0; v102 = 0; std::string::__init(&v100, &unk_B6B226, 0); v10 = TextAlertPopup::create((int)v99, (cocos2d::CCDelayTime *)0x3F800000, 0.5, 150, (int)&v100); v9(v2, v10, 100); std::string::~string((int)&v100); std::string::~string((int)v99); this = (int *)std::string::~string((int)&v96); } } v11 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)this); *(_DWORD *)(v2 + 760) = *((_DWORD *)v11 + 80); v12 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v11); v13 = *((const char **)v12 + 80); v14 = MusicDownloadManager::sharedState(v12); v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"SFX Library Version %i. SFX Count: %i", v13, *(_DWORD *)(v14 + 324)); v86[0] = 0; v86[1] = 0; v87 = nullptr; v16 = (const char *)cocos2d::CCString::getCString(v15); v17 = strlen(v16); std::string::__init(v86, v16, v17); if ( (v86[0] & 1) != 0 ) v18 = v87; else v18 = (char *)v86 + 1; (*(void (__fastcall **)(_DWORD, char *))(**(_DWORD **)(v2 + 580) + 464))(*(_DWORD *)(v2 + 580), v18); LoadingCircleSprite::hideCircle(*(LoadingCircleSprite **)(v2 + 752)); v19 = *(cocos2d::CCObject **)(v2 + 544); if ( a2 != (cocos2d::CCArray **)v19 ) { if ( v19 ) cocos2d::CCObject::release(v19); *(_DWORD *)(v2 + 544) = a2; cocos2d::CCObject::retain((cocos2d::CCObject *)a2); } v20 = *(SFXSearchResult **)(v2 + 544); v21 = *((_DWORD *)v20 + 26); if ( v21 ) v22 = v21 == 4; else v22 = 1; v23 = *(_DWORD *)(v2 + 596); v24 = *(void (__fastcall **)(int, _BOOL4))(*(_DWORD *)v23 + 172); if ( !*(_BYTE *)(v2 + 624) && v22 && SFXSearchResult::getActiveFolder(v20) && *(int *)(SFXSearchResult::getActiveFolder(*(SFXSearchResult **)(v2 + 544)) + 56) > 0 ) { v26 = *(_DWORD *)(v2 + 544); v27 = *(unsigned __int8 *)(v26 + 80); if ( (v27 & 1) != 0 ) v28 = *(_DWORD *)(v26 + 84); else v28 = v27 >> 1; v25 = v28 == 0; } else { v25 = 0; } v24(v23, v25); v88[0] = 0; v88[1] = 0; v89 = nullptr; std::string::__init(v88, &unk_B6B226, 0); v90 = 0; v91 = 0; v92 = nullptr; std::string::__init(&v90, &unk_B6B226, 0); v29 = *(SFXSearchResult **)(v2 + 544); v30 = *((_DWORD *)v29 + 26); switch ( v30 ) { case 1: v31 = "Favorites"; LABEL_30: std::string::assign(v88, v31); goto LABEL_38; case 2: v31 = "Recent"; goto LABEL_30; case 3: v31 = "This Level"; goto LABEL_30; } if ( v30 == 4 && SFXSearchResult::getActiveFolder(v29) ) { ActiveFolder = SFXSearchResult::getActiveFolder(*(SFXSearchResult **)(v2 + 544)); v33 = std::string::operator=((unsigned __int8 *)v88, (unsigned __int8 *)(ActiveFolder + 76)); v34 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v33); v35 = SFXSearchResult::getActiveFolder(*(SFXSearchResult **)(v2 + 544)); v36 = &v93; MusicDownloadManager::getCustomSFXFolderPath((MusicDownloadManager *)&v93, v34, *(_DWORD *)(v35 + 72), 1); if ( (v90 & 1) != 0 ) { *v92 = 0; v91 = 0; } else { LOWORD(v90) = 0; } std::string::reserve(&v90, 0); v37 = v93; v38 = v94; v39 = v95; v93 = 0; v94 = 0; v95 = nullptr; v90 = v37; v91 = v38; v92 = v39; LABEL_37: std::string::~string((int)v36); goto LABEL_38; } if ( SFXSearchResult::getActiveFolder(*(SFXSearchResult **)(v2 + 544)) ) { v66 = SFXSearchResult::getActiveFolder(*(SFXSearchResult **)(v2 + 544)); v67 = std::string::operator=((unsigned __int8 *)v88, (unsigned __int8 *)(v66 + 76)); v68 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v67); v69 = SFXSearchResult::getActiveFolder(*(SFXSearchResult **)(v2 + 544)); v36 = &v96; MusicDownloadManager::getSFXFolderPathForID((MusicDownloadManager *)&v96, v68, *(_DWORD *)(v69 + 52), 1); if ( (v90 & 1) != 0 ) { *v92 = 0; v91 = 0; } else { LOWORD(v90) = 0; } std::string::reserve(&v90, 0); v70 = v96; v71 = v97; v72 = v98; v96 = 0; v97 = 0; v98 = nullptr; v90 = v70; v91 = v71; v92 = v72; goto LABEL_37; } LABEL_38: if ( (v88[0] & 1) != 0 ) v40 = v89; else v40 = (char *)v88 + 1; (*(void (__fastcall **)(_DWORD, char *, int))(**(_DWORD **)(v2 + 556) + 464))( *(_DWORD *)(v2 + 556), v40, LOBYTE(v88[0]) << 31); cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(v2 + 556), 150.0, 0.5, 0.0); (*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v2 + 556) + 172))( *(_DWORD *)(v2 + 556), *(unsigned __int8 *)(v2 + 624) ^ 1); std::string::operator=((unsigned __int8 *)(v2 + 568), (unsigned __int8 *)&v90); SFXBrowser::fitFolderPath((SFXBrowser *)v2); v41 = *(cocos2d::CCObject **)(v2 + 548); if ( v41 ) v41 = (cocos2d::CCObject *)cocos2d::CCObject::release(v41); if ( *(_DWORD *)(v2 + 552) ) { v42 = cocos2d::CCDirector::sharedDirector(v41); v43 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v42 + 80))(v42); cocos2d::CCTouchDispatcher::unregisterForcePrio(v43, *(cocos2d::CCObject **)(v2 + 552)); v41 = (cocos2d::CCObject *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 552) + 268))(*(_DWORD *)(v2 + 552)); *(_DWORD *)(v2 + 552) = 0; } v44 = (cocos2d::CCArray *)cocos2d::CCArray::create(v41); v45 = a2[14]; v46 = v44; v47 = *(_DWORD *)(v2 + 764) * (_DWORD)a2[18]; v48 = cocos2d::CCArray::count(v45); for ( i = v47; i < *(_DWORD *)(v2 + 764) + v47 && i < v48; ++i ) { v50 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(v45, i); cocos2d::CCArray::addObject(v46, v50); } *(_DWORD *)(v2 + 548) = v46; v51 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(v46); cocos2d::CCDirector::sharedDirector(v51); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v84); if ( *(_BYTE *)(v2 + 771) ) v52 = 22; else v52 = 21; v53 = CustomListView::create(*(cocos2d::CCObject **)(v2 + 548), v2 + 524, 1130102784, 1135214592, 0, v52, 0); v54 = GJCommentListLayer::create((int)v53, (int)&unk_B6B226, -13487566, 340.0, 220.0, 1); *(_DWORD *)(v2 + 552) = v54; (*(void (__fastcall **)(_DWORD, cocos2d::CCLayerColor *, int))(**(_DWORD **)(v2 + 460) + 232))( *(_DWORD *)(v2 + 460), v54, 9); v55 = *(_DWORD *)(v2 + 552); v56 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v55 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v85, (float)(v84[0] - 340.0) * 0.5, (float)((float)(v84[1] - 220.0) * 0.5) - 10.0); v56(v55, v85); (*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v2 + 600) + 172))(*(_DWORD *)(v2 + 600), 1); updated = SFXBrowser::updateSelectionUI((GameManager *)v2); v58 = *(_DWORD *)(*(_DWORD *)(v2 + 544) + 104) == 3; v59 = (GameManager *)GameManager::sharedState(updated); if ( *((_DWORD *)v59 + 102) && (v60 = *(_DWORD *)(*(_DWORD *)(GameManager::sharedState(v59) + 408) + 2084)) != 0 ) { v61 = *(_DWORD *)(v60 + 492); if ( v61 ) { if ( v61 == 1 ) v62 = "Setup too large to share"; else v62 = "Shared folders removed, level share off"; v83 = v62; v63 = *(void (__fastcall **)(int, cocos2d::CCNode *, int))(*(_DWORD *)v2 + 232); memset(v99, 0, sizeof(v99)); v64 = strlen(v62); std::string::__init(v99, v83, v64); v100 = 0; v101 = 0; v102 = 0; std::string::__init(&v100, &unk_B6B226, 0); v65 = TextAlertPopup::create((int)v99, (cocos2d::CCDelayTime *)0x3F666666, 0.5, 150, (int)&v100); v63(v2, v65, 100); std::string::~string((int)&v100); std::string::~string((int)v99); *(_DWORD *)(v60 + 492) = 0; } v73 = *(unsigned __int8 *)(v60 + 464); if ( (v73 & 1) != 0 ) v74 = *(_DWORD *)(v60 + 468); else v74 = v73 >> 1; v75 = v74; if ( v74 ) v75 = 1; if ( *(_DWORD *)(v60 + 460) ) { v76 = 1; goto LABEL_72; } } else { v75 = 0; } v76 = 0; LABEL_72: v77 = *(_DWORD *)(v2 + 648); if ( v77 ) { if ( v58 ) { if ( *(_BYTE *)(v2 + 624) ) { v76 = 0; } else if ( v75 ) { v76 = 1; } } else { v76 = 0; } (*(void (__fastcall **)(int, int))(*(_DWORD *)v77 + 172))(v77, v76); } v78 = *(_DWORD *)(v2 + 652); if ( v78 ) { if ( v58 ) { if ( *(_BYTE *)(v2 + 624) ) v79 = 0; else v79 = v75; } else { v79 = 0; } (*(void (__fastcall **)(int, int))(*(_DWORD *)v78 + 172))(v78, v79); } SFXBrowser::updateViewItems(v2); SFXBrowser::updatePageLabel((SFXBrowser *)v2, v80, v81, v82); std::string::~string((int)&v90); std::string::~string((int)v88); return (int *)std::string::~string((int)v86); }
GD Web Decomp Icon

GD Web Decomp

Raw Source