//
// pugi::xml_document::save_file from 0x815558 to 0x8155ce (118 bytes)
//
// 1 xrefs:
// > DS_Dictionary::saveRootSubDictToFile @ 0x80e408
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:41 +0000
//
FILE *__fastcall pugi::xml_document::save_file(pugi::xml_node *a1, char *filename, char *a3, int a4, int a5)
{
const char *v8; // r3
FILE *result; // r0
FILE *v10; // r4
int v11; // r6
_DWORD v12[2]; // [sp+Ch] [bp-10h] BYREF
if ( (a4 & 0x20) != 0 )
v8 = "w";
else
v8 = "wb";
result = fopen(filename, v8);
v10 = result;
if ( result )
{
pugi::xml_writer_file::xml_writer_file(v12, result);
pugi::xml_document::save(a1, (int)v12, a3, a4, a5);
v11 = ferror(v10);
fclose(v10);
return (FILE *)(v11 == 0);
}
return result;
}