{"type": "func", "start": 6443730232, "end": 6443730432, "name": "__acrt_stdio_begin_temporary_buffering_nolock", "pseudocode": "// \n// __acrt_stdio_begin_temporary_buffering_nolock from 0x180138538 to 0x180138600 (200 bytes)\n// \n// 2 xrefs:\n// > _lambda_7e489fec146d5348dbc86d3cce37c1b5_::operator @ 0x18012c2f2\n// > <???> @ 0x180203668\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\nchar __fastcall _acrt_stdio_begin_temporary_buffering_nolock(__int64 a1)\n{\n  void **v2; // rdi\n  void *v3; // rax\n\n  if ( !_acrt_should_use_temporary_buffer((FILE *)a1) )\n    return 0;\n  if ( (FILE *)a1 == _acrt_iob_func(1u) )\n  {\n    v2 = &qword_1801F5578;\n  }\n  else\n  {\n    if ( (FILE *)a1 != _acrt_iob_func(2u) )\n      return 0;\n    v2 = &qword_1801F5580;\n  }\n  ++dword_1801F4BD8;\n  if ( (*(_DWORD *)(a1 + 20) & 0x4C0) != 0 )\n    return 0;\n  _InterlockedOr((volatile signed __int32 *)(a1 + 20), 0x282u);\n  v3 = *v2;\n  if ( *v2 || (*v2 = malloc_base(0x1000u), free_base(nullptr), (v3 = *v2) != nullptr) )\n  {\n    *(_QWORD *)(a1 + 8) = v3;\n    *(_QWORD *)a1 = *v2;\n    *(_DWORD *)(a1 + 16) = 4096;\n    *(_DWORD *)(a1 + 32) = 4096;\n  }\n  else\n  {\n    *(_DWORD *)(a1 + 16) = 2;\n    *(_QWORD *)(a1 + 8) = a1 + 28;\n    *(_QWORD *)a1 = a1 + 28;\n    *(_DWORD *)(a1 + 32) = 2;\n  }\n  return 1;\n}", "assembly": "; \n; __acrt_stdio_begin_temporary_buffering_nolock from 0x180138538 to 0x180138600 (200 bytes)\n; \n; 2 xrefs:\n; > _lambda_7e489fec146d5348dbc86d3cce37c1b5_::operator @ 0x18012c2f2\n; > <???> @ 0x180203668\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, 0x180138538\npush    rdi                                                            ; +0x5, 0x18013853d\nsub     rsp, 20h                                                       ; +0x6, 0x18013853e\nmov     rbx, rcx                                                       ; +0xa, 0x180138542\ncall    __acrt_should_use_temporary_buffer                             ; +0xd, 0x180138545\ntest    al, al                                                         ; +0x12, 0x18013854a\njz      loc_1801385F3                                                  ; +0x14, 0x18013854c\nmov     ecx, 1; Ix                                                     ; +0x1a, 0x180138552\ncall    __acrt_iob_func                                                ; +0x1f, 0x180138557\ncmp     rbx, rax                                                       ; +0x24, 0x18013855c\njnz     short loc_18013856A                                            ; +0x27, 0x18013855f\nlea     rdi, qword_1801F5578                                           ; +0x29, 0x180138561\njmp     short loc_180138580                                            ; +0x30, 0x180138568\nmov     ecx, 2; Ix                                                     ; +0x32, 0x18013856a\ncall    __acrt_iob_func                                                ; +0x37, 0x18013856f\ncmp     rbx, rax                                                       ; +0x3c, 0x180138574\njnz     short loc_1801385F3                                            ; +0x3f, 0x180138577\nlea     rdi, qword_1801F5580                                           ; +0x41, 0x180138579\ninc     cs:dword_1801F4BD8                                             ; +0x48, 0x180138580\nmov     eax, [rbx+14h]                                                 ; +0x4e, 0x180138586\ntest    eax, 4C0h                                                      ; +0x51, 0x180138589\njnz     short loc_1801385F3                                            ; +0x56, 0x18013858e\nlock or dword ptr [rbx+14h], 282h                                      ; +0x58, 0x180138590\nmov     rax, [rdi]                                                     ; +0x60, 0x180138598\ntest    rax, rax                                                       ; +0x63, 0x18013859b\njnz     short loc_1801385D9                                            ; +0x66, 0x18013859e\nmov     ecx, 1000h; Size                                               ; +0x68, 0x1801385a0\ncall    _malloc_base                                                   ; +0x6d, 0x1801385a5\nxor     ecx, ecx; Block                                                ; +0x72, 0x1801385aa\nmov     [rdi], rax                                                     ; +0x74, 0x1801385ac\ncall    _free_base                                                     ; +0x77, 0x1801385af\nmov     rax, [rdi]                                                     ; +0x7c, 0x1801385b4\ntest    rax, rax                                                       ; +0x7f, 0x1801385b7\njnz     short loc_1801385D9                                            ; +0x82, 0x1801385ba\nlea     rcx, [rbx+1Ch]                                                 ; +0x84, 0x1801385bc\nmov     dword ptr [rbx+10h], 2                                         ; +0x88, 0x1801385c0\nmov     [rbx+8], rcx                                                   ; +0x8f, 0x1801385c7\nmov     [rbx], rcx                                                     ; +0x93, 0x1801385cb\nmov     dword ptr [rbx+20h], 2                                         ; +0x96, 0x1801385ce\nmov     al, 1                                                          ; +0x9d, 0x1801385d5\njmp     short loc_1801385F5                                            ; +0x9f, 0x1801385d7\nmov     [rbx+8], rax                                                   ; +0xa1, 0x1801385d9\nmov     rax, [rdi]                                                     ; +0xa5, 0x1801385dd\nmov     [rbx], rax                                                     ; +0xa8, 0x1801385e0\nmov     dword ptr [rbx+10h], 1000h                                     ; +0xab, 0x1801385e3\nmov     dword ptr [rbx+20h], 1000h                                     ; +0xb2, 0x1801385ea\njmp     short loc_1801385D5                                            ; +0xb9, 0x1801385f1\nxor     al, al                                                         ; +0xbb, 0x1801385f3\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbd, 0x1801385f5\nadd     rsp, 20h                                                       ; +0xc2, 0x1801385fa\npop     rdi                                                            ; +0xc6, 0x1801385fe\nretn                                                                   ; +0xc7, 0x1801385ff", "xrefs": ["_lambda_7e489fec146d5348dbc86d3cce37c1b5_::operator @ 0x18012c2f2", "<???> @ 0x180203668"], "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"}