//
// sub_100747810 from 0x100747810 to 0x100747858 (72 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_100747810(__int64 a1, int a2)
{
unsigned int v3; // esi
unsigned __int64 result; // rax
__int64 v5; // rsi
v3 = *(_DWORD *)(a1 + 4);
result = (unsigned int)(a2 + *(_DWORD *)a1);
if ( v3 < (unsigned int)result )
{
result = *(_QWORD *)(a1 + 16);
do
{
v5 = 2 * v3;
*(_DWORD *)(a1 + 4) = v5;
result = (unsigned __int64)realloc((void *)result, 8 * v5);
*(_QWORD *)(a1 + 16) = result;
v3 = *(_DWORD *)(a1 + 4);
}
while ( v3 < a2 + *(_DWORD *)a1 );
}
return result;
}