//
// tinyxml2::XMLElement::Attribute from 0xb26004 to 0xb260cc (200 bytes)
//
// 2 xrefs:
// > tinyxml2::XMLElement::ParseAttributes @ 0xb27c54
// > ??> @ 0xbfa00
//
// 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
//
__int64 __fastcall tinyxml2::XMLElement::Attribute(tinyxml2::XMLElement *this, const char *a2, const char *a3, int *a4)
{
__int64 Attribute; // x0
const char *v6; // x1
__int64 v7; // x2
int *v8; // x3
tinyxml2::StrPair *v9; // x20
const char *Str; // x0
unsigned int v11; // t1
int v12; // w5
Attribute = tinyxml2::XMLElement::FindAttribute(this, (__int64)a2, (__int64)a3, a4);
if ( Attribute )
{
v9 = (tinyxml2::StrPair *)(Attribute + 32);
if ( !a3 )
return tinyxml2::StrPair::GetStr(v9, (__int64)v6, v7, v8);
Str = (const char *)tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(Attribute + 32), (__int64)v6, v7, v8);
if ( a3 == Str )
return tinyxml2::StrPair::GetStr(v9, (__int64)v6, v7, v8);
if ( *Str )
{
if ( *(unsigned __int8 *)Str == *(unsigned __int8 *)a3 && *a3 )
{
v6 = a3;
v7 = (__int64)(Str + 0x7FFFFFFF);
while ( 1 )
{
v11 = *(unsigned __int8 *)++Str;
v8 = (int *)v11;
v12 = (_DWORD)++v6 - (_DWORD)a3;
if ( !v11 )
{
if ( v12 == 0x7FFFFFFF )
return tinyxml2::StrPair::GetStr(v9, (__int64)v6, v7, v8);
goto LABEL_13;
}
if ( !*v6 || (_DWORD)v8 != *(unsigned __int8 *)v6 )
break;
if ( Str == (const char *)v7 )
return tinyxml2::StrPair::GetStr(v9, (__int64)v6, v7, v8);
}
if ( v12 == 0x7FFFFFFF )
return tinyxml2::StrPair::GetStr(v9, (__int64)v6, v7, v8);
}
return 0;
}
v6 = a3;
LABEL_13:
if ( !*v6 )
return tinyxml2::StrPair::GetStr(v9, (__int64)v6, v7, v8);
}
return 0;
}