{"type": "func", "start": 6442575136, "end": 6442575283, "name": "sub_18001E520", "pseudocode": "// \n// sub_18001E520 from 0x18001e520 to 0x18001e5b3 (147 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1800e7068\n// > <???> @ 0x1801aec20\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_18001E520(__int64 a1, fpos_t *a2, _QWORD *a3)\n{\n  bool v5; // zf\n  fpos_t v7; // rax\n  fpos_t Position; // [rsp+30h] [rbp+8h] BYREF\n\n  v5 = *(_QWORD *)(a1 + 128) == 0;\n  Position = *a3 + a3[1];\n  if ( v5 || !sub_180018A50(a1) || fsetpos(*(FILE **)(a1 + 128), &Position) )\n  {\n    *a2 = -1;\n    v7 = 0;\n  }\n  else\n  {\n    *(_QWORD *)(a1 + 116) = a3[2];\n    sub_180018B60(a1);\n    v7 = *(_QWORD *)(a1 + 116);\n    *a2 = Position;\n  }\n  a2[1] = 0;\n  a2[2] = v7;\n  return a2;\n}", "assembly": "; \n; sub_18001E520 from 0x18001e520 to 0x18001e5b3 (147 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1800e7068\n; > <???> @ 0x1801aec20\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, 0x18001e520\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x18001e525\npush    rdi                                                            ; +0xa, 0x18001e52a\nsub     rsp, 20h                                                       ; +0xb, 0x18001e52b\nmov     rax, [r8+8]                                                    ; +0xf, 0x18001e52f\nmov     rsi, r8                                                        ; +0x13, 0x18001e533\nadd     rax, [r8]                                                      ; +0x16, 0x18001e536\nmov     rbx, rdx                                                       ; +0x19, 0x18001e539\ncmp     qword ptr [rcx+80h], 0                                         ; +0x1c, 0x18001e53c\nmov     rdi, rcx                                                       ; +0x24, 0x18001e544\nmov     [rsp+28h+Position], rax                                        ; +0x27, 0x18001e547\njz      short loc_18001E58B                                            ; +0x2c, 0x18001e54c\ncall    sub_180018A50                                                  ; +0x2e, 0x18001e54e\ntest    al, al                                                         ; +0x33, 0x18001e553\njz      short loc_18001E58B                                            ; +0x35, 0x18001e555\nmov     rcx, [rdi+80h]; Stream                                         ; +0x37, 0x18001e557\nlea     rdx, [rsp+28h+Position]; Position                              ; +0x3e, 0x18001e55e\ncall    cs:fsetpos                                                     ; +0x43, 0x18001e563\ntest    eax, eax                                                       ; +0x49, 0x18001e569\njnz     short loc_18001E58B                                            ; +0x4b, 0x18001e56b\nmov     rax, [rsi+10h]                                                 ; +0x4d, 0x18001e56d\nmov     rcx, rdi                                                       ; +0x51, 0x18001e571\nmov     [rdi+74h], rax                                                 ; +0x54, 0x18001e574\ncall    sub_180018B60                                                  ; +0x58, 0x18001e578\nmov     rcx, [rsp+28h+Position]                                        ; +0x5d, 0x18001e57d\nmov     rax, [rdi+74h]                                                 ; +0x62, 0x18001e582\nmov     [rbx], rcx                                                     ; +0x66, 0x18001e586\njmp     short loc_18001E594                                            ; +0x69, 0x18001e589\nmov     qword ptr [rbx], 0FFFFFFFFFFFFFFFFh                            ; +0x6b, 0x18001e58b\nxor     eax, eax                                                       ; +0x72, 0x18001e592\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x74, 0x18001e594\nmov     qword ptr [rbx+8], 0                                           ; +0x79, 0x18001e599\nmov     [rbx+10h], rax                                                 ; +0x81, 0x18001e5a1\nmov     rax, rbx                                                       ; +0x85, 0x18001e5a5\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x88, 0x18001e5a8\nadd     rsp, 20h                                                       ; +0x8d, 0x18001e5ad\npop     rdi                                                            ; +0x91, 0x18001e5b1\nretn                                                                   ; +0x92, 0x18001e5b2", "xrefs": ["<???> @ 0x1800e7068", "<???> @ 0x1801aec20"], "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"}