{"type": "func", "start": 6442574752, "end": 6442574970, "name": "sub_18001E3A0", "pseudocode": "// \n// sub_18001E3A0 from 0x18001e3a0 to 0x18001e47a (218 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1800ed0c0\n// > <???> @ 0x1801b8ce0\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 11:21:27 +0000\n// \n\nfpos_t *__fastcall sub_18001E3A0(__int64 a1, fpos_t *a2, __int64 a3, int a4)\n{\n  fpos_t v8; // rcx\n  fpos_t Position; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( std::streambuf::gptr(a1) == a1 + 112 && a4 == 1 && !*(_QWORD *)(a1 + 104) )\n    --a3;\n  if ( !*(_QWORD *)(a1 + 128)\n    || !sub_180018740(a1)\n    || (a3 || a4 != 1) && fseeki64(*(FILE **)(a1 + 128), a3, a4)\n    || fgetpos(*(FILE **)(a1 + 128), &Position) )\n  {\n    *a2 = -1;\n    a2[1] = 0;\n    a2[2] = 0;\n  }\n  else\n  {\n    sub_180018850(a1);\n    v8 = *(_QWORD *)(a1 + 116);\n    *a2 = Position;\n    a2[2] = v8;\n    a2[1] = 0;\n  }\n  return a2;\n}", "assembly": "; \n; sub_18001E3A0 from 0x18001e3a0 to 0x18001e47a (218 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1800ed0c0\n; > <???> @ 0x1801b8ce0\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 11:21:27 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18001e3a0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x18001e3a5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x18001e3aa\npush    rdi                                                            ; +0xf, 0x18001e3af\nsub     rsp, 20h                                                       ; +0x10, 0x18001e3b0\nmov     ebp, r9d                                                       ; +0x14, 0x18001e3b4\nmov     rsi, r8                                                        ; +0x17, 0x18001e3b7\nmov     rbx, rdx                                                       ; +0x1a, 0x18001e3ba\nmov     rdi, rcx                                                       ; +0x1d, 0x18001e3bd\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x20, 0x18001e3c0\nlea     r10, [rdi+70h]                                                 ; +0x26, 0x18001e3c6\ncmp     rax, r10                                                       ; +0x2a, 0x18001e3ca\njnz     short loc_18001E3DE                                            ; +0x2d, 0x18001e3cd\ncmp     ebp, 1                                                         ; +0x2f, 0x18001e3cf\njnz     short loc_18001E3DE                                            ; +0x32, 0x18001e3d2\ncmp     qword ptr [rdi+68h], 0                                         ; +0x34, 0x18001e3d4\njnz     short loc_18001E3DE                                            ; +0x39, 0x18001e3d9\ndec     rsi                                                            ; +0x3b, 0x18001e3db\ncmp     qword ptr [rdi+80h], 0                                         ; +0x3e, 0x18001e3de\njz      short loc_18001E44D                                            ; +0x46, 0x18001e3e6\nmov     rcx, rdi                                                       ; +0x48, 0x18001e3e8\ncall    sub_180018740                                                  ; +0x4b, 0x18001e3eb\ntest    al, al                                                         ; +0x50, 0x18001e3f0\njz      short loc_18001E44D                                            ; +0x52, 0x18001e3f2\ntest    rsi, rsi                                                       ; +0x54, 0x18001e3f4\njnz     short loc_18001E3FE                                            ; +0x57, 0x18001e3f7\ncmp     ebp, 1                                                         ; +0x59, 0x18001e3f9\njz      short loc_18001E415                                            ; +0x5c, 0x18001e3fc\nmov     rcx, [rdi+80h]; Stream                                         ; +0x5e, 0x18001e3fe\nmov     r8d, ebp; Origin                                               ; +0x65, 0x18001e405\nmov     rdx, rsi; Offset                                               ; +0x68, 0x18001e408\ncall    cs:_fseeki64                                                   ; +0x6b, 0x18001e40b\ntest    eax, eax                                                       ; +0x71, 0x18001e411\njnz     short loc_18001E44D                                            ; +0x73, 0x18001e413\nmov     rcx, [rdi+80h]; Stream                                         ; +0x75, 0x18001e415\nlea     rdx, [rsp+28h+Position]; Position                              ; +0x7c, 0x18001e41c\ncall    cs:fgetpos                                                     ; +0x81, 0x18001e421\ntest    eax, eax                                                       ; +0x87, 0x18001e427\njnz     short loc_18001E44D                                            ; +0x89, 0x18001e429\nmov     rcx, rdi                                                       ; +0x8b, 0x18001e42b\ncall    sub_180018850                                                  ; +0x8e, 0x18001e42e\nmov     rcx, [rdi+74h]                                                 ; +0x93, 0x18001e433\nmov     rax, [rsp+28h+Position]                                        ; +0x97, 0x18001e437\nmov     [rbx], rax                                                     ; +0x9c, 0x18001e43c\nmov     [rbx+10h], rcx                                                 ; +0x9f, 0x18001e43f\nmov     qword ptr [rbx+8], 0                                           ; +0xa3, 0x18001e443\njmp     short loc_18001E462                                            ; +0xab, 0x18001e44b\nxor     eax, eax                                                       ; +0xad, 0x18001e44d\nmov     qword ptr [rbx], 0FFFFFFFFFFFFFFFFh                            ; +0xaf, 0x18001e44f\nmov     qword ptr [rbx+8], 0                                           ; +0xb6, 0x18001e456\nmov     [rbx+10h], rax                                                 ; +0xbe, 0x18001e45e\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xc2, 0x18001e462\nmov     rax, rbx                                                       ; +0xc7, 0x18001e467\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xca, 0x18001e46a\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xcf, 0x18001e46f\nadd     rsp, 20h                                                       ; +0xd4, 0x18001e474\npop     rdi                                                            ; +0xd8, 0x18001e478\nretn                                                                   ; +0xd9, 0x18001e479", "xrefs": ["<???> @ 0x1800ed0c0", "<???> @ 0x1801b8ce0"], "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"}