//
// sub_6000EC from 0x6000ec to 0x60012c (64 bytes)
//
// 3 xrefs:
// > sub_600BF8 @ 0x600c00
// > sub_601B34 @ 0x601b38
// > sub_6023C0 @ 0x6023d2
//
// 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_6000EC(int *a1, int a2)
{
int v2; // r1
int v4; // r0
unsigned int v5; // r5
unsigned int v6; // r3
int v7; // r2
int *result; // r0
unsigned int v9; // r0
v2 = a2 + 3;
v4 = a1[1];
v5 = v2 & 0xFFFFFFFC;
v6 = (v2 & 0xFFFFFFFC) + v4;
if ( v6 <= 0x1000 )
{
v7 = *a1;
a1[1] = v6;
result = (int *)(v4 + v7);
return ++result;
}
v9 = v2 & 0xFFFFFFFC;
if ( v5 < 0x1000 )
v9 = 4096;
result = (int *)((void *(__fastcall *)(size_t))off_ABAE6C)(v9 + 4);
if ( result )
{
*result = *a1;
*a1 = (int)result;
a1[1] = v5;
return ++result;
}
return result;
}