// // MusicDownloadManager::downloadSong from 0x45b018 to 0x45b16e (342 bytes) // // 3 xrefs: // > CustomSongWidget::startDownload @ 0x3dde52 // > CustomSongWidget::processNextMultiAsset @ 0x3dffd8 // > CustomSongWidget::loadSongInfoFinished @ 0x3e06ea // // 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 MusicDownloadManager::downloadSong(MusicDownloadManager *a1, int a2) { char *SongDownloadKey; // r10 MusicDownloadManager *v5; // r0 cocos2d::CCString *v6; // r0 char *v7; // r0 cocos2d::CCString *v8; // r0 char *CString; // r0 int v10; // r4 cocos2d::CCString *v11; // r0 char *v12; // r0 cocos2d::extension::CCHttpClient *Instance; // r0 char *v14; // [sp+0h] [bp-10h] BYREF int v15; // [sp+4h] [bp-Ch] BYREF _BYTE v16[4]; // [sp+8h] [bp-8h] BYREF v14 = (char *)a1; v15 = a2; if ( a2 <= (int)" of X position. These triggers need to use Group ID and have Spawn Trigger enabled.\nPreview Disable disables activation while not playtesting in editor.\nSpawn Ordered spawns the triggers in order from left to right.\nUse remapping (page 2) to copy a Spawn setup to another group." ) { SongDownloadKey = (char *)MusicDownloadManager::getSongDownloadKey(a1, a2); if ( !MusicDownloadManager::isDLActive(a1, SongDownloadKey) ) { MusicDownloadManager::downloadSongStarted(a1, a2); sub_776584((int)&v14, (char *)&unk_939830); v5 = MusicDownloadManager::sharedState(); if ( MusicDownloadManager::getSongInfoObject(v5, a2) ) { sub_775C20(&v15); sub_774794(&v14, &v15); sub_774008(&v15); } if ( !*((_DWORD *)v14 - 3) ) { v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"https://www.newgrounds.com/audio/download/%i", (const char *)a2); CString = (char *)cocos2d::CCString::getCString(v8); sub_7753D4((int)&v14, CString); } v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i.mp3", (const char *)a2); v7 = (char *)cocos2d::CCString::getCString(v6); sub_776584((int)v16, v7); v10 = operator new(0x7Cu); cocos2d::extension::CCHttpRequest::CCHttpRequest((cocos2d::extension::CCHttpRequest *)v10); *(_DWORD *)(v10 + 116) = 120; sub_7753D4(v10 + 56, v14); *(_DWORD *)(v10 + 76) = a1; *(_DWORD *)(v10 + 52) = 0; *(_DWORD *)(v10 + 80) = MusicDownloadManager::onDownloadSongCompleted; *(_DWORD *)(v10 + 84) = 0; if ( a1 ) cocos2d::CCObject::retain(a1); v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a2); v12 = (char *)cocos2d::CCString::getCString(v11); sub_7753D4(v10 + 72, v12); Instance = cocos2d::extension::CCHttpClient::getInstance(); cocos2d::extension::CCHttpClient::send(Instance, (cocos2d::extension::CCHttpRequest *)v10); cocos2d::CCObject::release((cocos2d::CCObject *)v10); MusicDownloadManager::addDLToActive(a1, SongDownloadKey, (cocos2d::CCObject *)v10); sub_774008(v16); sub_774008(&v14); } } else { MusicDownloadManager::downloadCustomSong(a1, a2); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source