{"type": "func", "start": 6443695584, "end": 6443695662, "name": "__acrt_errno_map_os_error", "pseudocode": "// \n// __acrt_errno_map_os_error from 0x18012fde0 to 0x18012fe2e (78 bytes)\n// \n// 14 xrefs:\n// > __acrt_mbs_to_wcs_cp<__crt_win32_buffer_internal_dynamic_resizing> @ 0x18012901e\n// > common_stat<_stat64i32> @ 0x18012919e\n// > common_stat_handle_file_opened<_stat64i32> @ 0x180129342\n// > get_drive_number_from_path @ 0x180129675\n// > _beginthreadex @ 0x180130b2b\n// > unknown_libname_66 @ 0x1801348e2\n// > __acrt_get_full_path_name_wide<__crt_win32_buffer_public_dynamic_resizing> @ 0x180134967\n// > __acrt_wcs_to_mbs_cp<__crt_win32_buffer_no_resizing> @ 0x180134ab0\n// > _close_nolock @ 0x180138cc2\n// > __acrt_GetModuleFileNameA @ 0x180139266\n// > __acrt_wcs_to_mbs_cp<__crt_win32_buffer_internal_dynamic_resizing> @ 0x18013998b\n// > _write_nolock @ 0x1801405d4\n// > common_lseek_nolock<__int64> @ 0x180142022\n// > <???> @ 0x180202dec\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n__int64 __fastcall _acrt_errno_map_os_error(int a1)\n{\n  __int64 v2; // rax\n  int *v3; // rax\n  __int64 v4; // rax\n  _DWORD *v5; // rbx\n  __int64 result; // rax\n\n  v2 = _acrt_getptd_noexit();\n  if ( v2 )\n    v3 = (int *)(v2 + 36);\n  else\n    v3 = (int *)&unk_1801B1854;\n  *v3 = a1;\n  v4 = _acrt_getptd_noexit();\n  v5 = &unk_1801B1850;\n  if ( v4 )\n    v5 = (_DWORD *)(v4 + 32);\n  result = _acrt_errno_from_os_error(a1);\n  *v5 = result;\n  return result;\n}", "assembly": "; \n; __acrt_errno_map_os_error from 0x18012fde0 to 0x18012fe2e (78 bytes)\n; \n; 14 xrefs:\n; > __acrt_mbs_to_wcs_cp<__crt_win32_buffer_internal_dynamic_resizing> @ 0x18012901e\n; > common_stat<_stat64i32> @ 0x18012919e\n; > common_stat_handle_file_opened<_stat64i32> @ 0x180129342\n; > get_drive_number_from_path @ 0x180129675\n; > _beginthreadex @ 0x180130b2b\n; > unknown_libname_66 @ 0x1801348e2\n; > __acrt_get_full_path_name_wide<__crt_win32_buffer_public_dynamic_resizing> @ 0x180134967\n; > __acrt_wcs_to_mbs_cp<__crt_win32_buffer_no_resizing> @ 0x180134ab0\n; > _close_nolock @ 0x180138cc2\n; > __acrt_GetModuleFileNameA @ 0x180139266\n; > __acrt_wcs_to_mbs_cp<__crt_win32_buffer_internal_dynamic_resizing> @ 0x18013998b\n; > _write_nolock @ 0x1801405d4\n; > common_lseek_nolock<__int64> @ 0x180142022\n; > <???> @ 0x180202dec\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x18012fde0\npush    rdi                                                            ; +0x5, 0x18012fde5\nsub     rsp, 20h                                                       ; +0x6, 0x18012fde6\nmov     edi, ecx                                                       ; +0xa, 0x18012fdea\ncall    __acrt_getptd_noexit                                           ; +0xc, 0x18012fdec\ntest    rax, rax                                                       ; +0x11, 0x18012fdf1\njnz     short loc_18012FDFF                                            ; +0x14, 0x18012fdf4\nlea     rax, unk_1801B1854                                             ; +0x16, 0x18012fdf6\njmp     short loc_18012FE03                                            ; +0x1d, 0x18012fdfd\nadd     rax, 24h ; '$'                                                 ; +0x1f, 0x18012fdff\nmov     [rax], edi                                                     ; +0x23, 0x18012fe03\ncall    __acrt_getptd_noexit                                           ; +0x25, 0x18012fe05\nlea     rbx, unk_1801B1850                                             ; +0x2a, 0x18012fe0a\ntest    rax, rax                                                       ; +0x31, 0x18012fe11\njz      short loc_18012FE1A                                            ; +0x34, 0x18012fe14\nlea     rbx, [rax+20h]                                                 ; +0x36, 0x18012fe16\nmov     ecx, edi                                                       ; +0x3a, 0x18012fe1a\ncall    __acrt_errno_from_os_error                                     ; +0x3c, 0x18012fe1c\nmov     [rbx], eax                                                     ; +0x41, 0x18012fe21\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x43, 0x18012fe23\nadd     rsp, 20h                                                       ; +0x48, 0x18012fe28\npop     rdi                                                            ; +0x4c, 0x18012fe2c\nretn                                                                   ; +0x4d, 0x18012fe2d", "xrefs": ["__acrt_mbs_to_wcs_cp<__crt_win32_buffer_internal_dynamic_resizing> @ 0x18012901e", "common_stat<_stat64i32> @ 0x18012919e", "common_stat_handle_file_opened<_stat64i32> @ 0x180129342", "get_drive_number_from_path @ 0x180129675", "_beginthreadex @ 0x180130b2b", "unknown_libname_66 @ 0x1801348e2", "__acrt_get_full_path_name_wide<__crt_win32_buffer_public_dynamic_resizing> @ 0x180134967", "__acrt_wcs_to_mbs_cp<__crt_win32_buffer_no_resizing> @ 0x180134ab0", "_close_nolock @ 0x180138cc2", "__acrt_GetModuleFileNameA @ 0x180139266", "__acrt_wcs_to_mbs_cp<__crt_win32_buffer_internal_dynamic_resizing> @ 0x18013998b", "_write_nolock @ 0x1801405d4", "common_lseek_nolock<__int64> @ 0x180142022", "<???> @ 0x180202dec"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}