//
// MusicBrowser::onUpdateLibrary from 0x14047c280 to 0x14047c2ff (127 bytes)
//
// 2 xrefs:
// > MusicBrowser::init @ 0x14047a84b
// > ??> @ 0x14092861c
//
// 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::onUpdateLibrary(__int64 a1, __int64 a2)
{
__int64 v3; // rcx
void *v5; // [rsp+30h] [rbp+8h]
*(_BYTE *)(a1 + 912) = a2 == 0;
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 + 872) = 0;
return MusicDownloadManager::tryUpdateMusicLibrary();
}
else
{
*(_BYTE *)(a1 + 872) = 1;
return MusicDownloadManager::getCustomContentURL();
}
}