//
// sub_6023C0 from 0x6023c0 to 0x6023f4 (52 bytes)
//
// 2 xrefs:
// > sub_60A278 @ 0x60a3a8
// > sub_60AD00 @ 0x60af0e
//
// 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_6023C0(int **a1, int a2)
{
int *result; // r0
size_t v5; // r5
int *v6; // r0
int *v7; // r4
result = *(int **)a2;
if ( *(_DWORD *)a2 )
{
v5 = *(_DWORD *)(a2 + 4) - (_DWORD)result;
v6 = sub_6000EC(*a1, v5 + 1);
v7 = v6;
if ( !v6 )
sub_600BDC((int)a1, (int)"Out of memory");
memcpy(v6, *(const void **)a2, v5);
*((_BYTE *)v7 + v5) = 0;
return v7;
}
return result;
}