//
// sub_56DAB4 from 0x56dab4 to 0x56dbf2 (318 bytes)
//
// 46 xrefs:
// > MusicDownloadManager::sumLocalAudioSizeBytes @ 0x56dc22
// > MusicDownloadManager::sumLocalAudioSizeBytes @ 0x56dc82
// > MusicDownloadManager::onGetAudioFilesizeCompleted @ 0x56dd90
// > MusicDownloadManager::createArtistsInfo @ 0x56e716
// > MusicDownloadManager::customSFXPathDisplay @ 0x56f166
// > MusicDownloadManager::parseSFXLibrary @ 0x571d66
// > MusicDownloadManager::parseSFXLibrary @ 0x571d94
// > MusicDownloadManager::parseSFXLibrary @ 0x571e3c
// > MusicDownloadManager::parseSFXLibrary @ 0x571f7e
// > MusicDownloadManager::parseSFXLibrary @ 0x571fba
// > MusicDownloadManager::parseSFXLibrary @ 0x572136
// > MusicDownloadManager::parseSFXLibrary @ 0x57218e
// > MusicDownloadManager::parseSFXLibrary @ 0x5721a8
// > MusicDownloadManager::parseSFXLibrary @ 0x57229e
// > MusicDownloadManager::parseSFXLibrary @ 0x5722b4
// > MusicDownloadManager::parseLinkRows @ 0x573476
// > MusicDownloadManager::parseLinkRows @ 0x5734c0
// > MusicDownloadManager::parseNewsFeed @ 0x573db6
// > MusicDownloadManager::parseNewsFeed @ 0x573de0
// > MusicDownloadManager::parseNewsFeed @ 0x573eaa
// > MusicDownloadManager::parseNewsFeed @ 0x57409a
// > MusicDownloadManager::parseNewsFeed @ 0x5741d2
// > SongInfoObject::getArtistNames @ 0x5747bc
// > MusicDownloadManager::decodeCustomSFXMappingEntries @ 0x574ac2
// > MusicDownloadManager::decodeCustomSFXMappingEntries @ 0x574b18
// > SongInfoObject::addTags @ 0x5755ea
// > MusicDownloadManager::importCustomSFXSetup @ 0x576186
// > MusicDownloadManager::importCustomSFXSetup @ 0x5761cc
// > MusicDownloadManager::importCustomSFXSetup @ 0x576204
// > MusicDownloadManager::importCustomSFXSetup @ 0x576304
// > MusicDownloadManager::importCustomSFXSetup @ 0x57631e
// > MusicDownloadManager::decodeCustomSFX @ 0x5768c0
// > MusicDownloadManager::importCustomSFXMappings @ 0x576a96
// > SongInfoObject::updateArtists @ 0x577244
// > MusicDownloadManager::parseMusicLibrary @ 0x578860
// > MusicDownloadManager::parseMusicLibrary @ 0x57892c
// > MusicDownloadManager::parseMusicLibrary @ 0x578978
// > MusicDownloadManager::parseMusicLibrary @ 0x578be4
// > MusicDownloadManager::parseMusicLibrary @ 0x578c4e
// > MusicDownloadManager::parseMusicLibrary @ 0x578f8c
// > MusicDownloadManager::parseMusicLibrary @ 0x578fca
// > MusicDownloadManager::parseMusicLibrary @ 0x5792c2
// > MusicDownloadManager::parseMusicLibrary @ 0x579318
// > MusicDownloadManager::parseMusicLibrary @ 0x579334
// > MusicDownloadManager::parseMusicLibrary @ 0x57942a
// > MusicDownloadManager::parseMusicLibrary @ 0x579444
//
// 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:34 +0000
//
int __fastcall sub_56DAB4(unsigned __int8 *a1, char *a2, int *a3)
{
int v3; // r7
int v7; // r6
unsigned __int8 *v8; // r4
size_t v9; // r0
unsigned __int8 *v10; // r6
char *v11; // r0
unsigned __int8 *i; // r3
char *v13; // r2
int v14; // t1
int v15; // r4
int v16; // r7
unsigned int v17; // r9
int v18; // r3
int *v19; // r0
int v20; // r6
unsigned int v21; // r6
unsigned __int8 *v22; // r4
size_t v23; // r0
unsigned __int8 *v24; // r3
unsigned __int8 *v25; // r6
char *v26; // r0
char *v27; // r2
int v28; // t1
int v30[3]; // [sp+10h] [bp-14h] BYREF
v3 = *a1;
if ( (v3 & 1) != 0 )
v7 = *((_DWORD *)a1 + 1);
else
v7 = v3 >> 1;
if ( (v3 & 1) != 0 )
v8 = *((unsigned __int8 **)a1 + 2);
else
v8 = a1 + 1;
v9 = strlen(a2);
if ( v7 && v9 )
{
v10 = &v8[v7];
v11 = &a2[v9];
for ( i = v8; i != v10; ++i )
{
v13 = a2;
while ( v13 != v11 )
{
v14 = (unsigned __int8)*v13++;
if ( *i == v14 )
{
v15 = i - v8;
goto LABEL_17;
}
}
}
}
v15 = -1;
LABEL_17:
if ( (v3 & 1) != 0 )
v16 = *((_DWORD *)a1 + 1);
else
v16 = v3 >> 1;
v17 = 0;
while ( 1 )
{
std::string::basic_string(v30, a1, v17, v15 - v17);
if ( (v30[0] & 1) != 0 )
v18 = v30[1];
else
v18 = (int)LOBYTE(v30[0]) >> 1;
if ( v18 || v17 != v16 )
{
v19 = (int *)a3[1];
if ( v19 == (int *)a3[2] )
{
std::vector::__push_back_slow_path(a3, (int)v30);
}
else
{
if ( v19 )
std::string::basic_string(v19, (int)v30);
a3[1] += 12;
}
}
if ( v15 == -1 )
return std::string::~string((int)v30);
v20 = *a1;
v17 = v15 + 1;
if ( (v20 & 1) != 0 )
{
v21 = *((_DWORD *)a1 + 1);
v22 = *((unsigned __int8 **)a1 + 2);
}
else
{
v21 = v20 >> 1;
v22 = a1 + 1;
}
v23 = strlen(a2);
if ( v17 < v21 && v23 )
{
v24 = &v22[v17];
v25 = &v22[v21];
v26 = &a2[v23];
while ( v24 != v25 )
{
v27 = a2;
while ( v27 != v26 )
{
v28 = (unsigned __int8)*v27++;
if ( *v24 == v28 )
{
v15 = v24 - v22;
goto LABEL_44;
}
}
++v24;
}
}
v15 = -1;
LABEL_44:
std::string::~string((int)v30);
}
}