{"type": "func", "start": 6442574496, "end": 6442574702, "name": "sub_18001E2A0", "pseudocode": "// \n// sub_18001E2A0 from 0x18001e2a0 to 0x18001e36e (206 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1800e7060\n// > <???> @ 0x1801aec08\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\nfpos_t *__fastcall sub_18001E2A0(__int64 a1, fpos_t *a2, __int64 a3, int a4)\n{\n  fpos_t v8; // rax\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_180018A50(a1)\n    || (a3 || a4 != 1) && fseeki64(*(FILE **)(a1 + 128), a3, a4)\n    || fgetpos(*(FILE **)(a1 + 128), &Position) )\n  {\n    *a2 = -1;\n    v8 = 0;\n  }\n  else\n  {\n    sub_180018B60(a1);\n    v8 = *(_QWORD *)(a1 + 116);\n    *a2 = Position;\n  }\n  a2[1] = 0;\n  a2[2] = v8;\n  return a2;\n}", "assembly": "; \n; sub_18001E2A0 from 0x18001e2a0 to 0x18001e36e (206 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1800e7060\n; > <???> @ 0x1801aec08\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_8], rbx                                               ; +0x0, 0x18001e2a0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x18001e2a5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x18001e2aa\npush    rdi                                                            ; +0xf, 0x18001e2af\nsub     rsp, 20h                                                       ; +0x10, 0x18001e2b0\nmov     ebp, r9d                                                       ; +0x14, 0x18001e2b4\nmov     rsi, r8                                                        ; +0x17, 0x18001e2b7\nmov     rbx, rdx                                                       ; +0x1a, 0x18001e2ba\nmov     rdi, rcx                                                       ; +0x1d, 0x18001e2bd\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x20, 0x18001e2c0\nlea     r10, [rdi+70h]                                                 ; +0x26, 0x18001e2c6\ncmp     rax, r10                                                       ; +0x2a, 0x18001e2ca\njnz     short loc_18001E2DE                                            ; +0x2d, 0x18001e2cd\ncmp     ebp, 1                                                         ; +0x2f, 0x18001e2cf\njnz     short loc_18001E2DE                                            ; +0x32, 0x18001e2d2\ncmp     qword ptr [rdi+68h], 0                                         ; +0x34, 0x18001e2d4\njnz     short loc_18001E2DE                                            ; +0x39, 0x18001e2d9\ndec     rsi                                                            ; +0x3b, 0x18001e2db\ncmp     qword ptr [rdi+80h], 0                                         ; +0x3e, 0x18001e2de\njz      short loc_18001E341                                            ; +0x46, 0x18001e2e6\nmov     rcx, rdi                                                       ; +0x48, 0x18001e2e8\ncall    sub_180018A50                                                  ; +0x4b, 0x18001e2eb\ntest    al, al                                                         ; +0x50, 0x18001e2f0\njz      short loc_18001E341                                            ; +0x52, 0x18001e2f2\ntest    rsi, rsi                                                       ; +0x54, 0x18001e2f4\njnz     short loc_18001E2FE                                            ; +0x57, 0x18001e2f7\ncmp     ebp, 1                                                         ; +0x59, 0x18001e2f9\njz      short loc_18001E315                                            ; +0x5c, 0x18001e2fc\nmov     rcx, [rdi+80h]; Stream                                         ; +0x5e, 0x18001e2fe\nmov     r8d, ebp; Origin                                               ; +0x65, 0x18001e305\nmov     rdx, rsi; Offset                                               ; +0x68, 0x18001e308\ncall    cs:_fseeki64                                                   ; +0x6b, 0x18001e30b\ntest    eax, eax                                                       ; +0x71, 0x18001e311\njnz     short loc_18001E341                                            ; +0x73, 0x18001e313\nmov     rcx, [rdi+80h]; Stream                                         ; +0x75, 0x18001e315\nlea     rdx, [rsp+28h+Position]; Position                              ; +0x7c, 0x18001e31c\ncall    cs:fgetpos                                                     ; +0x81, 0x18001e321\ntest    eax, eax                                                       ; +0x87, 0x18001e327\njnz     short loc_18001E341                                            ; +0x89, 0x18001e329\nmov     rcx, rdi                                                       ; +0x8b, 0x18001e32b\ncall    sub_180018B60                                                  ; +0x8e, 0x18001e32e\nmov     rcx, [rsp+28h+Position]                                        ; +0x93, 0x18001e333\nmov     rax, [rdi+74h]                                                 ; +0x98, 0x18001e338\nmov     [rbx], rcx                                                     ; +0x9c, 0x18001e33c\njmp     short loc_18001E34A                                            ; +0x9f, 0x18001e33f\nmov     qword ptr [rbx], 0FFFFFFFFFFFFFFFFh                            ; +0xa1, 0x18001e341\nxor     eax, eax                                                       ; +0xa8, 0x18001e348\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xaa, 0x18001e34a\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xaf, 0x18001e34f\nmov     qword ptr [rbx+8], 0                                           ; +0xb4, 0x18001e354\nmov     [rbx+10h], rax                                                 ; +0xbc, 0x18001e35c\nmov     rax, rbx                                                       ; +0xc0, 0x18001e360\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xc3, 0x18001e363\nadd     rsp, 20h                                                       ; +0xc8, 0x18001e368\npop     rdi                                                            ; +0xcc, 0x18001e36c\nretn                                                                   ; +0xcd, 0x18001e36d", "xrefs": ["<???> @ 0x1800e7060", "<???> @ 0x1801aec08"], "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"}