//
// __acrt_errno_from_os_error from 0x18012fd98 to 0x18012fddd (69 bytes)
//
// 2 xrefs:
// > __acrt_errno_map_os_error @ 0x18012fe1c
// > _free_base @ 0x180134844
//
// 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
//
__int64 __fastcall _acrt_errno_from_os_error(int a1)
{
__int64 v1; // rax
unsigned int *v2; // rdx
__int64 result; // rax
v1 = 0;
v2 = dword_180172240;
do
{
if ( a1 == *v2 )
return dword_180172240[2 * v1 + 1];
v1 = (unsigned int)(v1 + 1);
v2 += 2;
}
while ( (unsigned int)v1 < 0x2D );
if ( (unsigned int)(a1 - 19) <= 0x11 )
return 13;
result = 22;
if ( (unsigned int)(a1 - 188) <= 0xE )
return 8;
return result;
}