//
// MusicDownloadManager::onTryUpdateMusicLibraryCompleted from 0x10065a080 to 0x10065a1ac (300 bytes)
//
// 1 xrefs:
// > MusicDownloadManager::tryUpdateMusicLibrary @ 0x100659f89
//
// 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:34:53 +0000
//
void __fastcall MusicDownloadManager::onTryUpdateMusicLibraryCompleted(__int64 a1, __int64 a2, __int64 a3)
{
unsigned int v4; // r14d
__int64 v5; // rax
unsigned int v6; // r14d
__int64 v7; // rax
char v8; // [rsp+8h] [rbp-28h] BYREF
char v9[15]; // [rsp+9h] [rbp-27h] BYREF
char *v10; // [rsp+18h] [rbp-18h]
MusicDownloadManager::removeDLFromActive(a1, "v_music_l");
if ( a3 && *(_BYTE *)(a3 + 64) )
{
GameToolbox::getResponse((__int64)&v8, a3);
if ( (v8 & 1) != 0 )
{
if ( atoi(v10) <= *(_DWORD *)(a1 + 512) )
goto LABEL_5;
}
else if ( atoi(v9) <= *(_DWORD *)(a1 + 512) )
{
LABEL_5:
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 336)) )
{
v4 = 0;
do
{
v5 = sub_1007FEFE0(*(_QWORD *)(a1 + 336), v4);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v5 + 320) + 72LL))(*(_QWORD *)(v5 + 320), 6);
++v4;
}
while ( v4 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 336)) );
}
goto LABEL_15;
}
MusicDownloadManager::downloadMusicLibrary(a1);
LABEL_15:
if ( (v8 & 1) != 0 )
operator delete(v10);
return;
}
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 336)) )
{
v6 = 0;
do
{
v7 = sub_1007FEFE0(*(_QWORD *)(a1 + 336), v6);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v7 + 320) + 72LL))(*(_QWORD *)(v7 + 320), 5);
++v6;
}
while ( v6 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 336)) );
}
}