//
// tinyxml2::XMLElement::ParseAttributes from 0x18009dfd0 to 0x18009e1c5 (501 bytes)
//
// 3 xrefs:
// > tinyxml2::XMLElement::ParseDeep @ 0x18009e525
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1188
//
// 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
//
char *__fastcall tinyxml2::XMLElement::ParseAttributes(tinyxml2::XMLElement *this, char *a2)
{
char *v2; // rbx
void **(__fastcall ***v5)(void **, char); // rbp
char i; // al
void **(__fastcall ***v7)(void **, char); // rdi
__int64 v8; // rcx
const char *v9; // rax
const struct tinyxml2::XMLAttribute *Attribute; // rax
__int64 v12; // rax
void **(__fastcall **v13)(void **, char); // r14
void **(__fastcall *v14)(void **, char); // r8
__int64 v15; // rax
const char *Str; // rax
__int64 v17; // rcx
v2 = a2;
v5 = nullptr;
if ( !a2 )
return v2;
while ( 1 )
{
for ( i = *v2; i >= 0; i = *++v2 )
{
if ( !isspace((unsigned __int8)i) )
break;
}
if ( !*v2 )
{
Str = tinyxml2::StrPair::GetStr((tinyxml2::XMLElement *)((char *)this + 24));
v17 = *((_QWORD *)this + 1);
*(_QWORD *)(v17 + 112) = Str;
*(_DWORD *)(v17 + 92) = 7;
*(_QWORD *)(v17 + 104) = a2;
return nullptr;
}
if ( (unsigned __int8)*v2 < 0x80u && !isalpha((unsigned __int8)*v2) )
break;
v7 = (void **(__fastcall ***)(void **, char))(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*((_QWORD *)this + 1)
+ 256LL)
+ 16LL))(*((_QWORD *)this + 1) + 256LL);
*v7 = (void **(__fastcall **)(void **, char))&tinyxml2::XMLAttribute::`vftable';
*((_DWORD *)v7 + 2) = 0;
v7[2] = nullptr;
v7[3] = nullptr;
*((_DWORD *)v7 + 8) = 0;
v7[5] = nullptr;
v7[6] = nullptr;
v7[7] = nullptr;
v8 = *((_QWORD *)this + 1) + 256LL;
v7[8] = (void **(__fastcall **)(void **, char))v8;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 32LL))(v8);
v2 = tinyxml2::XMLAttribute::ParseDeep((tinyxml2::XMLAttribute *)v7, v2, *(_BYTE *)(*((_QWORD *)this + 1) + 89LL));
if ( !v2
|| (v9 = tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v7 + 1)),
(Attribute = tinyxml2::XMLElement::FindAttribute(this, v9)) != nullptr)
&& tinyxml2::StrPair::GetStr((const struct tinyxml2::XMLAttribute *)((char *)Attribute + 32)) )
{
if ( v7 )
{
v13 = v7[8];
v14 = **v7;
if ( v14 == sub_18009B6E0 )
sub_18009B6E0((void **)v7, 0);
else
v14((void **)v7, 0);
(*((void (__fastcall **)(void **(__fastcall **)(void **, char), void **(__fastcall ***)(void **, char)))*v13 + 3))(
v13,
v7);
}
v15 = *((_QWORD *)this + 1);
*(_DWORD *)(v15 + 92) = 8;
*(_QWORD *)(v15 + 104) = a2;
*(_QWORD *)(v15 + 112) = v2;
return nullptr;
}
if ( v5 )
v5[7] = (void **(__fastcall **)(void **, char))v7;
else
*((_QWORD *)this + 12) = v7;
v5 = v7;
}
if ( *v2 == 47 )
{
if ( v2[1] == 62 )
{
*((_DWORD *)this + 22) = 1;
return v2 + 2;
}
}
else if ( *v2 == 62 )
{
return ++v2;
}
v12 = *((_QWORD *)this + 1);
*(_DWORD *)(v12 + 92) = 7;
*(_QWORD *)(v12 + 104) = a2;
*(_QWORD *)(v12 + 112) = v2;
return nullptr;
}