//
// CustomSFXWidget::updateDownloadProgress from 0x140162480 to 0x140162549 (201 bytes)
//
// 5 xrefs:
// > CustomSFXWidget::startMonitorDownload @ 0x140162024
// > CustomSFXWidget::startMonitorDownload @ 0x14016203c
// > CustomSFXWidget::updateDownloadProgress @ 0x140162527
// > CustomSFXWidget::downloadSFXFailed @ 0x140163931
// > ??> @ 0x140917da4
//
// 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:25 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall CustomSFXWidget::updateDownloadProgress(__int64 a1)
{
__int64 v2; // rdi
cocos2d::CCString *v3; // rax
const char *CString; // rax
__int64 AchievementsWithID; // rax
int v6; // edx
void *v8; // [rsp+30h] [rbp+8h]
v2 = qword_14090C070;
if ( !qword_14090C070 )
{
v8 = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v2 = qword_14090C070;
}
v3 = cocos2d::CCString::createWithFormat("sfx_%i", *(_DWORD *)(*(_QWORD *)(a1 + 336) + 56LL));
CString = cocos2d::CCString::getCString(v3);
AchievementsWithID = AchievementManager::getAchievementsWithID(v2, (__int64)CString);
v6 = -1;
if ( AchievementsWithID )
v6 = *(_DWORD *)(AchievementsWithID + 208);
if ( *(_QWORD *)(a1 + 336) && v6 != -1 )
return CustomSFXWidget::updateProgressBar(a1);
cocos2d::CCNode::unschedule(a1, CustomSFXWidget::updateDownloadProgress);
return CustomSFXWidget::updateSFXInfo(a1);
}