//
// sub_83BECC from 0x83becc to 0x83bfc0 (244 bytes)
//
// 1 xrefs:
// > ??> @ 0xac0ef8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_83BECC(int a1)
{
CRYPTO_THREAD_write_lock(*(pthread_rwlock_t **)(a1 + 20));
dword_AD4844 = 1;
dword_AD45F0 = (int)fopen("/dev/tty", "r");
if ( !dword_AD45F0 )
dword_AD45F0 = (int)&_sF;
dword_AD45F4 = (int)fopen("/dev/tty", "w");
if ( !dword_AD45F4 )
dword_AD45F4 = (int)&_sF + 168;
if ( ioctl(*(__int16 *)(dword_AD45F0 + 14), 0x5401u, &unk_AD4820) != -1 )
return 1;
if ( *(_DWORD *)_errno() != 25 && *(_DWORD *)_errno() != 22 )
return 0;
dword_AD4844 = 0;
return 1;
}