//
// tinyxml2::XMLDocument::NewComment from 0x18009d990 to 0x18009da41 (177 bytes)
//
// 3 xrefs:
// > tinyxml2::XMLComment::ShallowClone @ 0x1800a0686
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1128
//
// 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
//
struct tinyxml2::XMLComment *__fastcall tinyxml2::XMLDocument::NewComment(tinyxml2::XMLDocument *this, const char *a2)
{
char *v2; // rdi
__int64 v5; // rsi
size_t v6; // rdi
void *v7; // rax
__int64 v8; // rax
v2 = (char *)this + 512;
v5 = (*(__int64 (__fastcall **)(char *))(*((_QWORD *)this + 64) + 16LL))((char *)this + 512);
*(_QWORD *)(v5 + 16) = 0;
*(_QWORD *)(v5 + 48) = 0;
*(_QWORD *)(v5 + 56) = 0;
*(_QWORD *)(v5 + 64) = 0;
*(_QWORD *)(v5 + 72) = 0;
*(_QWORD *)(v5 + 8) = this;
*(_QWORD *)v5 = &tinyxml2::XMLComment::`vftable';
*(_QWORD *)(v5 + 80) = v2;
*(_DWORD *)(v5 + 24) = 0;
*(_QWORD *)(v5 + 32) = 0;
*(_QWORD *)(v5 + 40) = 0;
v6 = strlen(a2);
v7 = (void *)sub_1800E4C6C(v6 + 1);
*(_QWORD *)(v5 + 32) = v7;
memcpy(v7, a2, v6 + 1);
v8 = *(_QWORD *)(v5 + 32);
*(_DWORD *)(v5 + 24) = 512;
*(_QWORD *)(v5 + 40) = v6 + v8;
return (struct tinyxml2::XMLComment *)v5;
}