//
// sub_180016750 from 0x180016750 to 0x18001686a (282 bytes)
//
// 5 xrefs:
// > DS_Dictionary::copyFile @ 0x18001928e
// > DS_Dictionary::saveRootSubDictToCompressedFile @ 0x18001d85c
// > DS_Dictionary::saveRootSubDictToFile @ 0x18001df6d
// > ??> @ 0x1801b8608
// > ??> @ 0x1801b8614
//
// 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:21:24 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall sub_180016750(__int64 a1, __int64 a2, int a3, unsigned int a4, int a5)
{
if ( a5 )
{
*(_QWORD *)a1 = &unk_1800ED110;
std::ios::ios(a1 + 168);
}
std::ostream::ostream(a1, a1 + 8, 0, 0);
*(_QWORD *)(*(int *)(*(_QWORD *)a1 + 4LL) + a1) = &std::ofstream::`vftable';
*(_DWORD *)(*(int *)(*(_QWORD *)a1 + 4LL) + a1 - 4) = *(_DWORD *)(*(_QWORD *)a1 + 4LL) - 168;
std::streambuf::streambuf(a1 + 8);
*(_QWORD *)(a1 + 8) = &std::filebuf::`vftable';
*(_BYTE *)(a1 + 132) = 0;
*(_BYTE *)(a1 + 121) = 0;
std::streambuf::_Init(a1 + 8);
*(_QWORD *)(a1 + 136) = 0;
*(_QWORD *)(a1 + 124) = qword_1801B2388;
*(_QWORD *)(a1 + 112) = 0;
if ( !sub_18001C0E0(a1 + 8, a2, a3 | 2u, a4) )
std::ios::setstate(a1 + *(int *)(*(_QWORD *)a1 + 4LL), 2, 0);
return a1;
}