//
// MusicDownloadManager::getSongInfo from 0x1001d309c to 0x1001d3294 (504 bytes)
//
// 3 xrefs:
// > CustomSongWidget::onDownload @ 0x10011f728
// > sub_10011F884 @ 0x10011f8d4
// > CustomSongWidget::processNextMultiAsset @ 0x100122ff0
//
// 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 11:00:23 +0000
//
void __fastcall MusicDownloadManager::getSongInfo(__int64 a1, int a2, int a3)
{
__int64 SongInfoObject; // x0
__int64 v7; // x21
std::string::size_type size; // x22
__int64 v9; // x0
char *CString; // x21
__int64 v11; // x0
__int64 v12; // x0
__int64 v13; // x0
const char *v14; // x0
__int64 v15; // x0
const std::string::value_type *v16; // x0
std::string *p_dst; // x1
__int64 v18; // x0
char *v19; // x0
void *__p[2]; // [xsp+38h] [xbp-88h] BYREF
char v21; // [xsp+4Fh] [xbp-71h]
void *v22[2]; // [xsp+50h] [xbp-70h] BYREF
char v23; // [xsp+67h] [xbp-59h]
void *v24[2]; // [xsp+68h] [xbp-58h] BYREF
char v25; // [xsp+7Fh] [xbp-41h]
std::string __dst; // [xsp+80h] [xbp-40h] BYREF
SongInfoObject = MusicDownloadManager::getSongInfoObject(a1, a2);
if ( SongInfoObject )
{
v7 = SongInfoObject;
if ( !a3 || (*(_BYTE *)(SongInfoObject + 433) & 1) != 0 )
{
if ( *(char *)(SongInfoObject + 391) < 0 )
sub_1000097D0(&__dst, *(void **)(SongInfoObject + 368), *(_QWORD *)(SongInfoObject + 376));
else
__dst = *(std::string *)(SongInfoObject + 368);
if ( (__dst.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
size = SHIBYTE(__dst.__r_.__value_.__r.__words[2]);
else
size = __dst.__r_.__value_.__l.__size_;
if ( (SHIBYTE(__dst.__r_.__value_.__r.__words[2]) & 0x8000000000000000LL) != 0 )
{
operator delete(__dst.__r_.__value_.__l.__data_);
if ( size )
goto LABEL_12;
}
else if ( size )
{
LABEL_12:
MusicDownloadManager::loadSongInfoFinished(a1, v7);
return;
}
}
}
v9 = sub_1003065B0("i_%i", a2);
CString = (char *)cocos2d::CCString::getCString(v9);
if ( !sub_1001D2E78(a1, CString) )
{
v11 = cocos2d::CCNode::create(0);
MusicDownloadManager::addDLToActive(a1, CString, v11);
v12 = GameLevelManager::sharedState();
GameLevelManager::getBasePostString(v12, &__dst);
v13 = sub_1003065B0("%c%s%s%c%c%s", 87, "mfd", "2893", 103, 98, "7");
v14 = (const char *)cocos2d::CCString::getCString(v13);
v15 = sub_1003065B0("&songID=%i&secret=%s", a2, v14);
v16 = (const std::string::value_type *)cocos2d::CCString::getCString(v15);
std::string::append(&__dst, v16);
sub_100009900(v24, "https://www.boomlings.com/database/getGJSongInfo.php");
if ( (__dst.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_dst = &__dst;
else
p_dst = (std::string *)__dst.__r_.__value_.__r.__words[0];
sub_100009900(v22, (char *)p_dst);
v18 = sub_1003065B0("%i", a2);
v19 = (char *)cocos2d::CCString::getCString(v18);
sub_100009900(__p, v19);
MusicDownloadManager::ProcessHttpRequest(
a1,
(const std::string::value_type *)v24,
(char *)v22,
(const std::string::value_type *)__p,
21);
if ( v21 < 0 )
operator delete(__p[0]);
if ( v23 < 0 )
operator delete(v22[0]);
if ( v25 < 0 )
operator delete(v24[0]);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
}
}