//
// tinyxml2::StrPair::ParseName from 0x5ed5b4 to 0x5ed614 (96 bytes)
//
// 2 xrefs:
// > tinyxml2::XMLAttribute::ParseDeep @ 0x5ee01a
// > tinyxml2::XMLElement::ParseDeep @ 0x5eeda0
//
// 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
//
int __fastcall tinyxml2::StrPair::ParseName(tinyxml2::StrPair *this, char *a2)
{
int result; // r0
char *i; // r4
int v6; // r6
if ( !a2 )
return 0;
result = (unsigned __int8)*a2;
if ( *a2 )
{
for ( i = a2; ; ++i )
{
v6 = (unsigned __int8)*i;
if ( !*i )
break;
if ( (v6 & 0x80) == 0 )
{
result = isalnum((unsigned __int8)*i);
if ( !result && v6 != 95 && v6 != 58 )
{
if ( v6 == 45 )
{
if ( i <= a2 )
return result;
}
else
{
if ( v6 != 46 )
break;
if ( i <= a2 )
return result;
}
}
}
}
if ( i <= a2 )
{
return 0;
}
else
{
tinyxml2::StrPair::Reset(this);
*((_DWORD *)this + 1) = a2;
*((_DWORD *)this + 2) = i;
*(_DWORD *)this = 256;
return (int)i;
}
}
return result;
}