//
// GameManager::getMenuMusicFile from 0x320aec to 0x320b72 (134 bytes)
//
// 2 xrefs:
// > GameManager::playMenuMusic @ 0x323f24
// > GameManager::fadeInMenuMusic @ 0x323fd4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
GameManager *__fastcall GameManager::getMenuMusicFile(GameManager *this, int a2)
{
MusicDownloadManager *v4; // r0
MusicDownloadManager *v5; // r0
char *v7; // [sp+8h] [bp-Ch] BYREF
if ( *(int *)(a2 + 820) > 0 )
{
v4 = MusicDownloadManager::sharedState();
if ( !MusicDownloadManager::isSongDownloaded(v4, *(_DWORD *)(a2 + 820)) )
*(_DWORD *)(a2 + 820) = 0;
}
if ( *(int *)(a2 + 820) <= 0 )
{
sub_776584((int)this, "menuLoop.mp3");
}
else
{
v5 = MusicDownloadManager::sharedState();
MusicDownloadManager::pathForSong((MusicDownloadManager *)&v7, (int)v5);
sub_776584((int)this, v7);
sub_774008(&v7);
}
return this;
}