//
// tinyxml2::XMLElement::FindAttribute from 0xd96ad8 to 0xd96bac (212 bytes)
//
// 2 xrefs:
// > tinyxml2::XMLElement::Attribute @ 0xd96bbc
// > ??> @ 0x87778
//
// This function is hookable on this platform (idp: arm, 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 13:08:22 +0000
//
__int64 __fastcall tinyxml2::XMLElement::FindAttribute(tinyxml2::XMLElement *this, __int64 a2, __int64 a3, int *a4)
{
const char *v4; // x19
__int64 v5; // x22
const char *Str; // x0
const char *v7; // x6
int v8; // w5
unsigned int v9; // t1
int v10; // w0
v4 = (const char *)a2;
v5 = *((_QWORD *)this + 12);
if ( !v5 )
return 0;
while ( 1 )
{
Str = (const char *)tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v5 + 8), a2, a3, a4);
if ( v4 == Str )
return v5;
a2 = *(unsigned __int8 *)Str;
if ( *Str )
{
a3 = *(unsigned __int8 *)v4;
if ( (_DWORD)a2 == (_DWORD)a3 && *v4 )
{
v7 = Str + 0x7FFFFFFF;
a3 = (__int64)v4;
while ( 1 )
{
v9 = *(unsigned __int8 *)++Str;
a4 = (int *)v9;
a2 = (unsigned int)(a3 + 1 - (_DWORD)v4);
if ( !v9 )
{
if ( (_DWORD)a2 == 0x7FFFFFFF )
return v5;
v10 = *(unsigned __int8 *)(a3 + 1);
goto LABEL_13;
}
v8 = *(unsigned __int8 *)++a3;
if ( !v8 || (_DWORD)a4 != v8 )
break;
if ( Str == v7 )
return v5;
}
if ( (_DWORD)a2 != 0x7FFFFFFF )
goto LABEL_14;
return v5;
}
}
else
{
v10 = *(unsigned __int8 *)v4;
LABEL_13:
if ( !v10 )
return v5;
}
LABEL_14:
v5 = *(_QWORD *)(v5 + 56);
if ( !v5 )
return 0;
}
}