//
// pugi::xml_document::save_file from 0x180088290 to 0x180088331 (161 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bf844
//
// 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
//
char __fastcall pugi::xml_document::save_file(__int64 *a1, const wchar_t *a2, const char *a3, unsigned int a4, int a5)
{
const wchar_t *v9; // rdx
FILE *v10; // rax
FILE *v11; // rdi
int v12; // ebx
_QWORD v14[3]; // [rsp+30h] [rbp-18h] BYREF
v9 = L"wb";
if ( (a4 & 0x20) != 0 )
v9 = &word_180107C10;
v10 = wfopen(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;
}