//
// MusicDownloadManager::encodeCustomSFXMappingEntries from 0x56f09c to 0x56f138 (156 bytes)
//
// 2 xrefs:
// > LevelSettingsObject::getSaveString @ 0x47223e
// > EditorSFXManager::serializeAll @ 0x77ef1c
//
// 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:36 +0000
//
int *__fastcall MusicDownloadManager::encodeCustomSFXMappingEntries(int *a1, _DWORD **a2)
{
_DWORD *i; // r5
int v5; // r3
int v6; // r3
int v7; // r2
const void *v8; // r1
size_t v9; // r2
char v11[32]; // [sp+Ch] [bp-28h] BYREF
*a1 = 0;
a1[1] = 0;
a1[2] = 0;
for ( i = *a2; i != a2 + 1; i = std::__tree_next *>(i) )
{
v5 = *(unsigned __int8 *)a1;
if ( (v5 & 1) != 0 )
v6 = a1[1];
else
v6 = v5 >> 1;
if ( v6 )
std::string::push_back(a1, 124);
sub_993B88(v11, 32, "%d:%d:", i[4], i[5]);
std::string::append(a1, v11);
v7 = *((unsigned __int8 *)i + 24);
if ( (v7 & 1) != 0 )
{
v8 = (const void *)i[8];
v9 = i[7];
}
else
{
v8 = (char *)i + 25;
v9 = v7 >> 1;
}
std::string::append(a1, v8, v9);
}
return a1;
}