//
// tinyxml2::XMLPrinter::OpenElement from 0x7fa33c to 0x7fa3e2 (166 bytes)
//
// 1 xrefs:
// > tinyxml2::XMLPrinter::VisitEnter @ 0x7fa3fe
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:01:13 +0000
//
int __fastcall tinyxml2::XMLPrinter::OpenElement(tinyxml2::XMLPrinter *this, const char *a2)
{
int v4; // r0
int v5; // r6
unsigned int v6; // r0
void *v7; // r7
char *v8; // r0
int v9; // r3
int v10; // r2
int result; // r0
if ( *((_BYTE *)this + 4) )
tinyxml2::XMLPrinter::SealElement(this);
v4 = *((_DWORD *)this + 50) + 1;
if ( v4 > *((_DWORD *)this + 49) )
{
v5 = 2 * v4;
if ( (unsigned int)(2 * v4) > 0x1FC00000 )
v6 = -1;
else
v6 = 8 * v4;
v7 = (void *)operator new[](v6);
memcpy(v7, *((const void **)this + 38), 4 * *((_DWORD *)this + 50));
v8 = *((char **)this + 38);
if ( v8 != (char *)this + 156 && v8 )
operator delete[](v8);
*((_DWORD *)this + 38) = v7;
*((_DWORD *)this + 49) = v5;
}
v9 = *((_DWORD *)this + 50);
v10 = *((_DWORD *)this + 38);
*((_DWORD *)this + 50) = v9 + 1;
*(_DWORD *)(v10 + 4 * v9) = a2;
if ( *((int *)this + 4) < 0 && !*((_BYTE *)this + 5) && !*((_BYTE *)this + 21) )
{
tinyxml2::XMLPrinter::Print(this, "\n");
tinyxml2::XMLPrinter::PrintSpace((int)this, *((_DWORD *)this + 3));
}
result = tinyxml2::XMLPrinter::Print(this, "<%s", a2);
*((_BYTE *)this + 4) = 1;
*((_BYTE *)this + 5) = 0;
++*((_DWORD *)this + 3);
return result;
}