//
// tinyxml2::XMLDocument::SaveFile from 0x5eef78 to 0x5eefae (54 bytes)
//
// 2 xrefs:
// > cocos2d::CCFileUtils::writeToFile @ 0x5dece2
// > sub_5EB984 @ 0x5eb9a0
//
// 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
//
int __fastcall tinyxml2::XMLDocument::SaveFile(tinyxml2::XMLDocument *this, const char *filename, char a3)
{
FILE *v6; // r5
v6 = fopen(filename, "w");
if ( v6 )
{
tinyxml2::XMLDocument::SaveFile(this, (int)v6, a3);
fclose(v6);
}
else
{
tinyxml2::XMLDocument::SetError(this, 4, (int)filename, 0);
}
return *((_DWORD *)this + 12);
}