//
// GameLevelManager::onDeleteServerEditorSoundCompleted from 0x4d1154 to 0x4d1226 (210 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x4db12a
//
// 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:50:47 +0000
//
int __fastcall GameLevelManager::onDeleteServerEditorSoundCompleted(int a1, int a2, unsigned __int8 *a3)
{
int v6; // r4
unsigned int v7; // r4
char *v8; // r0
int v9; // r5
const char *v10; // r0
int v11; // r0
unsigned int v12; // r9
_BOOL4 v13; // r7
int result; // r0
int v15; // r2
int v16[2]; // [sp+8h] [bp-14h] BYREF
char *v17; // [sp+10h] [bp-Ch]
std::__tree::__erase_unique((int **)(a1 + 524), a3);
v6 = *a3;
if ( (v6 & 1) != 0 )
v7 = *((_DWORD *)a3 + 1);
else
v7 = v6 >> 1;
if ( v7 > 7 )
{
std::string::basic_string(v16, a3, 7u, 0xFFFFFFFF);
if ( (v16[0] & 1) != 0 )
v8 = v17;
else
v8 = (char *)v16 + 1;
v9 = atoi(v8);
std::string::~string((int)v16);
}
else
{
v9 = 0;
}
if ( (*(_BYTE *)a2 & 1) != 0 )
v10 = *(const char **)(a2 + 8);
else
v10 = (const char *)(a2 + 1);
v11 = atoi(v10);
v16[0] = 0;
v16[1] = 0;
v17 = nullptr;
v12 = v11;
std::string::__init(v16, "-1", 2u);
v13 = sub_4A9CC4((unsigned __int8 *)a2, (unsigned __int8 *)v16);
if ( !v13 )
v13 = v12 >> 31;
std::string::~string((int)v16);
result = *(_DWORD *)(a1 + 880);
if ( v13 )
{
if ( v12 == -21 )
v15 = -21;
else
v15 = 0;
if ( result )
return (*(int (__fastcall **)(int, int, int))(*(_DWORD *)result + 4))(result, v9, v15);
}
else if ( result )
{
return (**(int (__fastcall ***)(int, int))result)(result, v9);
}
return result;
}