//
// MusicDownloadManager::sumLocalAudioSizeBytes from 0x56dbf8 to 0x56dd20 (296 bytes)
//
// 1 xrefs:
// > AudioAssetsPopup::init @ 0x7611aa
//
// 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 MusicDownloadManager::sumLocalAudioSizeBytes(
MusicDownloadManager *a1,
unsigned __int8 *a2,
unsigned __int8 *a3)
{
int v5; // r6
int v6; // r10
int v7; // r5
char *v8; // r0
const char *v9; // r1
cocos2d::CCDictionary *SongInfoObject; // r0
int v11; // r11
int i; // r7
char *v13; // r0
int v14; // r1
cocos2d::CCDictionary *SFXObject; // r0
int v17; // [sp+0h] [bp-2Ch] BYREF
int v18; // [sp+4h] [bp-28h]
int v19; // [sp+8h] [bp-24h]
int v20; // [sp+Ch] [bp-20h] BYREF
int v21; // [sp+10h] [bp-1Ch]
int v22; // [sp+14h] [bp-18h]
int v23[2]; // [sp+18h] [bp-14h] BYREF
char *v24; // [sp+20h] [bp-Ch]
v17 = 0;
v18 = 0;
v19 = 0;
sub_56DAB4(a2, ",", &v17);
v5 = v17;
v6 = v18;
v7 = 0;
while ( v5 != v6 )
{
std::string::basic_string(v23, v5);
if ( (v23[0] & 1) != 0 )
v8 = v24;
else
v8 = (char *)v23 + 1;
v9 = (const char *)atoi(v8);
if ( (int)v9 > 0 )
{
SongInfoObject = MusicDownloadManager::getSongInfoObject(a1, v9);
if ( SongInfoObject )
{
if ( !*((_BYTE *)SongInfoObject + 328) )
v7 += (int)(float)(*((float *)SongInfoObject + 77) * 1048600.0);
}
}
v5 += 12;
std::string::~string((int)v23);
}
v20 = 0;
v21 = 0;
v22 = 0;
sub_56DAB4(a3, ",", &v20);
v11 = v21;
for ( i = v20; i != v11; i += 12 )
{
std::string::basic_string(v23, i);
if ( (v23[0] & 1) != 0 )
v13 = v24;
else
v13 = (char *)v23 + 1;
v14 = atoi(v13);
if ( v14 > 0 )
{
SFXObject = MusicDownloadManager::getSFXObject(a1, v14);
if ( SFXObject )
v7 += *((_DWORD *)SFXObject + 15);
}
std::string::~string((int)v23);
}
std::__vector_base::~__vector_base((int)&v20);
std::__vector_base::~__vector_base((int)&v17);
return v7;
}