//
// SFXBrowser::musicActionFinished from 0x100431230 to 0x10043130d (221 bytes)
//
// 2 xrefs:
// > sub_100431310 @ 0x10043131c
// > ??> @ 0x100b424c8
//
// 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:22 +0000
//
__int64 __fastcall SFXBrowser::musicActionFinished(__int64 a1, int a2)
{
__int64 v2; // rax
unsigned int v3; // ecx
__int64 v4; // rax
__int64 v6; // rax
unsigned int v7; // ebx
__int64 v8; // rax
__int64 v9; // rbx
if ( a2 == 2 && *(_BYTE *)(a1 + 1108) == 1 )
{
*(_BYTE *)(a1 + 1128) = 1;
v2 = MusicDownloadManager::sharedState(a1);
v3 = *(unsigned __int8 *)(v2 + 368);
if ( (v3 & 1) != 0 )
{
if ( *(_QWORD *)(v2 + 376) )
goto LABEL_5;
}
else if ( v3 >> 1 )
{
LABEL_5:
*(_BYTE *)(a1 + 1108) = 0;
v4 = MusicDownloadManager::sharedState(a1);
return MusicDownloadManager::tryUpdateSFXLibrary(v4);
}
*(_BYTE *)(a1 + 1108) = 1;
v8 = MusicDownloadManager::sharedState(a1);
return MusicDownloadManager::getCustomContentURL(v8);
}
if ( *(_QWORD *)(MusicDownloadManager::sharedState(a1) + 400) )
return SFXBrowser::setupSFXBrowser(a1);
v6 = MusicDownloadManager::sharedState(a1);
v7 = *(unsigned __int8 *)(v6 + 368);
if ( (v7 & 1) == 0 )
{
v8 = MusicDownloadManager::sharedState(a1);
if ( !(v7 >> 1) )
return MusicDownloadManager::getCustomContentURL(v8);
return MusicDownloadManager::downloadSFXLibrary(v8);
}
v9 = *(_QWORD *)(v6 + 376);
v8 = MusicDownloadManager::sharedState(a1);
if ( v9 )
return MusicDownloadManager::downloadSFXLibrary(v8);
return MusicDownloadManager::getCustomContentURL(v8);
}