//
// tinyxml2::XMLElement::ShallowClone from 0x18009ca30 to 0x18009cabb (139 bytes)
//
// 3 xrefs:
// > ??> @ 0x1801049b8
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b729c
//
// 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
//
struct tinyxml2::XMLNode *__fastcall tinyxml2::XMLElement::ShallowClone(
tinyxml2::XMLElement *this,
struct XMLDocument *a2)
{
tinyxml2::XMLDocument *v2; // rbx
const char *Str; // rax
struct tinyxml2::XMLNode *result; // rax
_QWORD *v6; // rdi
tinyxml2::XMLElement *v7; // rsi
const char *v8; // rbx
const char *v9; // rax
struct tinyxml2::XMLAttribute *Attribute; // rax
v2 = a2;
if ( !a2 )
v2 = *((tinyxml2::XMLDocument **)this + 1);
Str = tinyxml2::StrPair::GetStr((tinyxml2::XMLElement *)((char *)this + 24));
result = tinyxml2::XMLDocument::NewElement(v2, Str);
v6 = *((_QWORD **)this + 12);
v7 = result;
if ( v6 )
{
do
{
v8 = tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v6 + 4));
v9 = tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v6 + 1));
Attribute = tinyxml2::XMLElement::FindOrCreateAttribute(v7, v9);
tinyxml2::StrPair::SetStr((void **)Attribute + 4, v8, 0);
v6 = (_QWORD *)v6[7];
}
while ( v6 );
return v7;
}
return result;
}