//
// tinyxml2::XMLPrinter::PrintString from 0xd990dc to 0xd9924c (368 bytes)
//
// 3 xrefs:
// > tinyxml2::XMLPrinter::PushAttribute @ 0xd99280
// > tinyxml2::XMLPrinter::PushText @ 0xd99744
// > ??> @ 0xea250
//
// This function is hookable on this platform (idp: arm, 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 13:08:23 +0000
//
__int64 __fastcall tinyxml2::XMLPrinter::PrintString(tinyxml2::XMLPrinter *this, const char *a2, char a3)
{
char *v3; // x3
char *v4; // x22
__int64 result; // x0
const char *v7; // x19
int v8; // w1
const char *v9; // x25
const char *v10; // x26
unsigned int v11; // t1
int v12; // w0
int v13; // w2
v3 = (char *)this + 98;
v4 = (char *)this + 34;
result = *((unsigned __int8 *)this + 32);
v7 = a2;
if ( a3 )
v4 = v3;
if ( !(_DWORD)result )
return tinyxml2::XMLPrinter::Print(this, "%s", v7);
v8 = *(unsigned __int8 *)a2;
if ( v8 )
{
v9 = v7;
while ( 1 )
{
v10 = v9 + 1;
if ( (unsigned __int8)(v8 - 1) > 0x3Eu || !v4[(unsigned __int8)v8] )
goto LABEL_17;
if ( v7 < v9 )
{
do
{
v11 = *(unsigned __int8 *)v7++;
tinyxml2::XMLPrinter::Print(this, "%c", v11);
}
while ( v7 != v9 );
v10 = v9 + 1;
v7 = v9;
}
v12 = *(unsigned __int8 *)v9;
if ( v12 == 34 )
break;
switch ( v12 )
{
case '&':
v13 = 1;
goto LABEL_22;
case '\'':
v13 = 2;
goto LABEL_22;
case '<':
v13 = 3;
LABEL_22:
tinyxml2::XMLPrinter::Print(this, "&%s;", (&off_13FBAF0)[2 * v13]);
goto LABEL_16;
}
v13 = 4;
if ( v12 == 62 )
goto LABEL_22;
LABEL_16:
++v7;
LABEL_17:
LOBYTE(v8) = *v10;
v9 = v10;
if ( !*v10 )
{
result = *((unsigned __int8 *)this + 32);
if ( !*((_BYTE *)this + 32) || v10 - v7 > 0 )
return tinyxml2::XMLPrinter::Print(this, "%s", v7);
return result;
}
}
v13 = 0;
goto LABEL_22;
}
return result;
}