{"type": "func", "start": 6443769804, "end": 6443769957, "name": "common_lseek_nolock<__int64>", "pseudocode": "// \n// common_lseek_nolock<__int64> from 0x180141fcc to 0x180142065 (153 bytes)\n// \n// 3 xrefs:\n// > common_lseek<__int64> @ 0x180141f83\n// > common_lseek_nolock<__int64> @ 0x180142070\n// > <???> @ 0x180203cf8\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 10:55:05 +0000\n// \n\nLARGE_INTEGER __fastcall common_lseek_nolock<__int64>(int a1, LARGE_INTEGER a2, DWORD a3)\n{\n  __int64 v3; // rbx\n  void *osfhandle; // rax\n  LARGE_INTEGER result; // rax\n  DWORD LastError; // eax\n  LARGE_INTEGER NewFilePointer; // [rsp+48h] [rbp+20h] BYREF\n\n  v3 = a1;\n  osfhandle = (void *)get_osfhandle(a1);\n  if ( osfhandle == (void *)-1LL )\n  {\n    *errno() = 9;\n    return (LARGE_INTEGER)-1LL;\n  }\n  if ( !SetFilePointerEx(osfhandle, a2, &NewFilePointer, a3) )\n  {\n    LastError = GetLastError();\n    _acrt_errno_map_os_error(LastError);\n    return (LARGE_INTEGER)-1LL;\n  }\n  result = NewFilePointer;\n  if ( NewFilePointer.QuadPart == -1 )\n    return (LARGE_INTEGER)-1LL;\n  *(_BYTE *)(qword_1801F5160[v3 >> 6] + 72 * (v3 & 0x3F) + 56) &= ~2u;\n  return result;\n}", "assembly": "; \n; common_lseek_nolock<__int64> from 0x180141fcc to 0x180142065 (153 bytes)\n; \n; 3 xrefs:\n; > common_lseek<__int64> @ 0x180141f83\n; > common_lseek_nolock<__int64> @ 0x180142070\n; > <???> @ 0x180203cf8\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 10:55:05 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180141fcc\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x180141fd1\npush    rdi                                                            ; +0xa, 0x180141fd6\nsub     rsp, 20h                                                       ; +0xb, 0x180141fd7\nmovsxd  rbx, ecx                                                       ; +0xf, 0x180141fdb\nmov     edi, r8d                                                       ; +0x12, 0x180141fde\nmov     ecx, ebx; FileHandle                                           ; +0x15, 0x180141fe1\nmov     rsi, rdx                                                       ; +0x17, 0x180141fe3\ncall    _get_osfhandle                                                 ; +0x1a, 0x180141fe6\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x1f, 0x180141feb\njnz     short loc_180142002                                            ; +0x23, 0x180141fef\ncall    _errno                                                         ; +0x25, 0x180141ff1\nmov     dword ptr [rax], 9                                             ; +0x2a, 0x180141ff6\nor      rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x30, 0x180141ffc\njmp     short loc_180142055                                            ; +0x34, 0x180142000\nmov     r9d, edi; dwMoveMethod                                         ; +0x36, 0x180142002\nlea     r8, [rsp+28h+NewFilePointer]; lpNewFilePointer                 ; +0x39, 0x180142005\nmov     rdx, rsi; liDistanceToMove                                     ; +0x3e, 0x18014200a\nmov     rcx, rax; hFile                                                ; +0x41, 0x18014200d\ncall    cs:SetFilePointerEx                                            ; +0x44, 0x180142010\ntest    eax, eax                                                       ; +0x4a, 0x180142016\njnz     short loc_180142029                                            ; +0x4c, 0x180142018\ncall    cs:GetLastError                                                ; +0x4e, 0x18014201a\nmov     ecx, eax                                                       ; +0x54, 0x180142020\ncall    __acrt_errno_map_os_error                                      ; +0x56, 0x180142022\njmp     short loc_180141FFC                                            ; +0x5b, 0x180142027\nmov     rax, qword ptr [rsp+28h+NewFilePointer]                        ; +0x5d, 0x180142029\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x62, 0x18014202e\njz      short loc_180141FFC                                            ; +0x66, 0x180142032\nmov     rdx, rbx                                                       ; +0x68, 0x180142034\nlea     r8, qword_1801F5160                                            ; +0x6b, 0x180142037\nand     edx, 3Fh                                                       ; +0x72, 0x18014203e\nmov     rcx, rbx                                                       ; +0x75, 0x180142041\nsar     rcx, 6                                                         ; +0x78, 0x180142044\nlea     rdx, [rdx+rdx*8]                                               ; +0x7c, 0x180142048\nmov     rcx, [r8+rcx*8]                                                ; +0x80, 0x18014204c\nand     byte ptr [rcx+rdx*8+38h], 0FDh                                 ; +0x84, 0x180142050\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x89, 0x180142055\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x8e, 0x18014205a\nadd     rsp, 20h                                                       ; +0x93, 0x18014205f\npop     rdi                                                            ; +0x97, 0x180142063\nretn                                                                   ; +0x98, 0x180142064", "xrefs": ["common_lseek<__int64> @ 0x180141f83", "common_lseek_nolock<__int64> @ 0x180142070", "<???> @ 0x180203cf8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}