{"type": "func", "start": 6443694720, "end": 6443694818, "name": "fclose", "pseudocode": "// \n// fclose from 0x18012fa80 to 0x18012fae2 (98 bytes)\n// \n// 3 xrefs:\n// > sub_180043D20 @ 0x180043e3d\n// > _fcloseall @ 0x180138711\n// > <???> @ 0x180202dd4\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\nint __cdecl fclose(FILE *Stream)\n{\n  int v3; // edi\n\n  if ( !Stream )\n  {\n    *errno() = 22;\n    invalid_parameter_noinfo();\n    return -1;\n  }\n  if ( (HIDWORD(Stream->_base) & 0x1000) != 0 )\n  {\n    __acrt_stdio_free_stream(Stream);\n    return -1;\n  }\n  sub_18012F9E4((__int64)Stream);\n  v3 = fclose_nolock(Stream);\n  sub_18012F9F0((__int64)Stream);\n  return v3;\n}", "assembly": "; \n; fclose from 0x18012fa80 to 0x18012fae2 (98 bytes)\n; \n; 3 xrefs:\n; > sub_180043D20 @ 0x180043e3d\n; > _fcloseall @ 0x180138711\n; > <???> @ 0x180202dd4\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_8], rbx                                               ; +0x0, 0x18012fa80\nmov     [rsp+arg_0], rcx                                               ; +0x5, 0x18012fa85\npush    rdi                                                            ; +0xa, 0x18012fa8a\nsub     rsp, 20h                                                       ; +0xb, 0x18012fa8b\nmov     rbx, rcx                                                       ; +0xf, 0x18012fa8f\ntest    rcx, rcx                                                       ; +0x12, 0x18012fa92\njnz     short loc_18012FAB5                                            ; +0x15, 0x18012fa95\ncall    _errno                                                         ; +0x17, 0x18012fa97\nmov     dword ptr [rax], 16h                                           ; +0x1c, 0x18012fa9c\ncall    _invalid_parameter_noinfo                                      ; +0x22, 0x18012faa2\nor      eax, 0FFFFFFFFh                                                ; +0x27, 0x18012faa7\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x2a, 0x18012faaa\nadd     rsp, 20h                                                       ; +0x2f, 0x18012faaf\npop     rdi                                                            ; +0x33, 0x18012fab3\nretn                                                                   ; +0x34, 0x18012fab4\nmov     eax, [rcx+14h]                                                 ; +0x35, 0x18012fab5\nshr     eax, 0Ch                                                       ; +0x38, 0x18012fab8\ntest    al, 1                                                          ; +0x3b, 0x18012fabb\njz      short loc_18012FAC6                                            ; +0x3d, 0x18012fabd\ncall    ?__acrt_stdio_free_stream@@YAXV__crt_stdio_stream@@@Z          ; +0x3f, 0x18012fabf\njmp     short loc_18012FAA7                                            ; +0x44, 0x18012fac4\ncall    sub_18012F9E4                                                  ; +0x46, 0x18012fac6\nnop                                                                    ; +0x4b, 0x18012facb\nmov     rcx, rbx; Stream                                               ; +0x4c, 0x18012facc\ncall    _fclose_nolock                                                 ; +0x4f, 0x18012facf\nmov     edi, eax                                                       ; +0x54, 0x18012fad4\nmov     rcx, rbx                                                       ; +0x56, 0x18012fad6\ncall    sub_18012F9F0                                                  ; +0x59, 0x18012fad9\nmov     eax, edi                                                       ; +0x5e, 0x18012fade\njmp     short loc_18012FAAA                                            ; +0x60, 0x18012fae0", "xrefs": ["sub_180043D20 @ 0x180043e3d", "_fcloseall @ 0x180138711", "<???> @ 0x180202dd4"], "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"}