{"type": "func", "start": 6443769976, "end": 6443770083, "name": "__acrt_stdio_allocate_buffer_nolock", "pseudocode": "// \n// __acrt_stdio_allocate_buffer_nolock from 0x180142078 to 0x1801420e3 (107 bytes)\n// \n// 3 xrefs:\n// > unknown_libname_72 @ 0x18013f784\n// > unknown_libname_73 @ 0x18013f83e\n// > <???> @ 0x180203d04\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_allocate_buffer_nolock(__int64 a1)\n{\n  int v2; // edi\n  __int64 result; // rax\n\n  ++dword_1801F4BD8;\n  v2 = 4096;\n  *(_QWORD *)(a1 + 8) = calloc_base(0x1000u, 1u);\n  free_base(nullptr);\n  if ( *(_QWORD *)(a1 + 8) )\n  {\n    _InterlockedOr((volatile signed __int32 *)(a1 + 20), 0x40u);\n  }\n  else\n  {\n    _InterlockedOr((volatile signed __int32 *)(a1 + 20), 0x400u);\n    v2 = 2;\n    *(_QWORD *)(a1 + 8) = a1 + 28;\n  }\n  *(_DWORD *)(a1 + 32) = v2;\n  result = *(_QWORD *)(a1 + 8);\n  *(_DWORD *)(a1 + 16) = 0;\n  *(_QWORD *)a1 = result;\n  return result;\n}", "assembly": "; \n; __acrt_stdio_allocate_buffer_nolock from 0x180142078 to 0x1801420e3 (107 bytes)\n; \n; 3 xrefs:\n; > unknown_libname_72 @ 0x18013f784\n; > unknown_libname_73 @ 0x18013f83e\n; > <???> @ 0x180203d04\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, 0x180142078\npush    rdi                                                            ; +0x5, 0x18014207d\nsub     rsp, 20h                                                       ; +0x6, 0x18014207e\nmov     rbx, rcx                                                       ; +0xa, 0x180142082\nmov     edx, 1; Size                                                   ; +0xd, 0x180142085\nadd     cs:dword_1801F4BD8, edx                                        ; +0x12, 0x18014208a\nmov     edi, 1000h                                                     ; +0x18, 0x180142090\nmov     ecx, edi; Count                                                ; +0x1d, 0x180142095\ncall    _calloc_base                                                   ; +0x1f, 0x180142097\nxor     ecx, ecx; Block                                                ; +0x24, 0x18014209c\nmov     [rbx+8], rax                                                   ; +0x26, 0x18014209e\ncall    _free_base                                                     ; +0x2a, 0x1801420a2\ncmp     qword ptr [rbx+8], 0                                           ; +0x2f, 0x1801420a7\njz      short loc_1801420B5                                            ; +0x34, 0x1801420ac\nlock or dword ptr [rbx+14h], 40h                                       ; +0x36, 0x1801420ae\njmp     short loc_1801420CA                                            ; +0x3b, 0x1801420b3\nlock or dword ptr [rbx+14h], 400h                                      ; +0x3d, 0x1801420b5\nlea     rax, [rbx+1Ch]                                                 ; +0x45, 0x1801420bd\nmov     edi, 2                                                         ; +0x49, 0x1801420c1\nmov     [rbx+8], rax                                                   ; +0x4e, 0x1801420c6\nmov     [rbx+20h], edi                                                 ; +0x52, 0x1801420ca\nmov     rax, [rbx+8]                                                   ; +0x55, 0x1801420cd\nand     dword ptr [rbx+10h], 0                                         ; +0x59, 0x1801420d1\nmov     [rbx], rax                                                     ; +0x5d, 0x1801420d5\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x60, 0x1801420d8\nadd     rsp, 20h                                                       ; +0x65, 0x1801420dd\npop     rdi                                                            ; +0x69, 0x1801420e1\nretn                                                                   ; +0x6a, 0x1801420e2", "xrefs": ["unknown_libname_72 @ 0x18013f784", "unknown_libname_73 @ 0x18013f83e", "<???> @ 0x180203d04"], "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"}