//
// MusicBrowser::trySetupMusicBrowser from 0x6be9cc to 0x6bea10 (68 bytes)
//
// 2 xrefs:
// > sub_6BEA10 @ 0x6bf852
// > MusicBrowser::musicActionFinished @ 0x6bfa08
//
// 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:48 +0000
//
int __fastcall MusicBrowser::trySetupMusicBrowser(MusicBrowser *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 + 83) )
return MusicBrowser::setupMusicBrowser(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 MusicDownloadManager::downloadMusicLibrary(v8);
}
else
{
v7 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v4);
return MusicDownloadManager::getCustomContentURL(v7);
}
}