//
// tinyxml2::DynArray::Push from 0x18009f0b0 to 0x18009f12b (123 bytes)
//
// 5 xrefs:
// > tinyxml2::XMLPrinter::XMLPrinter @ 0x18009ae43
// > ??> @ 0x180148170
// > ??> @ 0x180148180
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1320
//
// 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
//
const void *__fastcall tinyxml2::DynArray::Push(__int64 a1, char a2)
{
int v3; // eax
int v5; // edi
void *v6; // rsi
const void *result; // rax
v3 = *(_DWORD *)(a1 + 32) + 1;
if ( v3 > *(_DWORD *)(a1 + 28) )
{
v5 = 2 * v3;
v6 = (void *)sub_1800E4C6C(2 * v3);
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;
}
result = *(const void **)a1;
*(_BYTE *)((int)(*(_DWORD *)(a1 + 32))++ + *(_QWORD *)a1) = a2;
return result;
}