//
// sub_1001D2630 from 0x1001d2630 to 0x1001d278c (348 bytes)
//
// 1 xrefs:
// > MusicDownloadManager::handleIt @ 0x1001d2564
//
// 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
//
__int64 __fastcall sub_1001D2630(__int64 a1, __int64 a2, char *a3)
{
__int64 v5; // x20
__int64 v6; // x0
__int64 CString; // x0
_BOOL4 v8; // w0
_BOOL4 v9; // w22
_BOOL4 v10; // w0
_BOOL4 v11; // w22
__int64 v12; // x0
__int64 v13; // x1
__int64 v14; // x2
__int64 v15; // x0
__int64 v16; // x21
void *__dst[2]; // [xsp+10h] [xbp-50h] BYREF
__int64 v19; // [xsp+20h] [xbp-40h]
void *__p[2]; // [xsp+28h] [xbp-38h] BYREF
char v21; // [xsp+3Fh] [xbp-21h]
if ( a3[23] < 0 )
a3 = *(char **)a3;
v5 = atoi(a3);
v6 = sub_1003065B0("i_%i", v5);
CString = cocos2d::CCString::getCString(v6);
sub_1001D2EE4(a1, CString);
sub_100009900(__p, "-1");
v8 = sub_1000045BC((_QWORD *)a2, __p);
v9 = v8;
if ( v21 < 0 )
{
operator delete(__p[0]);
if ( v9 )
goto LABEL_18;
}
else if ( v8 )
{
goto LABEL_18;
}
sub_100009900(__p, "-2");
v10 = sub_1000045BC((_QWORD *)a2, __p);
v11 = v10;
if ( v21 < 0 )
{
operator delete(__p[0]);
if ( v11 )
goto LABEL_9;
LABEL_11:
if ( *(char *)(a2 + 23) < 0 )
{
sub_1000097D0(__dst, *(void **)a2, *(_QWORD *)(a2 + 8));
}
else
{
*(_OWORD *)__dst = *(_OWORD *)a2;
v19 = *(_QWORD *)(a2 + 16);
}
v15 = MusicDownloadManager::addSongObjectFromString(a1, __dst);
v16 = v15;
if ( SHIBYTE(v19) < 0 )
{
operator delete(__dst[0]);
if ( v16 )
return MusicDownloadManager::loadSongInfoFinished(a1, v16);
}
else if ( v15 )
{
return MusicDownloadManager::loadSongInfoFinished(a1, v16);
}
LABEL_18:
v12 = a1;
v13 = v5;
v14 = 1;
return MusicDownloadManager::loadSongInfoFailed(v12, v13, v14);
}
if ( !v10 )
goto LABEL_11;
LABEL_9:
v12 = a1;
v13 = v5;
v14 = 2;
return MusicDownloadManager::loadSongInfoFailed(v12, v13, v14);
}