//
// cocos2d::CCUserDefault::createXMLFile from 0x18009e800 to 0x18009e8c8 (200 bytes)
//
// 4 xrefs:
// > sub_18009EE00 @ 0x18009ee9b
// > cocos2d::CCUserDefault::sharedUserDefault @ 0x18009f7c0
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b75cc
//
// 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
//
// Hidden C++ exception states: #wind=1
bool __fastcall cocos2d::CCUserDefault::createXMLFile()
{
void *v0; // rax
tinyxml2::XMLDocument *v1; // rdi
struct tinyxml2::XMLDeclaration *v2; // rax
struct tinyxml2::XMLElement *v3; // rax
const char *v4; // rdx
bool v5; // bl
v0 = operator new(0x280u);
if ( v0 )
v1 = (tinyxml2::XMLDocument *)tinyxml2::XMLDocument::XMLDocument((__int64)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_1801A8A40 + 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;
}