//
// tinyxml2::DynArray::PushArr from 0x18009f170 to 0x18009f1ec (124 bytes)
//
// 5 xrefs:
// > tinyxml2::XMLPrinter::Print @ 0x18009ee50
// > ??> @ 0x180148198
// > ??> @ 0x1801481a8
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1350
//
// 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 11:22:13 +0000
//
__int64 __fastcall tinyxml2::DynArray::PushArr(__int64 a1, int a2)
{
int v4; // ecx
int v5; // esi
void *v6; // rbp
__int64 v7; // rcx
v4 = a2 + *(_DWORD *)(a1 + 32);
if ( v4 > *(_DWORD *)(a1 + 28) )
{
v5 = 2 * v4;
v6 = (void *)sub_1800E4C6C(2 * v4);
memcpy(v6, *(const void **)a1, *(int *)(a1 + 32));
if ( *(_QWORD *)a1 != a1 + 8 )
j_j_free_0(*(void **)a1);
*(_QWORD *)a1 = v6;
*(_DWORD *)(a1 + 28) = v5;
}
v7 = *(int *)(a1 + 32);
*(_DWORD *)(a1 + 32) = v7 + a2;
return *(_QWORD *)a1 + v7;
}