//
// sub_10010C980 from 0x10010c980 to 0x10010ca80 (256 bytes)
//
// 1 xrefs:
// > sub_10010C790 @ 0x10010c88b
//
// 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
//
void __fastcall sub_10010C980(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v4; // rbx
__int64 v6; // r12
signed __int64 v7; // r14
char *v8; // rax
char *v9; // r15
__int64 i; // rbx
void *v11; // rdi
void *__src; // [rsp+30h] [rbp-40h]
__int64 v13; // [rsp+40h] [rbp-30h]
v13 = a4;
if ( a2 != a3 )
{
v4 = a4;
v6 = a2;
do
{
*(_OWORD *)v4 = 0;
*(_QWORD *)(v4 + 16) = 0;
__src = *(void **)v6;
v7 = *(_QWORD *)(v6 + 8) - *(_QWORD *)v6;
if ( v7 )
{
if ( v7 < 0 )
sub_10010C2F0();
v8 = (char *)operator new(v7);
*(_QWORD *)v4 = v8;
*(_QWORD *)(v4 + 8) = v8;
v9 = &v8[v7];
*(_QWORD *)(v4 + 16) = &v8[v7];
memcpy(v8, __src, v7);
*(_QWORD *)(v4 + 8) = v9;
}
sub_10028CC60(v4 + 24);
v4 = v13 + 32;
v13 += 32;
v6 += 32;
}
while ( v6 != a3 );
for ( i = a2; i != a3; i += 32 )
{
v11 = *(void **)i;
if ( *(_QWORD *)i )
{
*(_QWORD *)(i + 8) = v11;
operator delete(v11);
}
}
}
}