//
// cocos2d::CCUserDefault::createXMLFile from 0x1800a24b0 to 0x1800a257b (203 bytes)
//
// 4 xrefs:
// > sub_1800A2AE0 @ 0x1800a2b7b
// > cocos2d::CCUserDefault::sharedUserDefault @ 0x1800a34e2
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c186c
//
// 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:14 +0000
//
// Hidden C++ exception states: #wind=1
bool __fastcall cocos2d::CCUserDefault::createXMLFile()
{
__int64 v0; // rax
tinyxml2::XMLDocument *v1; // rdi
struct tinyxml2::XMLDeclaration *v2; // rax
struct tinyxml2::XMLElement *v3; // rax
const char *v4; // rdx
bool v5; // bl
v0 = sub_1800E4AC0(0x280u);
if ( v0 )
v1 = (tinyxml2::XMLDocument *)tinyxml2::XMLDocument::XMLDocument(v0, 1, 0);
else
v1 = nullptr;
if ( !v1 )
return 0;
v2 = tinyxml2::XMLDocument::NewDeclaration(v1, nullptr);
if ( !v2 )
return 0;
tinyxml2::XMLNode::InsertEndChild(v1, v2);
v3 = tinyxml2::XMLDocument::NewElement(v1, "userDefaultRoot");
if ( !v3 )
return 0;
tinyxml2::XMLNode::InsertEndChild(v1, v3);
v4 = (const char *)&cocos2d::CCUserDefault::m_sFilePath;
if ( *((_QWORD *)&xmmword_1801B2AA0 + 1) > 0xFu )
v4 = cocos2d::CCUserDefault::m_sFilePath;
v5 = (unsigned int)tinyxml2::XMLDocument::SaveFile((__int64)v1, v4, 0) == 0;
(*(void (__fastcall **)(tinyxml2::XMLDocument *, __int64))(*(_QWORD *)v1 + 128LL))(v1, 1);
return v5;
}