//
// fclose from 0x18012fa80 to 0x18012fae2 (98 bytes)
//
// 3 xrefs:
// > sub_180043D20 @ 0x180043e3d
// > _fcloseall @ 0x180138711
// > ??> @ 0x180202dd4
//
// 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 10:54:58 +0000
//
int __cdecl fclose(FILE *Stream)
{
int v3; // edi
if ( !Stream )
{
*errno() = 22;
invalid_parameter_noinfo();
return -1;
}
if ( (HIDWORD(Stream->_base) & 0x1000) != 0 )
{
__acrt_stdio_free_stream(Stream);
return -1;
}
sub_18012F9E4((__int64)Stream);
v3 = fclose_nolock(Stream);
sub_18012F9F0((__int64)Stream);
return v3;
}