//
// tinyxml2::XMLElement::Attribute from 0x180098a10 to 0x180098aa7 (151 bytes)
//
// 4 xrefs:
// > ??> @ 0x18013ea00
// > ??> @ 0x18013ea14
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6cc0
//
// 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
//
const char *__fastcall tinyxml2::XMLElement::Attribute(tinyxml2::XMLElement *this, const char *a2, const char *a3)
{
const char *result; // rax
tinyxml2::StrPair *v5; // rdi
const char *Str; // rax
int v7; // ecx
char v8; // dl
bool v9; // zf
result = (const char *)tinyxml2::XMLElement::FindAttribute(this, a2);
if ( result )
{
v5 = (tinyxml2::StrPair *)(result + 32);
if ( !a3 )
return tinyxml2::StrPair::GetStr(v5);
Str = tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(result + 32));
v7 = 0;
if ( Str == a3 )
return tinyxml2::StrPair::GetStr(v5);
v8 = *Str;
if ( *Str )
{
do
{
if ( !*a3 || v8 != *a3 )
break;
v9 = v7 == 0x7FFFFFFF;
if ( v7 == 0x7FFFFFFF )
goto LABEL_10;
v8 = *++Str;
++a3;
++v7;
}
while ( v8 );
v9 = v7 == 0x7FFFFFFF;
LABEL_10:
if ( v9 )
return tinyxml2::StrPair::GetStr(v5);
}
if ( !*Str && !*a3 )
return tinyxml2::StrPair::GetStr(v5);
else
return nullptr;
}
return result;
}