//
// MusicBrowser::musicActionFinished from 0x1006ea280 to 0x1006ea35d (221 bytes)
//
// 2 xrefs:
// > sub_1006EA360 @ 0x1006ea36c
// > ??> @ 0x100b94568
//
// 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:35:49 +0000
//
void __fastcall MusicBrowser::musicActionFinished(__int64 a1, int a2)
{
__int64 v2; // rax
unsigned int v3; // ecx
__int64 v4; // rax
__int64 v5; // rax
unsigned int v6; // ebx
__int64 v7; // rax
__int64 v8; // rbx
if ( a2 == 2 && *(_BYTE *)(a1 + 872) == 1 )
{
*(_BYTE *)(a1 + 912) = 1;
v2 = MusicDownloadManager::sharedState();
v3 = *(unsigned __int8 *)(v2 + 368);
if ( (v3 & 1) != 0 )
{
if ( *(_QWORD *)(v2 + 376) )
goto LABEL_5;
}
else if ( v3 >> 1 )
{
LABEL_5:
*(_BYTE *)(a1 + 872) = 0;
v4 = MusicDownloadManager::sharedState();
MusicDownloadManager::tryUpdateMusicLibrary(v4);
return;
}
*(_BYTE *)(a1 + 872) = 1;
v7 = MusicDownloadManager::sharedState();
goto LABEL_15;
}
if ( *(_QWORD *)(MusicDownloadManager::sharedState() + 440) )
{
MusicBrowser::setupMusicBrowser(a1);
return;
}
v5 = MusicDownloadManager::sharedState();
v6 = *(unsigned __int8 *)(v5 + 368);
if ( (v6 & 1) == 0 )
{
v7 = MusicDownloadManager::sharedState();
if ( !(v6 >> 1) )
goto LABEL_15;
LABEL_12:
MusicDownloadManager::downloadMusicLibrary(v7);
return;
}
v8 = *(_QWORD *)(v5 + 376);
v7 = MusicDownloadManager::sharedState();
if ( v8 )
goto LABEL_12;
LABEL_15:
MusicDownloadManager::getCustomContentURL(v7);
}