//
// CustomSongWidget::updateDownloadProgress from 0x1400cb390 to 0x1400cb437 (167 bytes)
//
// 7 xrefs:
// > CustomSongWidget::startDownload @ 0x1400cae1b
// > CustomSongWidget::startDownload @ 0x1400cae33
// > CustomSongWidget::updateDownloadProgress @ 0x1400cb410
// > CustomSongWidget::loadSongInfoFailed @ 0x1400ccebd
// > CustomSongWidget::downloadSongFailed @ 0x1400cd034
// > CustomSongWidget::musicActionFailed @ 0x1400cd67f
// > ??> @ 0x1406c8334
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void CustomSongWidget::updateDownloadProgress(CustomSongWidget *a1, float a2)
{
int m_songID; // ebx
MusicDownloadManager *v4; // rdi
cocos2d::CCString *v5; // rax
const char *CString; // rax
__int64 AchievementsWithID; // rax
int v8; // edx
m_songID = a1->m_songInfoObject->m_songID;
v4 = MusicDownloadManager::sharedState();
v5 = cocos2d::CCString::createWithFormat("d_%i", m_songID);
CString = cocos2d::CCString::getCString(v5);
AchievementsWithID = AchievementManager::getAchievementsWithID((__int64)v4, (__int64)CString);
v8 = -1;
if ( AchievementsWithID )
v8 = *(_DWORD *)(AchievementsWithID + 208);
if ( !a1->m_songInfoObject || v8 == -1 )
{
cocos2d::CCNode::unschedule(a1, CustomSongWidget::updateDownloadProgress);
CustomSongWidget::updateSongInfo(a1);
}
else
{
CustomSongWidget::updateProgressBar(a1, v8);
}
}