//
// sub_DE3DE0 from 0xde3de0 to 0xde3ef8 (280 bytes)
//
// 1 xrefs:
// > ??> @ 0x12391c8
//
// 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
//
__int64 __fastcall sub_DE3DE0(__int64 a1)
{
int v1; // w0
bool v2; // zf
__int64 result; // x0
_DWORD *v4; // x0
CRYPTO_THREAD_write_lock(*(pthread_rwlock_t **)(a1 + 40));
dword_125F714 = 1;
qword_125F2B0 = (__int64)fopen("/dev/tty", "r");
if ( qword_125F2B0 )
{
qword_125F2B8 = (__int64)fopen("/dev/tty", "w");
if ( qword_125F2B8 )
goto LABEL_3;
}
else
{
qword_125F2B0 = (__int64)&_sF;
qword_125F2B8 = (__int64)fopen("/dev/tty", "w");
if ( qword_125F2B8 )
goto LABEL_3;
}
qword_125F2B8 = (__int64)&_sF + 304;
LABEL_3:
v1 = fileno((FILE *)qword_125F2B0);
v2 = tcgetattr(v1, (struct termios *)&qword_125F6F0) == -1;
result = 1;
if ( v2 )
{
v4 = (_DWORD *)__errno();
if ( *v4 == 25 || *v4 == 22 )
{
dword_125F714 = 0;
return 1;
}
else
{
return 0;
}
}
return result;
}