//
// tinyxml2::XMLNode::FirstChildElement from 0x18009ce60 to 0x18009cf0f (175 bytes)
//
// 7 xrefs:
// > tinyxml2::XMLNode::FirstChildElement @ 0x1800a2480
// > tinyxml2::XMLDocument::RootElement @ 0x1800a24a2
// > sub_1800A2AE0 @ 0x1800a2bf6
// > sub_1800A2AE0 @ 0x1800a2c08
// > tinyxml2::XMLHandle::FirstChildElement @ 0x1800d5364
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c102c
//
// 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::FirstChildElement(
tinyxml2::XMLNode *this,
const char *a2)
{
_QWORD *v2; // rdi
__int64 v4; // rax
__int64 v5; // rbp
const char *v6; // rbx
const char *Str; // rax
int v8; // edx
char v9; // cl
bool v10; // zf
v2 = *((_QWORD **)this + 6);
if ( !v2 )
return nullptr;
while ( 1 )
{
v4 = (*(__int64 (__fastcall **)(_QWORD *))(*v2 + 8LL))(v2);
v5 = v4;
if ( !v4 )
goto LABEL_14;
if ( !a2 )
return (const struct tinyxml2::XMLElement *)v5;
v6 = a2;
Str = tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v4 + 24));
v8 = 0;
if ( Str == a2 )
return (const struct tinyxml2::XMLElement *)v5;
v9 = *Str;
if ( *Str )
break;
LABEL_13:
if ( !*v6 )
return (const struct tinyxml2::XMLElement *)v5;
LABEL_14:
v2 = (_QWORD *)v2[9];
if ( !v2 )
return nullptr;
}
do
{
if ( !*v6 || v9 != *v6 )
break;
v10 = v8 == 0x7FFFFFFF;
if ( v8 == 0x7FFFFFFF )
goto LABEL_11;
v9 = *++Str;
++v6;
++v8;
}
while ( v9 );
v10 = v8 == 0x7FFFFFFF;
LABEL_11:
if ( !v10 )
{
if ( *Str )
goto LABEL_14;
goto LABEL_13;
}
return (const struct tinyxml2::XMLElement *)v5;
}