//
// SFXBrowser::trySetupSFXBrowser from 0x6c6ae0 to 0x6c6b24 (68 bytes)
//
// 2 xrefs:
// > sub_6C6B24 @ 0x6c8162
// > SFXBrowser::musicActionFinished @ 0x6c8378
//
// 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::trySetupSFXBrowser(SFXBrowser *this)
{
MusicDownloadManager *v2; // r0
int v4; // r0
int v5; // r3
int v6; // r3
MusicDownloadManager *v7; // r0
int v8; // r0
v2 = (MusicDownloadManager *)MusicDownloadManager::sharedState(this);
if ( *((_DWORD *)v2 + 77) )
return SFXBrowser::setupSFXBrowser(this);
v4 = MusicDownloadManager::sharedState(v2);
v5 = *(unsigned __int8 *)(v4 + 288);
if ( (v5 & 1) != 0 )
v6 = *(_DWORD *)(v4 + 292);
else
v6 = v5 >> 1;
if ( v6 )
{
v8 = MusicDownloadManager::sharedState((MusicDownloadManager *)v4);
return (int *)MusicDownloadManager::downloadSFXLibrary(v8);
}
else
{
v7 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v4);
return (int *)MusicDownloadManager::getCustomContentURL(v7);
}
}