//
// sub_1006684F0 from 0x1006684f0 to 0x10066855f (111 bytes)
//
// 0 xrefs:
//
// 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
//
unsigned __int64 __fastcall sub_1006684F0(unsigned int *a1, unsigned int *a2)
{
unsigned __int64 v3; // r15
unsigned __int64 result; // rax
__int64 v5; // rdx
unsigned int v6; // esi
__int64 v7; // rsi
if ( *a2 )
{
v3 = 0;
do
{
v5 = *a1;
*(_QWORD *)(*((_QWORD *)a1 + 2) + 8 * v5) = *(_QWORD *)(*((_QWORD *)a2 + 2) + 8 * v3);
*a1 = v5 + 1;
v6 = a1[1];
if ( (int)v5 + 1 >= v6 )
{
v7 = 2 * v6;
a1[1] = v7;
*((_QWORD *)a1 + 2) = realloc(*((void **)a1 + 2), 8 * v7);
}
++v3;
result = *a2;
}
while ( v3 < result );
}
return result;
}