{"type": "func", "start": 6443769564, "end": 6443769803, "name": "common_lseek<__int64>", "pseudocode": "// \n// common_lseek<__int64> from 0x180141edc to 0x180141fcb (239 bytes)\n// \n// 2 xrefs:\n// > common_lseek<__int64> @ 0x180142068\n// > <???> @ 0x180203cec\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\n__int64 __fastcall common_lseek<__int64>(int a1, __int64 a2, unsigned int a3)\n{\n  __int64 v6; // rsi\n  __int64 v7; // rdi\n\n  if ( a1 == -2 )\n  {\n    *_doserrno() = 0;\n    *errno() = 9;\n    return -1;\n  }\n  if ( a1 < 0\n    || a1 >= (unsigned int)dword_1801F5560\n    || (v6 = (__int64)a1 >> 6, (*(_BYTE *)(qword_1801F5160[v6] + 72LL * (a1 & 0x3F) + 56) & 1) == 0) )\n  {\n    *_doserrno() = 0;\n    *errno() = 9;\n    invalid_parameter_noinfo();\n    return -1;\n  }\n  sub_180136164(a1);\n  v7 = -1;\n  if ( (*(_BYTE *)(qword_1801F5160[v6] + 72LL * (a1 & 0x3F) + 56) & 1) != 0 )\n  {\n    v7 = common_lseek_nolock<__int64>((unsigned int)a1, a2, a3);\n  }\n  else\n  {\n    *errno() = 9;\n    *_doserrno() = 0;\n  }\n  sub_18013618C(a1);\n  return v7;\n}", "assembly": "; \n; common_lseek<__int64> from 0x180141edc to 0x180141fcb (239 bytes)\n; \n; 2 xrefs:\n; > common_lseek<__int64> @ 0x180142068\n; > <???> @ 0x180203cec\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_8], rbx                                               ; +0x0, 0x180141edc\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x180141ee1\nmov     [rsp+arg_0], ecx                                               ; +0xa, 0x180141ee6\npush    rdi                                                            ; +0xe, 0x180141eea\npush    r12                                                            ; +0xf, 0x180141eeb\npush    r13                                                            ; +0x11, 0x180141eed\npush    r14                                                            ; +0x13, 0x180141eef\npush    r15                                                            ; +0x15, 0x180141ef1\nsub     rsp, 20h                                                       ; +0x17, 0x180141ef3\nmov     r14d, r8d                                                      ; +0x1b, 0x180141ef7\nmov     r15, rdx                                                       ; +0x1e, 0x180141efa\nmovsxd  rbx, ecx                                                       ; +0x21, 0x180141efd\ncmp     ebx, 0FFFFFFFEh                                                ; +0x24, 0x180141f00\njnz     short loc_180141F1D                                            ; +0x27, 0x180141f03\ncall    __doserrno                                                     ; +0x29, 0x180141f05\nand     dword ptr [rax], 0                                             ; +0x2e, 0x180141f0a\ncall    _errno                                                         ; +0x31, 0x180141f0d\nmov     dword ptr [rax], 9                                             ; +0x36, 0x180141f12\njmp     loc_180141FAF                                                  ; +0x3c, 0x180141f18\ntest    ecx, ecx                                                       ; +0x41, 0x180141f1d\njs      short loc_180141F97                                            ; +0x43, 0x180141f1f\ncmp     ebx, cs:dword_1801F5560                                        ; +0x45, 0x180141f21\njnb     short loc_180141F97                                            ; +0x4b, 0x180141f27\nmov     rax, rbx                                                       ; +0x4d, 0x180141f29\nmov     rsi, rbx                                                       ; +0x50, 0x180141f2c\nsar     rsi, 6                                                         ; +0x53, 0x180141f2f\nlea     r13, qword_1801F5160                                           ; +0x57, 0x180141f33\nand     eax, 3Fh                                                       ; +0x5e, 0x180141f3a\nlea     r12, [rax+rax*8]                                               ; +0x61, 0x180141f3d\nmov     rax, [r13+rsi*8+0]                                             ; +0x65, 0x180141f41\ntest    byte ptr [rax+r12*8+38h], 1                                    ; +0x6a, 0x180141f46\njz      short loc_180141F97                                            ; +0x70, 0x180141f4c\nmov     ecx, ebx                                                       ; +0x72, 0x180141f4e\ncall    sub_180136164                                                  ; +0x74, 0x180141f50\nor      rdi, 0FFFFFFFFFFFFFFFFh                                        ; +0x79, 0x180141f55\nmov     rax, [r13+rsi*8+0]                                             ; +0x7d, 0x180141f59\ntest    byte ptr [rax+r12*8+38h], 1                                    ; +0x82, 0x180141f5e\njnz     short loc_180141F7B                                            ; +0x88, 0x180141f64\ncall    _errno                                                         ; +0x8a, 0x180141f66\nmov     dword ptr [rax], 9                                             ; +0x8f, 0x180141f6b\ncall    __doserrno                                                     ; +0x95, 0x180141f71\nand     dword ptr [rax], 0                                             ; +0x9a, 0x180141f76\njmp     short loc_180141F8B                                            ; +0x9d, 0x180141f79\nmov     r8d, r14d                                                      ; +0x9f, 0x180141f7b\nmov     rdx, r15                                                       ; +0xa2, 0x180141f7e\nmov     ecx, ebx                                                       ; +0xa5, 0x180141f81\ncall    ??$common_lseek_nolock@_J@@YA_JH_JH@Z                          ; +0xa7, 0x180141f83\nmov     rdi, rax                                                       ; +0xac, 0x180141f88\nmov     ecx, ebx                                                       ; +0xaf, 0x180141f8b\ncall    sub_18013618C                                                  ; +0xb1, 0x180141f8d\nmov     rax, rdi                                                       ; +0xb6, 0x180141f92\njmp     short loc_180141FB3                                            ; +0xb9, 0x180141f95\ncall    __doserrno                                                     ; +0xbb, 0x180141f97\nand     dword ptr [rax], 0                                             ; +0xc0, 0x180141f9c\ncall    _errno                                                         ; +0xc3, 0x180141f9f\nmov     dword ptr [rax], 9                                             ; +0xc8, 0x180141fa4\ncall    _invalid_parameter_noinfo                                      ; +0xce, 0x180141faa\nor      rax, 0FFFFFFFFFFFFFFFFh                                        ; +0xd3, 0x180141faf\nmov     rbx, [rsp+48h+arg_8]                                           ; +0xd7, 0x180141fb3\nmov     rsi, [rsp+48h+arg_10]                                          ; +0xdc, 0x180141fb8\nadd     rsp, 20h                                                       ; +0xe1, 0x180141fbd\npop     r15                                                            ; +0xe5, 0x180141fc1\npop     r14                                                            ; +0xe7, 0x180141fc3\npop     r13                                                            ; +0xe9, 0x180141fc5\npop     r12                                                            ; +0xeb, 0x180141fc7\npop     rdi                                                            ; +0xed, 0x180141fc9\nretn                                                                   ; +0xee, 0x180141fca", "xrefs": ["common_lseek<__int64> @ 0x180142068", "<???> @ 0x180203cec"], "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"}