//
// MusicDownloadManager::splitIDString from 0x572980 to 0x572a3c (188 bytes)
//
// 6 xrefs:
// > MusicDownloadManager::dataLoaded @ 0x579bd0
// > MusicDownloadManager::dataLoaded @ 0x579d48
// > MusicDownloadManager::dataLoaded @ 0x579ec0
// > MusicDownloadManager::dataLoaded @ 0x57a1ce
// > MusicBrowser::refreshLevelIDList @ 0x6bd8b2
// > MusicBrowser::setupMusicBrowser @ 0x6be854
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:52:39 +0000
//
void __fastcall MusicDownloadManager::splitIDString(unsigned __int8 *a1, int a2)
{
unsigned int i; // r4
int v5; // r5
unsigned int v6; // r2
int v7; // r9
const char *v8; // r0
int *v9; // r3
int v10; // [sp+14h] [bp+0h] BYREF
int v11[3]; // [sp+18h] [bp+4h] BYREF
for ( i = 0; ; i = v7 + 1 )
{
v5 = *a1;
v6 = (v5 & 1) != 0 ? *((_DWORD *)a1 + 1) : v5 >> 1;
if ( i >= v6 )
break;
v7 = std::string::find(a1, 44, i);
if ( v7 == -1 )
{
if ( (v5 & 1) != 0 )
v7 = *((_DWORD *)a1 + 1);
else
v7 = v5 >> 1;
}
std::string::basic_string(v11, a1, i, v7 - i);
if ( (v11[0] & 1) != 0 )
v8 = (const char *)v11[2];
else
v8 = (char *)v11 + 1;
v10 = atoi(v8);
std::string::~string((int)v11);
if ( v10 )
{
v9 = *(int **)(a2 + 4);
if ( v9 == *(int **)(a2 + 8) )
{
std::vector::__push_back_slow_path(a2, &v10);
}
else
{
if ( v9 )
*v9 = v10;
*(_DWORD *)(a2 + 4) += 4;
}
}
}
}