//
// MusicBrowser::trySetupMusicBrowser from 0xb85d68 to 0xb85dd0 (104 bytes)
//
// 3 xrefs:
// > sub_B85DD0 @ 0xb86f88
// > MusicBrowser::musicActionFinished @ 0xb87310
// > ??> @ 0x57e08
//
// 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:30 +0000
//
__int64 __fastcall MusicBrowser::trySetupMusicBrowser(MusicBrowser *this)
{
unsigned __int8 *v3; // x2
MusicDownloadManager *v4; // x0
__int64 v5; // x1
MusicDownloadManager *v6; // x0
MusicDownloadManager *v7; // x0
if ( *(_QWORD *)(MusicDownloadManager::sharedState(this) + 440) )
return MusicBrowser::setupMusicBrowser(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::downloadMusicLibrary(v6);
}
else
{
v7 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v4);
return MusicDownloadManager::getCustomContentURL(v7);
}
}