//
// tinyxml2::XMLDocument::Identify from 0x180099680 to 0x180099880 (512 bytes)
//
// 5 xrefs:
// > tinyxml2::XMLNode::ParseDeep @ 0x18009a8fb
// > ??> @ 0x18013eae4
// > ??> @ 0x18013eaf4
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6e4c
//
// 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
//
char *__fastcall tinyxml2::XMLDocument::Identify(tinyxml2::XMLDocument *this, char *a2, struct tinyxml2::XMLNode **a3)
{
char v3; // al
char *v5; // r14
char *i; // rdi
char *result; // rax
_BYTE *v9; // rcx
__int64 v10; // rdx
bool v11; // zf
char *v12; // rbx
__int64 v13; // rax
void **v14; // rcx
v3 = *a2;
v5 = a2;
for ( i = a2; v3 >= 0; v3 = *++i )
{
if ( !isspace((unsigned __int8)v3) )
break;
}
result = i;
if ( *i )
{
v9 = off_1801A3158;
v10 = 0;
if ( i == (char *)off_1801A3158 )
goto LABEL_23;
do
{
if ( !*v9 || *result != *v9 )
break;
v11 = (_DWORD)v10 == 2;
if ( (int)v10 >= 2 )
goto LABEL_11;
++result;
++v9;
v10 = (unsigned int)(v10 + 1);
}
while ( *result );
v11 = (_DWORD)v10 == 2;
LABEL_11:
if ( v11 || !*result && !*v9 )
{
LABEL_23:
v12 = (char *)this + 512;
v13 = (*(__int64 (__fastcall **)(char *, __int64))(*((_QWORD *)this + 64) + 16LL))((char *)this + 512, v10);
v14 = &tinyxml2::XMLDeclaration::`vftable';
}
else
{
if ( tinyxml2::XMLUtil::StringEqual(i, off_1801A3160, 4) )
{
v12 = (char *)this + 512;
v13 = (*(__int64 (__fastcall **)(char *))(*((_QWORD *)this + 64) + 16LL))((char *)this + 512);
v14 = &tinyxml2::XMLComment::`vftable';
v5 = i + 4;
LABEL_25:
*(_QWORD *)(v13 + 80) = v12;
*(_QWORD *)v13 = v14;
*(_QWORD *)(v13 + 72) = 0;
*(_QWORD *)(v13 + 64) = 0;
*(_QWORD *)(v13 + 56) = 0;
*(_QWORD *)(v13 + 48) = 0;
*(_QWORD *)(v13 + 40) = 0;
*(_QWORD *)(v13 + 32) = 0;
*(_DWORD *)(v13 + 24) = 0;
*(_QWORD *)(v13 + 16) = 0;
*(_QWORD *)(v13 + 8) = this;
*a3 = (struct tinyxml2::XMLNode *)v13;
return v5;
}
if ( tinyxml2::XMLUtil::StringEqual(i, off_1801A3170, 9) )
{
v12 = (char *)this + 384;
v13 = (*(__int64 (__fastcall **)(char *))(*((_QWORD *)this + 48) + 16LL))((char *)this + 384);
v14 = &tinyxml2::XMLText::`vftable';
v5 = i + 9;
*(_BYTE *)(v13 + 88) = 1;
goto LABEL_25;
}
if ( !tinyxml2::XMLUtil::StringEqual(i, off_1801A3168, 2) )
{
if ( tinyxml2::XMLUtil::StringEqual(i, off_1801A3178, 1) )
{
v12 = (char *)this + 128;
v13 = (*(__int64 (__fastcall **)(char *))(*((_QWORD *)this + 16) + 16LL))((char *)this + 128);
v14 = &tinyxml2::XMLElement::`vftable';
v5 = i + 1;
*(_DWORD *)(v13 + 88) = 0;
*(_QWORD *)(v13 + 96) = 0;
}
else
{
v12 = (char *)this + 384;
v13 = (*(__int64 (__fastcall **)(char *))(*((_QWORD *)this + 48) + 16LL))((char *)this + 384);
v14 = &tinyxml2::XMLText::`vftable';
*(_BYTE *)(v13 + 88) = 0;
}
goto LABEL_25;
}
v12 = (char *)this + 512;
v13 = (*(__int64 (__fastcall **)(char *))(*((_QWORD *)this + 64) + 16LL))((char *)this + 512);
v14 = &tinyxml2::XMLUnknown::`vftable';
}
v5 = i + 2;
goto LABEL_25;
}
return result;
}