{"type": "func", "start": 6443720892, "end": 6443721060, "name": "__acrt_lowio_ensure_fh_exists", "pseudocode": "// \n// __acrt_lowio_ensure_fh_exists from 0x1801360bc to 0x180136164 (168 bytes)\n// \n// 4 xrefs:\n// > initialize_inherited_file_handles_nolock @ 0x180136681\n// > __acrt_initialize_lowio @ 0x180136838\n// > <???> @ 0x1802034c4\n// > <???> @ 0x1802034d0\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_lowio_ensure_fh_exists(unsigned int a1)\n{\n  unsigned int v3; // edi\n  __int64 v4; // rbx\n  int v5; // eax\n  char *handle_array; // rax\n\n  if ( a1 < 0x2000 )\n  {\n    v3 = 0;\n    sub_1801346AC(7);\n    v4 = 0;\n    v5 = dword_1801F5560;\n    while ( (int)a1 >= v5 )\n    {\n      if ( !qword_1801F5160[v4] )\n      {\n        handle_array = _acrt_lowio_create_handle_array();\n        qword_1801F5160[v4] = (__int64)handle_array;\n        if ( !handle_array )\n        {\n          v3 = 12;\n          break;\n        }\n        v5 = dword_1801F5560 + 64;\n        dword_1801F5560 += 64;\n      }\n      ++v4;\n    }\n    sub_180134700(7);\n    return v3;\n  }\n  else\n  {\n    *errno() = 9;\n    invalid_parameter_noinfo();\n    return 9;\n  }\n}", "assembly": "; \n; __acrt_lowio_ensure_fh_exists from 0x1801360bc to 0x180136164 (168 bytes)\n; \n; 4 xrefs:\n; > initialize_inherited_file_handles_nolock @ 0x180136681\n; > __acrt_initialize_lowio @ 0x180136838\n; > <???> @ 0x1802034c4\n; > <???> @ 0x1802034d0\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, 0x1801360bc\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1801360c1\nmov     [rsp+arg_10], rdi                                              ; +0xa, 0x1801360c6\npush    r15                                                            ; +0xf, 0x1801360cb\nsub     rsp, 30h                                                       ; +0x11, 0x1801360cd\nmov     esi, ecx                                                       ; +0x15, 0x1801360d1\ncmp     ecx, 2000h                                                     ; +0x17, 0x1801360d3\njb      short loc_180136104                                            ; +0x1d, 0x1801360d9\ncall    _errno                                                         ; +0x1f, 0x1801360db\nmov     ebx, 9                                                         ; +0x24, 0x1801360e0\nmov     [rax], ebx                                                     ; +0x29, 0x1801360e5\ncall    _invalid_parameter_noinfo                                      ; +0x2b, 0x1801360e7\nmov     eax, ebx                                                       ; +0x30, 0x1801360ec\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x32, 0x1801360ee\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x37, 0x1801360f3\nmov     rdi, [rsp+38h+arg_10]                                          ; +0x3c, 0x1801360f8\nadd     rsp, 30h                                                       ; +0x41, 0x1801360fd\npop     r15                                                            ; +0x45, 0x180136101\nretn                                                                   ; +0x47, 0x180136103\nxor     edi, edi                                                       ; +0x48, 0x180136104\nlea     ecx, [rdi+7]                                                   ; +0x4a, 0x180136106\ncall    sub_1801346AC                                                  ; +0x4d, 0x180136109\nnop                                                                    ; +0x52, 0x18013610e\nmov     ebx, edi                                                       ; +0x53, 0x18013610f\nmov     eax, cs:dword_1801F5560                                        ; +0x55, 0x180136111\nmov     [rsp+38h+var_18], rbx                                          ; +0x5b, 0x180136117\ncmp     esi, eax                                                       ; +0x60, 0x18013611c\njl      short loc_180136156                                            ; +0x62, 0x18013611e\nlea     r15, qword_1801F5160                                           ; +0x64, 0x180136120\ncmp     [r15+rbx*8], rdi                                               ; +0x6b, 0x180136127\njz      short loc_18013612F                                            ; +0x6f, 0x18013612b\njmp     short loc_180136151                                            ; +0x71, 0x18013612d\ncall    __acrt_lowio_create_handle_array                               ; +0x73, 0x18013612f\nmov     [r15+rbx*8], rax                                               ; +0x78, 0x180136134\ntest    rax, rax                                                       ; +0x7c, 0x180136138\njnz     short loc_180136142                                            ; +0x7f, 0x18013613b\nlea     edi, [rax+0Ch]                                                 ; +0x81, 0x18013613d\njmp     short loc_180136156                                            ; +0x84, 0x180136140\nmov     eax, cs:dword_1801F5560                                        ; +0x86, 0x180136142\nadd     eax, 40h ; '@'                                                 ; +0x8c, 0x180136148\nmov     cs:dword_1801F5560, eax                                        ; +0x8f, 0x18013614b\ninc     rbx                                                            ; +0x95, 0x180136151\njmp     short loc_180136117                                            ; +0x98, 0x180136154\nmov     ecx, 7                                                         ; +0x9a, 0x180136156\ncall    sub_180134700                                                  ; +0x9f, 0x18013615b\nmov     eax, edi                                                       ; +0xa4, 0x180136160\njmp     short loc_1801360EE                                            ; +0xa6, 0x180136162", "xrefs": ["initialize_inherited_file_handles_nolock @ 0x180136681", "__acrt_initialize_lowio @ 0x180136838", "<???> @ 0x1802034c4", "<???> @ 0x1802034d0"], "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"}