//
// sub_1000C6AE0 from 0x1000c6ae0 to 0x1000c6b9c (188 bytes)
//
// 1 xrefs:
// > sub_1000C63F0 @ 0x1000c649a
//
// 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
//
_QWORD *__fastcall sub_1000C6AE0(_QWORD *a1, __int64 a2, int *a3)
{
char *v4; // r13
const void *v5; // r15
signed __int64 v6; // r12
char *v7; // rax
char *v8; // r14
__int64 v10; // [rsp+0h] [rbp-30h]
v4 = (char *)operator new(0x30u);
*a1 = v4;
a1[1] = a2;
a1[2] = 0;
*(_OWORD *)v4 = 0;
v10 = *a3;
*((_DWORD *)v4 + 4) = v10;
*(_OWORD *)(v4 + 24) = 0;
*((_QWORD *)v4 + 5) = 0;
v5 = *((const void **)a3 + 1);
v6 = *((_QWORD *)a3 + 2) - (_QWORD)v5;
if ( v6 )
{
if ( v6 < 0 )
sub_1000C40D0();
v7 = (char *)operator new(v6);
*((_QWORD *)v4 + 3) = v7;
*((_QWORD *)v4 + 4) = v7;
v8 = &v7[v6];
*((_QWORD *)v4 + 5) = &v7[v6];
memcpy(v7, v5, v6);
*((_QWORD *)v4 + 4) = v8;
}
*((_BYTE *)a1 + 16) = 1;
*((_QWORD *)v4 + 1) = v10;
return a1;
}