//
// sub_525D8 from 0x525d8 to 0x52628 (80 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_525D8(_DWORD *a1, int a2, int a3, int a4)
{
int v5; // r5
int v6; // r0
char *v7; // r0
int v8; // r4
char *v9; // r1
int v11; // [sp+0h] [bp-10h] BYREF
int v12; // [sp+4h] [bp-Ch]
v11 = a3;
v12 = a4;
if ( !a2 )
return 31;
v5 = a2;
v11 = a1[8];
j_FMOD_OS_CriticalSection_Enter(v11);
LOBYTE(v12) = 1;
v6 = a1[6];
*(_DWORD *)(v5 + 4) = a1 + 5;
v5 += 4;
*(_DWORD *)(v5 + 4) = v6;
a1[6] = v5;
**(_DWORD **)(v5 + 4) = v5;
v7 = (char *)(a1 + 2);
if ( (_DWORD *)a1[2] == a1 + 2 )
{
v9 = (char *)a1[3];
v8 = v9 - v7;
if ( v9 != v7 )
v8 = 28;
}
else
{
v8 = 28;
}
sub_44984((int)&v11);
return v8;
}