//
// CustomSongWidget::downloadAssetFinished from 0x14016e7e0 to 0x14016e895 (181 bytes)
//
// 3 xrefs:
// > CustomSongWidget::downloadSongFinished @ 0x14016e1bd
// > CustomSongWidget::downloadSFXFinished @ 0x14016e2dd
// > ??> @ 0x1409181e8
//
// 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 11:27:30 +0000
//
void __fastcall CustomSongWidget::downloadAssetFinished(_QWORD *a1, int a2, int a3)
{
_DWORD *v3; // rbx
int v5; // eax
_QWORD *v6; // rcx
__int64 v7; // rdx
v3 = (_DWORD *)a1[73];
if ( v3 == (_DWORD *)a1[74] )
return;
while ( 1 )
{
if ( *v3 == a2 )
{
v5 = v3[1];
if ( v5 == a3 )
break;
}
v3 += 4;
if ( v3 == (_DWORD *)a1[74] )
return;
}
if ( v5 == 1 )
{
v6 = a1 + 69;
LABEL_10:
*(_BYTE *)sub_14016EE40(v6, v3) = 1;
goto LABEL_11;
}
if ( v5 == 2 )
{
v6 = a1 + 71;
goto LABEL_10;
}
LABEL_11:
memmove(v3, v3 + 4, a1[74] - (_QWORD)(v3 + 4));
a1[74] -= 16LL;
if ( a1[73] != a1[74] )
CustomSongWidget::updateMultiAssetInfo((__int64)a1, 0);
CustomSongWidget::processNextMultiAsset(a1, v7);
}