//
// CustomSFXWidget::onCancelDownload from 0x1400c19a0 to 0x1400c1a26 (134 bytes)
//
// 2 xrefs:
// > CustomSFXWidget::init @ 0x1400c0dc8
// > ??> @ 0x1406c7f74
//
// 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 CustomSFXWidget::onCancelDownload(CustomSFXWidget *a1, cocos2d::CCObject *a2)
{
int m_sfxID; // ebx
MusicDownloadManager *v4; // rsi
cocos2d::CCString *v5; // rax
const char *CString; // rbx
__int64 AchievementsWithID; // rax
m_sfxID = a1->m_sfxID;
v4 = MusicDownloadManager::sharedState();
v5 = cocos2d::CCString::createWithFormat("d_%i", m_sfxID);
CString = cocos2d::CCString::getCString(v5);
AchievementsWithID = AchievementManager::getAchievementsWithID((__int64)v4, (__int64)CString);
if ( AchievementsWithID )
*(_BYTE *)(AchievementsWithID + 204) = 1;
MusicDownloadManager::removeDLFromActive(v4, CString);
a1->downloadSFXFailed(&a1->MusicDownloadDelegate, a1->m_sfxID, DownloadCancelled);
}