//
// CustomSFXWidget::onDownload from 0xb5dfc8 to 0xb5e090 (200 bytes)
//
// 4 xrefs:
// > CustomSFXWidget::FLAlert_Clicked @ 0xb5ef20
// > ??> @ 0xad3e0
// > CustomSFXWidget::init @ 0xb5f648
// > ??> @ 0x1544ea0
//
// This function is hookable on this platform (idp: arm, 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 13:02:10 +0000
//
GameManager *__fastcall CustomSFXWidget::onDownload(CustomSFXWidget *this, cocos2d::CCObject *a2)
{
GameManager *result; // x0
GameManager *v4; // x0
MusicDownloadManager *GameVariable; // x0
MusicDownloadManager *v6; // x0
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 46) + 344LL))(*((_QWORD *)this + 46), 0);
result = *((GameManager **)this + 42);
if ( result )
{
v4 = (GameManager *)GameManager::sharedState(result);
GameVariable = (MusicDownloadManager *)(unsigned __int8)GameManager::getGameVariable(v4, "0016");
if ( (_BYTE)GameVariable )
{
CustomSFXWidget::showLoadingArt(this);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 47) + 344LL))(*((_QWORD *)this + 47), 0);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 48) + 344LL))(*((_QWORD *)this + 48), 1);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 51) + 344LL))(*((_QWORD *)this + 51), 0);
return (GameManager *)CustomSFXWidget::startDownload(this);
}
else
{
v6 = (MusicDownloadManager *)MusicDownloadManager::sharedState(GameVariable);
return (GameManager *)MusicDownloadManager::showTOS(v6, (CustomSFXWidget *)((char *)this + 328));
}
}
return result;
}