//
// AudioAssetsBrowser::trySetupAudioBrowser from 0xbc1e9c to 0xbc1f2c (144 bytes)
//
// 2 xrefs:
// > AudioAssetsBrowser::musicActionFinished @ 0xbc1f2c
// > ??> @ 0x103258
//
// 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:03:29 +0000
//
__int64 __fastcall AudioAssetsBrowser::trySetupAudioBrowser(AudioAssetsBrowser *this)
{
MusicDownloadManager *v2; // x0
unsigned __int8 *v3; // x2
MusicDownloadManager *v4; // x0
__int64 v5; // x1
MusicDownloadManager *v6; // x0
unsigned __int8 *v8; // x2
MusicDownloadManager *v9; // x0
__int64 v10; // x1
MusicDownloadManager *v11; // x0
MusicDownloadManager *v12; // x0
v2 = *(MusicDownloadManager **)(MusicDownloadManager::sharedState(this) + 400);
if ( v2 )
{
v3 = (unsigned __int8 *)(MusicDownloadManager::sharedState(v2) + 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);
MusicDownloadManager::getCustomContentURL(v6);
}
return AudioAssetsBrowser::setupList(this);
}
else
{
v8 = (unsigned __int8 *)(MusicDownloadManager::sharedState(nullptr) + 368);
v9 = (MusicDownloadManager *)*v8;
v10 = (unsigned __int8)v9 >> 1;
if ( ((unsigned __int8)v9 & 1) != 0 )
v10 = *((_QWORD *)v8 + 1);
if ( v10 )
{
v11 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v9);
return MusicDownloadManager::downloadSFXLibrary(v11);
}
else
{
v12 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v9);
return MusicDownloadManager::getCustomContentURL(v12);
}
}
}