//
// sub_18007F420 from 0x18007f420 to 0x18007f48b (107 bytes)
//
// 4 xrefs:
// > sub_18007F510 @ 0x18007f51f
// > sub_1800E2D40 @ 0x1800e2d47
// > ??> @ 0x18013c42f
// > ??> @ 0x1801b4f98
//
// 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
//
void **__fastcall sub_18007F420(_QWORD *a1)
{
unsigned __int64 v1; // rdx
_QWORD *v3; // rcx
v1 = a1[4];
if ( v1 > 0xF )
{
v3 = (_QWORD *)a1[1];
if ( v1 + 1 >= 0x1000 )
{
if ( (unsigned __int64)v3 - *(v3 - 1) - 8 > 0x1F )
invalid_parameter_noinfo_noreturn();
v3 = (_QWORD *)*(v3 - 1);
}
j_j_free_0(v3);
}
a1[3] = 0;
a1[4] = 15;
*((_BYTE *)a1 + 8) = 0;
*a1 = &pugi::xml_writer::`vftable';
return &pugi::xml_writer::`vftable';
}