//
// tinyxml2::XMLPrinter::Print from 0x18009ed30 to 0x18009ee81 (337 bytes)
//
// 49 xrefs:
// > tinyxml2::XMLPrinter::CloseElement @ 0x18009c779
// > tinyxml2::XMLPrinter::CloseElement @ 0x18009c793
// > tinyxml2::XMLPrinter::CloseElement @ 0x18009c7b0
// > tinyxml2::XMLPrinter::CloseElement @ 0x18009c7d7
// > tinyxml2::XMLPrinter::OpenElement @ 0x18009de36
// > tinyxml2::XMLPrinter::OpenElement @ 0x18009de79
// > tinyxml2::XMLPrinter::OpenElement @ 0x18009de96
// > tinyxml2::XMLPrinter::PrintSpace @ 0x18009ef6a
// > tinyxml2::XMLPrinter::PrintString @ 0x18009f00e
// > tinyxml2::XMLPrinter::PrintString @ 0x18009f047
// > tinyxml2::XMLPrinter::PrintString @ 0x18009f090
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009f20a
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009f231
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009f28b
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009f2aa
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009f31b
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009f33a
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009f3b0
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009f3cf
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009f44c
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009f46b
// > tinyxml2::XMLPrinter::PushComment @ 0x18009f4c1
// > tinyxml2::XMLPrinter::PushComment @ 0x18009f4e2
// > tinyxml2::XMLPrinter::PushComment @ 0x18009f50d
// > tinyxml2::XMLPrinter::PushDeclaration @ 0x18009f541
// > tinyxml2::XMLPrinter::PushDeclaration @ 0x18009f562
// > tinyxml2::XMLPrinter::PushDeclaration @ 0x18009f58d
// > tinyxml2::XMLPrinter::PushHeader @ 0x18009f5c3
// > tinyxml2::XMLPrinter::PushHeader @ 0x18009f5e1
// > tinyxml2::XMLPrinter::PushHeader @ 0x18009f602
// > tinyxml2::XMLPrinter::PushHeader @ 0x18009f627
// > tinyxml2::XMLPrinter::PushText @ 0x18009f693
// > tinyxml2::XMLPrinter::PushText @ 0x18009f723
// > tinyxml2::XMLPrinter::PushText @ 0x18009f7bc
// > tinyxml2::XMLPrinter::PushText @ 0x18009f848
// > tinyxml2::XMLPrinter::PushText @ 0x18009f8b2
// > tinyxml2::XMLPrinter::PushText @ 0x18009f8c6
// > tinyxml2::XMLPrinter::PushText @ 0x18009f8d8
// > tinyxml2::XMLPrinter::PushText @ 0x18009f8f6
// > tinyxml2::XMLPrinter::PushText @ 0x18009f974
// > tinyxml2::XMLPrinter::PushUnknown @ 0x18009f9d1
// > tinyxml2::XMLPrinter::PushUnknown @ 0x18009f9f2
// > tinyxml2::XMLPrinter::PushUnknown @ 0x18009fa1d
// > tinyxml2::XMLPrinter::SealElement @ 0x18009ffeb
// > tinyxml2::XMLPrinter::VisitEnter @ 0x1800a105f
// > tinyxml2::XMLPrinter::VisitEnter @ 0x1800a10c2
// > tinyxml2::XMLPrinter::VisitEnter @ 0x1800a10df
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c12a8
//
// 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:12 +0000
//
void tinyxml2::XMLPrinter::Print(tinyxml2::XMLPrinter *this, const char *a2, ...)
{
FILE *v2; // rsi
const char *v3; // rdi
unsigned __int64 *v5; // rax
unsigned __int64 *v6; // r14
int v7; // edi
int v8; // eax
int v9; // edi
void *v10; // rsi
char *v11; // rcx
__int64 v12; // rax
va_list va; // [rsp+90h] [rbp+18h] BYREF
va_start(va, a2);
v2 = *((FILE **)this + 2);
v3 = a2;
v5 = (unsigned __int64 *)sub_1800095E0();
v6 = v5;
if ( v2 )
{
_stdio_common_vfprintf(*v5, v2, v3, nullptr, va);
}
else
{
while ( 1 )
{
v7 = _stdio_common_vsnprintf_s(
*v6,
*((char **)this + 38),
*((int *)this + 83),
0xFFFFFFFFFFFFFFFFuLL,
v3,
nullptr,
va);
if ( v7 < 0 )
v7 = -1;
if ( v7 >= 0 )
break;
v8 = *((_DWORD *)this + 84) + 1000;
if ( v8 > *((_DWORD *)this + 83) )
{
v9 = 2 * v8;
v10 = (void *)sub_1800E4C6C(2 * v8);
memcpy(v10, *((const void **)this + 38), *((int *)this + 84));
v11 = *((char **)this + 38);
if ( v11 != (char *)this + 312 )
j_j_free_0(v11);
*((_QWORD *)this + 38) = v10;
*((_DWORD *)this + 83) = v9;
}
*((_DWORD *)this + 84) += 1000;
v3 = a2;
}
v12 = tinyxml2::DynArray::PushArr((char *)this + 264, (unsigned int)v7);
memcpy((void *)(v12 - 1), *((const void **)this + 38), v7 + 1);
}
}