//
// MusicDownloadManager::newsImageDownloaded from 0x100664030 to 0x1006640dd (173 bytes)
//
// 1 xrefs:
// > MusicDownloadManager::onDownloadNewsImageCompleted @ 0x100663ddc
//
// 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:57 +0000
//
__int64 __fastcall MusicDownloadManager::newsImageDownloaded(__int64 a1, __int128 *a2)
{
__int64 result; // rax
unsigned int v3; // r15d
__int64 v4; // r13
__int128 v5; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
result = sub_1007FEF90(*(_QWORD *)(a1 + 336));
if ( (_DWORD)result )
{
v3 = 0;
do
{
v4 = *(_QWORD *)(sub_1007FEFE0(*(_QWORD *)(a1 + 336), v3) + 320);
if ( (*(_BYTE *)a2 & 1) != 0 )
{
sub_10001AD30(&v5, *((const void **)a2 + 2), *((_QWORD *)a2 + 1));
}
else
{
__p = *((void **)a2 + 2);
v5 = *a2;
}
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v4 + 80LL))(v4, &v5);
if ( (v5 & 1) != 0 )
operator delete(__p);
++v3;
result = sub_1007FEF90(*(_QWORD *)(a1 + 336));
}
while ( v3 < (unsigned int)result );
}
return result;
}