//
// tinyxml2::XMLPrinter::Print from 0x5eefb4 to 0x5ef038 (132 bytes)
//
// 23 xrefs:
// > tinyxml2::XMLPrinter::PrintSpace @ 0x5ef050
// > tinyxml2::XMLPrinter::PrintString @ 0x5ef0a8
// > tinyxml2::XMLPrinter::PrintString @ 0x5ef0e4
// > tinyxml2::XMLPrinter::PrintString @ 0x5ef104
// > tinyxml2::XMLPrinter::PushAttribute @ 0x5ef12a
// > tinyxml2::XMLPrinter::PushAttribute @ 0x5ef142
// > tinyxml2::XMLPrinter::CloseElement @ 0x5ef268
// > tinyxml2::XMLPrinter::CloseElement @ 0x5ef27c
// > tinyxml2::XMLPrinter::CloseElement @ 0x5ef290
// > tinyxml2::XMLPrinter::CloseElement @ 0x5ef2ae
// > tinyxml2::XMLPrinter::SealElement @ 0x5ef2dc
// > tinyxml2::XMLPrinter::OpenElement @ 0x5ef362
// > tinyxml2::XMLPrinter::OpenElement @ 0x5ef376
// > tinyxml2::XMLPrinter::PushText @ 0x5ef3ee
// > tinyxml2::XMLPrinter::PushText @ 0x5ef3fa
// > tinyxml2::XMLPrinter::PushText @ 0x5ef408
// > tinyxml2::XMLPrinter::PushComment @ 0x5ef592
// > tinyxml2::XMLPrinter::PushComment @ 0x5ef5ae
// > tinyxml2::XMLPrinter::PushDeclaration @ 0x5ef5f6
// > tinyxml2::XMLPrinter::PushDeclaration @ 0x5ef612
// > tinyxml2::XMLPrinter::PushHeader @ 0x5ef632
// > tinyxml2::XMLPrinter::PushUnknown @ 0x5ef6aa
// > tinyxml2::XMLPrinter::PushUnknown @ 0x5ef6c6
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int tinyxml2::XMLPrinter::Print(tinyxml2::XMLPrinter *this, const char *a2, ...)
{
FILE *v4; // r0
int v6; // r0
int v7; // r1
int v8; // r8
int v9; // r3
int v10; // r0
va_list varg_r2; // [sp+28h] [bp+1Ch] BYREF
va_start(varg_r2, a2);
v4 = *((FILE **)this + 2);
if ( v4 )
return vfprintf(v4, a2, varg_r2);
v6 = vsnprintf(nullptr, 0, a2, varg_r2);
v7 = *((_DWORD *)this + 58) + v6;
v8 = v6;
if ( v7 > *((_DWORD *)this + 57) )
sub_5ED000((int)this + 204, v7);
v9 = *((_DWORD *)this + 58);
v10 = *((_DWORD *)this + 51);
*((_DWORD *)this + 58) = v9 + v8;
return vsnprintf((char *)(v10 + v9 - 1), v8 + 1, a2, varg_r2);
}