//
// tinyxml2::XMLDocument::Identify from 0x18009d2d0 to 0x18009d4d2 (514 bytes)
//
// 5 xrefs:
// > tinyxml2::XMLNode::ParseDeep @ 0x18009e5ab
// > ??> @ 0x180147ddc
// > ??> @ 0x180147dec
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c10a4
//
// 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::XMLDocument::Identify(tinyxml2::XMLDocument *this, char *a2, struct tinyxml2::XMLNode **a3)
{
char v3; // al
char *v5; // rsi
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_1801AD128;
v10 = 0;
if ( i == (char *)off_1801AD128 )
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_1801AD130, 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_1801AD140, 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_1801AD138, 2) )
{
if ( tinyxml2::XMLUtil::StringEqual(i, off_1801AD148, 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;
}