//
// MusicDownloadManager::onGetSongInfoCompleted from 0x140482c30 to 0x140482db7 (391 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::handleIt @ 0x140482307
// > ??> @ 0x140928a00
//
// This function is hookable on this platform (idp: pc, 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:32:45 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall MusicDownloadManager::onGetSongInfoCompleted(__int64 a1, const void **a2, const char *a3)
{
const char *v6; // rcx
unsigned int v7; // r14d
cocos2d::CCString *v8; // rax
const char *CString; // rax
const void *v10; // rcx
unsigned __int64 v11; // rbp
size_t v12; // r15
const void *v13; // rcx
__int64 v14; // rax
__int64 v15; // rax
__int128 Buf2; // [rsp+20h] [rbp-78h] BYREF
__int64 v17; // [rsp+30h] [rbp-68h]
__int64 v18; // [rsp+38h] [rbp-60h]
const void **v19; // [rsp+48h] [rbp-50h]
const char *v20; // [rsp+50h] [rbp-48h]
v19 = a2;
v20 = a3;
v6 = a3;
if ( *((_QWORD *)a3 + 3) > 0xFu )
v6 = *(const char **)a3;
v7 = atoi(v6);
v8 = cocos2d::CCString::createWithFormat("i_%i", v7);
CString = cocos2d::CCString::getCString(v8);
MusicDownloadManager::removeDLFromActive(a1, CString);
Buf2 = 0;
v17 = 2;
v18 = 15;
strcpy((char *)&Buf2, "-1");
v10 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v10 = *a2;
v11 = (unsigned __int64)a2[2];
v12 = v11;
if ( v11 > 2 )
v12 = 2;
if ( !memcmp(v10, &Buf2, v12) && v11 == 2 )
{
LABEL_15:
MusicDownloadManager::loadSongInfoFailed(a1, v7, 1);
goto LABEL_17;
}
Buf2 = 0;
v17 = 2;
v18 = 15;
strcpy((char *)&Buf2, "-2");
v13 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v13 = *a2;
if ( memcmp(v13, &Buf2, v12) || v11 != 2 )
{
v14 = sub_14003F4F0((__int64)&Buf2, (__int64)a2);
v15 = MusicDownloadManager::addSongObjectFromString(a1, v14);
if ( v15 )
{
MusicDownloadManager::loadSongInfoFinished(a1, v15);
goto LABEL_17;
}
goto LABEL_15;
}
MusicDownloadManager::loadSongInfoFailed(a1, v7, 2);
LABEL_17:
sub_14003D310((__int64)a2);
sub_14003D310((__int64)a3);
}