//
// tinyxml2::XMLElement::FindAttribute from 0x180099020 to 0x1800990c8 (168 bytes)
//
// 14 xrefs:
// > tinyxml2::XMLElement::Attribute @ 0x180098a19
// > tinyxml2::XMLElement::ParseAttributes @ 0x18009a465
// > tinyxml2::XMLElement::BoolAttribute @ 0x1800d0e99
// > tinyxml2::XMLElement::DoubleAttribute @ 0x1800d0f0d
// > tinyxml2::XMLElement::FloatAttribute @ 0x1800d0fcc
// > tinyxml2::XMLElement::IntAttribute @ 0x1800d102c
// > tinyxml2::XMLElement::QueryBoolAttribute @ 0x1800d11c9
// > tinyxml2::XMLElement::QueryDoubleAttribute @ 0x1800d11f9
// > tinyxml2::XMLElement::QueryFloatAttribute @ 0x1800d1229
// > tinyxml2::XMLElement::QueryIntAttribute @ 0x1800d1259
// > tinyxml2::XMLElement::QueryUnsignedAttribute @ 0x1800d1289
// > tinyxml2::XMLElement::UnsignedAttribute @ 0x1800d155c
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6dbc
//
// 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
//
// Alternative name is '?FindAttribute@XMLElement@tinyxml2@@AEAAPEAVXMLAttribute@2@PEBD@Z'
const struct tinyxml2::XMLAttribute *__fastcall tinyxml2::XMLElement::FindAttribute(
tinyxml2::XMLElement *this,
const char *a2)
{
__int64 v2; // rdi
const char *v4; // rbx
const char *Str; // rax
int v6; // edx
const char *v7; // rcx
char v8; // al
bool v9; // zf
v2 = *((_QWORD *)this + 12);
if ( !v2 )
return nullptr;
while ( 1 )
{
v4 = a2;
Str = tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v2 + 8));
v6 = 0;
v7 = Str;
if ( Str == a2 )
return (const struct tinyxml2::XMLAttribute *)v2;
v8 = *Str;
if ( !v8 )
goto LABEL_11;
do
{
if ( !*v4 || v8 != *v4 )
break;
v9 = v6 == 0x7FFFFFFF;
if ( v6 == 0x7FFFFFFF )
goto LABEL_9;
v8 = *++v7;
++v4;
++v6;
}
while ( v8 );
v9 = v6 == 0x7FFFFFFF;
LABEL_9:
if ( v9 )
return (const struct tinyxml2::XMLAttribute *)v2;
if ( !*v7 )
{
LABEL_11:
if ( !*v4 )
return (const struct tinyxml2::XMLAttribute *)v2;
}
v2 = *(_QWORD *)(v2 + 56);
if ( !v2 )
return nullptr;
}
}