//
// sub_100066ACC from 0x100066acc to 0x100066b20 (84 bytes)
//
// 1 xrefs:
// > sub_1000669DC @ 0x1000669fc
//
// This function is hookable on this platform (idp: arm, 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 10:57:56 +0000
//
void *__fastcall sub_100066ACC(void *result, unsigned int a2)
{
unsigned int v2; // w8
_QWORD *v3; // x19
unsigned int v4; // w9
unsigned int v5; // w8
v2 = *((_DWORD *)result + 87);
if ( *((_DWORD *)result + 88) + a2 > v2 )
{
v3 = result;
if ( v2 <= a2 )
v4 = a2;
else
v4 = *((_DWORD *)result + 87);
v5 = v4 + v2;
*((_DWORD *)result + 87) = v5;
result = realloc(*((void **)result + 45), 20LL * v5);
v3[45] = result;
}
return result;
}