//
// SFXBrowser::onUpdateLibrary from 0x10042e290 to 0x10042e2fb (107 bytes)
//
// 1 xrefs:
// > SFXBrowser::init @ 0x10042c748
//
// 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 12:30:21 +0000
//
__int64 __fastcall SFXBrowser::onUpdateLibrary(__int64 a1, __int64 a2)
{
__int64 v2; // rax
unsigned int v3; // ecx
__int64 v4; // rax
__int64 v6; // rax
*(_BYTE *)(a1 + 1128) = a2 == 0;
v2 = MusicDownloadManager::sharedState(a1);
v3 = *(unsigned __int8 *)(v2 + 368);
if ( (v3 & 1) != 0 )
{
if ( *(_QWORD *)(v2 + 376) )
goto LABEL_3;
}
else if ( v3 >> 1 )
{
LABEL_3:
*(_BYTE *)(a1 + 1108) = 0;
v4 = MusicDownloadManager::sharedState(a1);
return MusicDownloadManager::tryUpdateSFXLibrary(v4);
}
*(_BYTE *)(a1 + 1108) = 1;
v6 = MusicDownloadManager::sharedState(a1);
return MusicDownloadManager::getCustomContentURL(v6);
}