//
// CustomSongWidget::updateDownloadProgress from 0x14016c280 to 0x14016c34c (204 bytes)
//
// 7 xrefs:
// > CustomSongWidget::startMonitorDownload @ 0x14016bbfe
// > CustomSongWidget::startMonitorDownload @ 0x14016bc16
// > CustomSongWidget::updateDownloadProgress @ 0x14016c32a
// > CustomSongWidget::loadSongInfoFailed @ 0x14016e13b
// > CustomSongWidget::downloadSongFailed @ 0x14016e2a4
// > CustomSongWidget::musicActionFailed @ 0x14016e9c7
// > ??> @ 0x140918164
//
// 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:29 +0000
//
__int64 __fastcall CustomSongWidget::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("d_%i", *(_DWORD *)(*(_QWORD *)(a1 + 336) + 320LL));
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, v6);
cocos2d::CCNode::unschedule(a1, CustomSongWidget::updateDownloadProgress);
return CustomSongWidget::updateSongInfo(a1);
}