{"type": "func", "start": 6443731340, "end": 6443731462, "name": "__acrt_stdio_flush_nolock", "pseudocode": "// \n// __acrt_stdio_flush_nolock from 0x18013898c to 0x180138a06 (122 bytes)\n// \n// 5 xrefs:\n// > _fclose_nolock @ 0x18012fa30\n// > __acrt_stdio_end_temporary_buffering_nolock @ 0x180138619\n// > unknown_libname_69 @ 0x180138a20\n// > _lambda_b4f66040be5f354a654fb75160c27bfc_::operator @ 0x18013943f\n// > <???> @ 0x1802036c8\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_stdio_flush_nolock(FILE *Stream)\n{\n  int base_high; // ecx\n  signed int v3; // edi\n  char *v4; // rsi\n  int v5; // eax\n\n  base_high = HIDWORD(Stream->_base);\n  if ( (base_high & 3) == 2 && (base_high & 0xC0) != 0 )\n  {\n    v3 = LODWORD(Stream->_ptr) - Stream->_cnt;\n    LODWORD(Stream->_base) = 0;\n    v4 = *(char **)&Stream->_cnt;\n    Stream->_ptr = v4;\n    if ( v3 > 0 )\n    {\n      v5 = fileno(Stream);\n      if ( v3 != write(v5, v4, v3) )\n      {\n        _InterlockedOr((volatile signed __int32 *)&Stream->_base + 1, 0x10u);\n        return 0xFFFFFFFFLL;\n      }\n      if ( (HIDWORD(Stream->_base) & 4) != 0 )\n        _InterlockedAnd((volatile signed __int32 *)&Stream->_base + 1, 0xFFFFFFFD);\n    }\n  }\n  return 0;\n}", "assembly": "; \n; __acrt_stdio_flush_nolock from 0x18013898c to 0x180138a06 (122 bytes)\n; \n; 5 xrefs:\n; > _fclose_nolock @ 0x18012fa30\n; > __acrt_stdio_end_temporary_buffering_nolock @ 0x180138619\n; > unknown_libname_69 @ 0x180138a20\n; > _lambda_b4f66040be5f354a654fb75160c27bfc_::operator @ 0x18013943f\n; > <???> @ 0x1802036c8\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, 0x18013898c\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x180138991\npush    rdi                                                            ; +0xa, 0x180138996\nsub     rsp, 20h                                                       ; +0xb, 0x180138997\nmov     rbx, rcx                                                       ; +0xf, 0x18013899b\nmov     ecx, [rcx+14h]                                                 ; +0x12, 0x18013899e\nmov     eax, ecx                                                       ; +0x15, 0x1801389a1\nand     al, 3                                                          ; +0x17, 0x1801389a3\ncmp     al, 2                                                          ; +0x19, 0x1801389a5\njnz     short loc_1801389F4                                            ; +0x1b, 0x1801389a7\ntest    cl, 0C0h                                                       ; +0x1d, 0x1801389a9\njz      short loc_1801389F4                                            ; +0x20, 0x1801389ac\nmov     edi, [rbx]                                                     ; +0x22, 0x1801389ae\nsub     edi, [rbx+8]                                                   ; +0x24, 0x1801389b0\nand     dword ptr [rbx+10h], 0                                         ; +0x27, 0x1801389b3\nmov     rsi, [rbx+8]                                                   ; +0x2b, 0x1801389b7\nmov     [rbx], rsi                                                     ; +0x2f, 0x1801389bb\ntest    edi, edi                                                       ; +0x32, 0x1801389be\njle     short loc_1801389F4                                            ; +0x34, 0x1801389c0\nmov     rcx, rbx; Stream                                               ; +0x36, 0x1801389c2\ncall    _fileno                                                        ; +0x39, 0x1801389c5\nmov     ecx, eax; FileHandle                                           ; +0x3e, 0x1801389ca\nmov     r8d, edi; MaxCharCount                                         ; +0x40, 0x1801389cc\nmov     rdx, rsi; Buf                                                  ; +0x43, 0x1801389cf\ncall    _write                                                         ; +0x46, 0x1801389d2\ncmp     edi, eax                                                       ; +0x4b, 0x1801389d7\njz      short loc_1801389E5                                            ; +0x4d, 0x1801389d9\nlock or dword ptr [rbx+14h], 10h                                       ; +0x4f, 0x1801389db\nor      eax, 0FFFFFFFFh                                                ; +0x54, 0x1801389e0\njmp     short loc_1801389F6                                            ; +0x57, 0x1801389e3\nmov     eax, [rbx+14h]                                                 ; +0x59, 0x1801389e5\nshr     eax, 2                                                         ; +0x5c, 0x1801389e8\ntest    al, 1                                                          ; +0x5f, 0x1801389eb\njz      short loc_1801389F4                                            ; +0x61, 0x1801389ed\nlock and dword ptr [rbx+14h], 0FFFFFFFDh                               ; +0x63, 0x1801389ef\nxor     eax, eax                                                       ; +0x68, 0x1801389f4\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x6a, 0x1801389f6\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x6f, 0x1801389fb\nadd     rsp, 20h                                                       ; +0x74, 0x180138a00\npop     rdi                                                            ; +0x78, 0x180138a04\nretn                                                                   ; +0x79, 0x180138a05", "xrefs": ["_fclose_nolock @ 0x18012fa30", "__acrt_stdio_end_temporary_buffering_nolock @ 0x180138619", "unknown_libname_69 @ 0x180138a20", "_lambda_b4f66040be5f354a654fb75160c27bfc_::operator @ 0x18013943f", "<???> @ 0x1802036c8"], "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"}