//
// tinyxml2::XMLElement::Attribute from 0x18009c690 to 0x18009c727 (151 bytes)
//
// 4 xrefs:
// > ??> @ 0x180147cf0
// > ??> @ 0x180147d04
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c0f18
//
// 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 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;
}