//
// CustomSongWidget::downloadSongFinished from 0x14016e190 to 0x14016e24f (191 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407448c0
// > ??> @ 0x1409181b8
//
// 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
//
__int64 __fastcall CustomSongWidget::downloadSongFinished(__int64 a1, __int64 a2)
{
__int64 result; // rax
float v4; // xmm2_4
float v5; // xmm1_4
__int64 v6; // rdx
if ( *(_BYTE *)(a1 + 209) )
return CustomSongWidget::downloadAssetFinished(a1 - 320, a2, 1);
result = *(unsigned int *)(a1 + 184);
if ( (_DWORD)result == (_DWORD)a2 && (_DWORD)result )
{
(**(void (__fastcall ***)(__int64, void *))(*(_QWORD *)(a1 + 56) + 368LL))(
*(_QWORD *)(a1 + 56) + 368LL,
&unk_140702F7C);
(**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 56) + 360LL))(
*(_QWORD *)(a1 + 56) + 360LL,
"Download complete.");
if ( *(_BYTE *)(a1 + 181) )
{
v4 = 0.34999999;
v5 = 140.0;
}
else
{
v4 = 0.40000001;
v5 = 230.0;
}
cocos2d::CCLabelBMFont::limitLabelWidth(*(cocos2d::CCLabelBMFont **)(a1 + 56), v5, v4, 0.0);
LOBYTE(v6) = 1;
return CustomSongWidget::showError(a1 - 320, v6);
}
return result;
}