//
// __acrt_stdio_end_temporary_buffering_nolock from 0x180138600 to 0x180138639 (57 bytes)
//
// 3 xrefs:
// > _lambda_7e489fec146d5348dbc86d3cce37c1b5_::operator @ 0x18012c3bb
// > ??> @ 0x180203668
// > ??> @ 0x180203674
//
// 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:55:01 +0000
//
__int64 __fastcall _acrt_stdio_end_temporary_buffering_nolock(char a1, __int64 a2)
{
__int64 result; // rax
if ( a1 )
{
result = *(_DWORD *)(a2 + 20) >> 9;
if ( (*(_DWORD *)(a2 + 20) & 0x200) != 0 )
{
result = _acrt_stdio_flush_nolock((FILE *)a2);
_InterlockedAnd((volatile signed __int32 *)(a2 + 20), 0xFFFFFD7F);
*(_DWORD *)(a2 + 32) = 0;
*(_QWORD *)(a2 + 8) = 0;
*(_QWORD *)a2 = 0;
}
}
return result;
}