//
// sub_57A9A from 0x57a9a to 0x57ace (52 bytes)
//
// 1 xrefs:
// > sub_578AC @ 0x578ec
//
// 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_57A9A(_DWORD *a1, int a2)
{
int v3; // r0
int v4; // r2
if ( a2 < 0 )
return 28;
v3 = a1[1];
if ( v3 <= a2 )
return 28;
v4 = ~a2 + v3;
if ( v4 >= 1 )
{
memmove((void *)(*a1 + 4 * a2), (const void *)(*a1 + 4 * a2 + 4), 4 * v4);
v3 = a1[1];
}
a1[1] = v3 - 1;
return 0;
}