{"type": "func", "start": 6443730620, "end": 6443730797, "name": "_fcloseall", "pseudocode": "// \n// _fcloseall from 0x1801386bc to 0x18013876d (177 bytes)\n// \n// 2 xrefs:\n// > __acrt_uninitialize_stdio @ 0x18012f993\n// > <???> @ 0x18020368c\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 fcloseall()\n{\n  int i; // ebx\n  __int64 v1; // rcx\n  int v3; // [rsp+20h] [rbp-18h]\n\n  v3 = 0;\n  sub_1801346AC(8);\n  for ( i = 3; i != dword_1801F4BC8; ++i )\n  {\n    v1 = *((_QWORD *)Block + i);\n    if ( v1 )\n    {\n      if ( (*(_DWORD *)(v1 + 20) & 0x2000) != 0 && fclose(*((FILE **)Block + i)) != -1 )\n        ++v3;\n      DeleteCriticalSection((LPCRITICAL_SECTION)(*((_QWORD *)Block + i) + 48LL));\n      free_base(*((void **)Block + i));\n      *((_QWORD *)Block + i) = 0;\n    }\n  }\n  sub_180134700(8);\n  return v3;\n}", "assembly": "; \n; _fcloseall from 0x1801386bc to 0x18013876d (177 bytes)\n; \n; 2 xrefs:\n; > __acrt_uninitialize_stdio @ 0x18012f993\n; > <???> @ 0x18020368c\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, 0x1801386bc\npush    rdi                                                            ; +0x5, 0x1801386c1\nsub     rsp, 30h                                                       ; +0x6, 0x1801386c2\nand     [rsp+38h+var_18], 0                                            ; +0xa, 0x1801386c6\nmov     ecx, 8                                                         ; +0xf, 0x1801386cb\ncall    sub_1801346AC                                                  ; +0x14, 0x1801386d0\nnop                                                                    ; +0x19, 0x1801386d5\nmov     ebx, 3                                                         ; +0x1a, 0x1801386d6\nmov     [rsp+38h+var_14], ebx                                          ; +0x1f, 0x1801386db\ncmp     ebx, cs:dword_1801F4BC8                                        ; +0x23, 0x1801386df\njz      short loc_180138754                                            ; +0x29, 0x1801386e5\nmovsxd  rdi, ebx                                                       ; +0x2b, 0x1801386e7\nmov     rax, cs:Block                                                  ; +0x2e, 0x1801386ea\nmov     rcx, [rax+rdi*8]                                               ; +0x35, 0x1801386f1\ntest    rcx, rcx                                                       ; +0x39, 0x1801386f5\njnz     short loc_1801386FC                                            ; +0x3c, 0x1801386f8\njmp     short loc_180138750                                            ; +0x3e, 0x1801386fa\nmov     eax, [rcx+14h]                                                 ; +0x40, 0x1801386fc\nshr     eax, 0Dh                                                       ; +0x43, 0x1801386ff\ntest    al, 1                                                          ; +0x46, 0x180138702\njz      short loc_18013871F                                            ; +0x48, 0x180138704\nmov     rcx, cs:Block                                                  ; +0x4a, 0x180138706\nmov     rcx, [rcx+rdi*8]; Stream                                       ; +0x51, 0x18013870d\ncall    fclose                                                         ; +0x55, 0x180138711\ncmp     eax, 0FFFFFFFFh                                                ; +0x5a, 0x180138716\njz      short loc_18013871F                                            ; +0x5d, 0x180138719\ninc     [rsp+38h+var_18]                                               ; +0x5f, 0x18013871b\nmov     rax, cs:Block                                                  ; +0x63, 0x18013871f\nmov     rcx, [rax+rdi*8]                                               ; +0x6a, 0x180138726\nadd     rcx, 30h ; '0'; lpCriticalSection                              ; +0x6e, 0x18013872a\ncall    cs:DeleteCriticalSection                                       ; +0x72, 0x18013872e\nmov     rcx, cs:Block                                                  ; +0x78, 0x180138734\nmov     rcx, [rcx+rdi*8]; Block                                        ; +0x7f, 0x18013873b\ncall    _free_base                                                     ; +0x83, 0x18013873f\nmov     rax, cs:Block                                                  ; +0x88, 0x180138744\nand     qword ptr [rax+rdi*8], 0                                       ; +0x8f, 0x18013874b\ninc     ebx                                                            ; +0x94, 0x180138750\njmp     short loc_1801386DB                                            ; +0x96, 0x180138752\nmov     ecx, 8                                                         ; +0x98, 0x180138754\ncall    sub_180134700                                                  ; +0x9d, 0x180138759\nmov     eax, [rsp+38h+var_18]                                          ; +0xa2, 0x18013875e\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xa6, 0x180138762\nadd     rsp, 30h                                                       ; +0xab, 0x180138767\npop     rdi                                                            ; +0xaf, 0x18013876b\nretn                                                                   ; +0xb0, 0x18013876c", "xrefs": ["__acrt_uninitialize_stdio @ 0x18012f993", "<???> @ 0x18020368c"], "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"}