//
// CustomSongWidget::downloadSongFinished from 0x1006fd100 to 0x1006fd1b2 (178 bytes)
//
// 2 xrefs:
// > sub_1006FD3D0 @ 0x1006fd3dc
// > ??> @ 0x100b95dd0
//
// 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:56 +0000
//
__int64 __fastcall CustomSongWidget::downloadSongFinished(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v4; // rdi
float v5; // xmm0_4
__m128 v6; // xmm1
if ( *(_BYTE *)(a1 + 529) == 1 )
return CustomSongWidget::downloadAssetFinished(a1, a2, 1);
result = *(unsigned int *)(a1 + 504);
LOBYTE(result) = (_DWORD)result != (_DWORD)a2 || (_DWORD)result == 0;
if ( !(_BYTE)result )
{
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 376) + 1072LL))(*(_QWORD *)(a1 + 376), &unk_100A11C39);
(*(void (__fastcall **)(_QWORD, const char *))(**(_QWORD **)(a1 + 376) + 928LL))(
*(_QWORD *)(a1 + 376),
"Download complete.");
v4 = *(_QWORD *)(a1 + 376);
if ( *(_BYTE *)(a1 + 501) == 1 )
{
v5 = 140.0;
v6 = (__m128)0x3EB33333u;
}
else
{
v5 = 230.0;
v6 = (__m128)0x3ECCCCCDu;
}
cocos2d::CCLabelBMFont::limitLabelWidth(v4, v5, v6, (__m128)0LL);
return CustomSongWidget::showError(a1, 1);
}
return result;
}