//
// pugi::xml_document::save_file from 0x1800881e0 to 0x180088281 (161 bytes)
//
// 4 xrefs:
// > DS_Dictionary::saveRootSubDictToFile @ 0x18001def7
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bf82c
// > ??> @ 0x1801bf838
//
// 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:05 +0000
//
// Hidden C++ exception states: #wind=1
char __fastcall pugi::xml_document::save_file(__int64 *a1, const char *a2, const char *a3, unsigned int a4, int a5)
{
const char *v9; // rdx
FILE *v10; // rax
FILE *v11; // rdi
int v12; // ebx
_QWORD v14[3]; // [rsp+30h] [rbp-18h] BYREF
v9 = "wb";
if ( (a4 & 0x20) != 0 )
v9 = "w";
v10 = fopen(a2, v9);
v11 = v10;
if ( v10 )
{
v14[0] = &pugi::xml_writer_file::`vftable';
v14[1] = v10;
pugi::xml_document::save(a1, (__int64)v14, a3, a4, a5);
v12 = ferror(v11);
fclose(v11);
LOBYTE(v10) = v12 == 0;
}
return (char)v10;
}