//
// SFXBrowser::trySetupSFXBrowser from 0xb94760 to 0xb947c8 (104 bytes)
//
// 4 xrefs:
// > SFXBrowser::setupSFXBrowser @ 0xb93760
// > sub_B947C8 @ 0xb962cc
// > SFXBrowser::musicActionFinished @ 0xb9672c
// > ??> @ 0x59ce0
//
// This function is hookable on this platform (idp: arm, 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 13:02:40 +0000
//
__int64 __fastcall SFXBrowser::trySetupSFXBrowser(SFXBrowser *this)
{
unsigned __int8 *v3; // x2
MusicDownloadManager *v4; // x0
__int64 v5; // x1
MusicDownloadManager *v6; // x0
MusicDownloadManager *v7; // x0
if ( *(_QWORD *)(MusicDownloadManager::sharedState(this) + 400) )
return SFXBrowser::setupSFXBrowser(this);
v3 = (unsigned __int8 *)(MusicDownloadManager::sharedState(nullptr) + 368);
v4 = (MusicDownloadManager *)*v3;
v5 = (unsigned __int8)v4 >> 1;
if ( ((unsigned __int8)v4 & 1) != 0 )
v5 = *((_QWORD *)v3 + 1);
if ( v5 )
{
v6 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v4);
return MusicDownloadManager::downloadSFXLibrary(v6);
}
else
{
v7 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v4);
return MusicDownloadManager::getCustomContentURL(v7);
}
}