//
// tinyxml2::XMLElement::FindAttribute from 0xb25f30 to 0xb26004 (212 bytes)
//
// 2 xrefs:
// > tinyxml2::XMLElement::Attribute @ 0xb26014
// > ??> @ 0x637b0
//
// 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::FindAttribute(tinyxml2::XMLElement *this, __int64 a2, __int64 a3, int *a4)
{
__int64 v4; // x22
const char *v5; // x19
const char *Str; // x0
const char *v7; // x6
int v8; // w5
unsigned int v9; // t1
int v10; // w0
v4 = *((_QWORD *)this + 12);
v5 = (const char *)a2;
if ( !v4 )
return 0;
while ( 1 )
{
Str = (const char *)tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v4 + 8), a2, a3, a4);
if ( v5 == Str )
return v4;
a2 = *(unsigned __int8 *)Str;
if ( *Str )
{
a3 = *(unsigned __int8 *)v5;
if ( (_DWORD)a2 == (_DWORD)a3 && *v5 )
{
v7 = Str + 0x7FFFFFFF;
a3 = (__int64)v5;
while ( 1 )
{
v9 = *(unsigned __int8 *)++Str;
a4 = (int *)v9;
a2 = (unsigned int)(a3 + 1 - (_DWORD)v5);
if ( !v9 )
{
if ( (_DWORD)a2 == 0x7FFFFFFF )
return v4;
v10 = *(unsigned __int8 *)(a3 + 1);
goto LABEL_13;
}
v8 = *(unsigned __int8 *)++a3;
if ( !v8 || (_DWORD)a4 != v8 )
break;
if ( Str == v7 )
return v4;
}
if ( (_DWORD)a2 != 0x7FFFFFFF )
goto LABEL_14;
return v4;
}
}
else
{
v10 = *(unsigned __int8 *)v5;
LABEL_13:
if ( !v10 )
return v4;
}
LABEL_14:
v4 = *(_QWORD *)(v4 + 56);
if ( !v4 )
return 0;
}
}