//
// sub_100747A20 from 0x100747a20 to 0x100747a8f (111 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:36:31 +0000
//
unsigned __int64 __fastcall sub_100747A20(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;
}