//
// _isatty from 0x18013f864 to 0x18013f8c3 (95 bytes)
//
// 4 xrefs:
// > __acrt_should_use_temporary_buffer @ 0x180138521
// > _write_nolock @ 0x1801403ea
// > ??> @ 0x180203ba8
// > ??> @ 0x180203bb4
//
// 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:04 +0000
//
int __cdecl isatty(int FileHandle)
{
if ( FileHandle == -2 )
{
*errno() = 9;
}
else
{
if ( FileHandle >= 0 && FileHandle < (unsigned int)dword_1801F5560 )
return *(_BYTE *)(qword_1801F5160[(__int64)FileHandle >> 6] + 72LL * (FileHandle & 0x3F) + 56) & 0x40;
*errno() = 9;
invalid_parameter_noinfo();
}
return 0;
}