//
// tinyxml2::XMLPrinter::PrintString from 0x7fa0b8 to 0x7fa164 (172 bytes)
//
// 2 xrefs:
// > tinyxml2::XMLPrinter::PushAttribute @ 0x7fa18c
// > tinyxml2::XMLPrinter::PushText @ 0x7fa46c
//
// 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::PrintString(int this, const char *a2, int a3)
{
const char *v3; // r3
tinyxml2::XMLPrinter *v4; // r5
int v5; // r6
const char *v6; // r4
int v7; // r2
const char *v8; // r7
int v9; // r3
int v10; // r3
v3 = a2;
v4 = (tinyxml2::XMLPrinter *)this;
if ( a3 )
v5 = this + 86;
else
v5 = this + 22;
v6 = a2;
if ( *(_BYTE *)(this + 20) )
{
while ( 1 )
{
v7 = *(unsigned __int8 *)v6;
if ( !*v6 )
goto LABEL_23;
if ( (unsigned int)(v7 - 1) <= 0x3E && *(_BYTE *)(v5 + v7) )
break;
LABEL_22:
++v6;
}
while ( 1 )
{
v8 = v3 + 1;
if ( v3 >= v6 )
break;
this = tinyxml2::XMLPrinter::Print(v4, "%c", *(unsigned __int8 *)v3);
v3 = v8;
}
v9 = *(unsigned __int8 *)v6;
switch ( v9 )
{
case '"':
v10 = 0;
break;
case '&':
v10 = 1;
break;
case '\'':
v10 = 2;
break;
case '<':
v10 = 3;
break;
case '>':
v10 = 4;
break;
default:
LABEL_21:
v3 = v8;
goto LABEL_22;
}
this = tinyxml2::XMLPrinter::Print(v4, "&%s;", (&off_C75208)[3 * v10]);
goto LABEL_21;
}
LABEL_23:
if ( !*((_BYTE *)v4 + 20) || v6 - v3 > 0 )
return tinyxml2::XMLPrinter::Print(v4, "%s", v3);
return this;
}