//
// MusicBrowser::musicActionFinished from 0x14047c860 to 0x14047c8f9 (153 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407b6028
// > ??> @ 0x140928640
//
// This function is hookable on this platform (idp: pc, 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 11:32:43 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall MusicBrowser::musicActionFinished(__int64 a1, int a2)
{
__int64 v3; // rcx
void *v5; // [rsp+40h] [rbp+18h]
if ( a2 != 2 || !*(_BYTE *)(a1 + 208) )
return MusicBrowser::trySetupMusicBrowser(a1 - 664);
*(_BYTE *)(a1 + 248) = 1;
v3 = qword_14090C070;
if ( !qword_14090C070 )
{
v5 = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v3 = qword_14090C070;
}
if ( *(_QWORD *)(v3 + 384) )
{
*(_BYTE *)(a1 + 208) = 0;
return MusicDownloadManager::tryUpdateMusicLibrary(v3);
}
else
{
*(_BYTE *)(a1 + 208) = 1;
return MusicDownloadManager::getCustomContentURL(v3);
}
}