// // _get_osfhandle from 0x180136270 to 0x1801362e5 (117 bytes) // // 8 xrefs: // > _close_nolock @ 0x180138c2b // > _close_nolock @ 0x180138c61 // > _close_nolock @ 0x180138c6e // > _close_nolock @ 0x180138c7a // > stream_is_at_end_of_file_nolock @ 0x18013f69c // > __crt_seh_guarded_call::operator @ 0x18013f90a // > common_lseek_nolock<__int64> @ 0x180141fe6 // > @ 0x1802034e8 // // 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 // intptr_t __cdecl get_osfhandle(int FileHandle) { __int64 v1; // rax __int64 v2; // rcx __int64 v3; // rax if ( FileHandle == -2 ) { *_doserrno() = 0; *errno() = 9; } else { if ( FileHandle >= 0 && FileHandle < (unsigned int)dword_1801F5560 ) { v1 = FileHandle; v2 = FileHandle & 0x3F; v3 = qword_1801F5160[v1 >> 6]; if ( (*(_BYTE *)(v3 + 72 * v2 + 56) & 1) != 0 ) return *(_QWORD *)(v3 + 72 * v2 + 40); } *_doserrno() = 0; *errno() = 9; invalid_parameter_noinfo(); } return -1; }