//
// tinyxml2::XMLPrinter::PrintString from 0x18009b2c0 to 0x18009b3dd (285 bytes)
//
// 17 xrefs:
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009b558
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009b5db
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009b66b
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009b700
// > tinyxml2::XMLPrinter::PushAttribute @ 0x18009b79c
// > tinyxml2::XMLPrinter::PushText @ 0x18009b9e3
// > tinyxml2::XMLPrinter::PushText @ 0x18009ba73
// > tinyxml2::XMLPrinter::PushText @ 0x18009bb0c
// > tinyxml2::XMLPrinter::PushText @ 0x18009bb98
// > tinyxml2::XMLPrinter::PushText @ 0x18009bc50
// > tinyxml2::XMLPrinter::PushText @ 0x18009bcc4
// > tinyxml2::XMLPrinter::VisitEnter @ 0x18009d440
// > ??> @ 0x18013ee6c
// > ??> @ 0x18013eea8
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b7038
// > ??> @ 0x1801b7044
//
// 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
//
void __fastcall tinyxml2::XMLPrinter::PrintString(tinyxml2::XMLPrinter *this, const char *a2, unsigned __int8 a3)
{
const char *v3; // rbx
const char *v5; // rdi
char *v6; // rbp
char i; // dl
__int64 v8; // r8
const char *v9; // rax
v3 = a2;
v5 = a2;
v6 = (char *)this + 64 * (unsigned __int64)a3;
if ( *((_BYTE *)this + 32) )
{
for ( i = *a2; i; ++v5 )
{
if ( (unsigned __int8)(i - 1) <= 0x3Eu && v6[i + 34] )
{
for ( ; v3 < v5; ++v3 )
tinyxml2::XMLPrinter::Print(this, "%c", (unsigned int)*v3);
v8 = 0;
v9 = (const char *)&unk_1801045DC;
while ( *v9 != *v5 )
{
++v8;
v9 += 16;
if ( (__int64)v9 >= (__int64)"apos" )
goto LABEL_12;
}
tinyxml2::XMLPrinter::Print(this, "&%s;", (&off_1801045D0)[2 * v8]);
LABEL_12:
++v3;
}
i = v5[1];
}
}
if ( !*((_BYTE *)this + 32) || v5 - v3 > 0 )
tinyxml2::XMLPrinter::Print(this, "%s", v3);
}