//
// CustomSFXWidget::updateDownloadProgress from 0x1006b8550 to 0x1006b8619 (201 bytes)
//
// 6 xrefs:
// > CustomSFXWidget::init @ 0x1006b68ae
// > CustomSFXWidget::onDownload @ 0x1006b6a21
// > CustomSFXWidget::startMonitorDownload @ 0x1006b80ea
// > CustomSFXWidget::startDownload @ 0x1006b8514
// > CustomSFXWidget::updateDownloadProgress @ 0x1006b858d
// > CustomSFXWidget::downloadFailed @ 0x1006b869c
//
// 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:28 +0000
//
__int64 __fastcall CustomSFXWidget::updateDownloadProgress(_QWORD *a1, double a2, double a3, __m128 a4)
{
__int64 v4; // rax
int SFXDownloadProgress; // eax
int v7; // ecx
__int64 v8; // rbx
_BYTE v9[32]; // [rsp+0h] [rbp-20h] BYREF
v4 = MusicDownloadManager::sharedState();
SFXDownloadProgress = MusicDownloadManager::getSFXDownloadProgress(v4);
if ( a1[42] == 0 || SFXDownloadProgress == -1 )
{
cocos2d::CCNode::unschedule((__int64)a1, (__int64)CustomSFXWidget::updateDownloadProgress, 0);
return CustomSFXWidget::updateSFXInfo((__int64)a1);
}
else
{
v7 = 0;
if ( SFXDownloadProgress > 0 )
v7 = SFXDownloadProgress;
v8 = a1[58];
a4.f32[0] = fminf(
(float)((float)v7 / 100.0) * (float)(*(float *)(a1[57] + 432LL) + -4.0),
*(float *)(a1[57] + 432LL) + -4.0);
sub_100278270((__int64)v9, 0.0, 0.0, a4, (__m128)0x41000000u);
return (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v8 + 1136LL))(v8, v9);
}
}