//
// tinyxml2::XMLNode::PreviousSiblingElement from 0x18009eba0 to 0x18009ec48 (168 bytes)
//
// 4 xrefs:
// > tinyxml2::XMLHandle::PreviousSiblingElement @ 0x1800d5554
// > tinyxml2::XMLNode::PreviousSiblingElement @ 0x1800d5580
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1290
//
// 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
//
const struct tinyxml2::XMLElement *__fastcall tinyxml2::XMLNode::PreviousSiblingElement(
tinyxml2::XMLNode *this,
const char *a2)
{
_QWORD *v2; // rbx
__int64 v4; // rdx
const char *Str; // rax
const char *v6; // rcx
bool v7; // zf
v2 = *((_QWORD **)this + 8);
if ( !v2 )
return nullptr;
while ( 1 )
{
if ( !(*(__int64 (__fastcall **)(_QWORD *))(*v2 + 8LL))(v2) )
goto LABEL_14;
if ( !a2 )
return (*(const struct tinyxml2::XMLElement *(__fastcall **)(_QWORD *, __int64))(*v2 + 8LL))(v2, v4);
Str = tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v2 + 3));
v4 = 0;
v6 = a2;
if ( a2 == Str )
return (*(const struct tinyxml2::XMLElement *(__fastcall **)(_QWORD *, __int64))(*v2 + 8LL))(v2, v4);
if ( *a2 )
break;
LABEL_13:
if ( !*Str )
return (*(const struct tinyxml2::XMLElement *(__fastcall **)(_QWORD *, __int64))(*v2 + 8LL))(v2, v4);
LABEL_14:
v2 = (_QWORD *)v2[8];
if ( !v2 )
return nullptr;
}
do
{
if ( !*Str || *v6 != *Str )
break;
v7 = (_DWORD)v4 == 0x7FFFFFFF;
if ( (_DWORD)v4 == 0x7FFFFFFF )
goto LABEL_11;
++v6;
++Str;
v4 = (unsigned int)(v4 + 1);
}
while ( *v6 );
v7 = (_DWORD)v4 == 0x7FFFFFFF;
LABEL_11:
if ( !v7 )
{
if ( *v6 )
goto LABEL_14;
goto LABEL_13;
}
return (*(const struct tinyxml2::XMLElement *(__fastcall **)(_QWORD *, __int64))(*v2 + 8LL))(v2, v4);
}