{"type": "func", "start": 6443759220, "end": 6443759341, "name": "stream_is_at_end_of_file_nolock", "pseudocode": "// \n// stream_is_at_end_of_file_nolock from 0x18013f674 to 0x18013f6ed (121 bytes)\n// \n// 4 xrefs:\n// > unknown_libname_72 @ 0x18013f744\n// > unknown_libname_73 @ 0x18013f7fe\n// > <???> @ 0x180203b84\n// > <???> @ 0x180203b90\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\nbool __fastcall stream_is_at_end_of_file_nolock(__int64 a1)\n{\n  void *osfhandle; // rax\n  void *v3; // rbx\n  LARGE_INTEGER FileSize; // [rsp+30h] [rbp+8h] BYREF\n  LARGE_INTEGER NewFilePointer; // [rsp+38h] [rbp+10h] BYREF\n\n  if ( (*(_DWORD *)(a1 + 20) & 8) != 0 )\n    return 1;\n  if ( (*(_DWORD *)(a1 + 20) & 0xC0) != 0 && *(_QWORD *)a1 == *(_QWORD *)(a1 + 8) )\n    return 0;\n  osfhandle = (void *)get_osfhandle(*(_DWORD *)(a1 + 24));\n  v3 = osfhandle;\n  if ( osfhandle == (void *)-1LL\n    || !SetFilePointerEx(osfhandle, 0, &NewFilePointer, 1u)\n    || !GetFileSizeEx(v3, &FileSize) )\n  {\n    return 0;\n  }\n  return NewFilePointer.QuadPart == FileSize.QuadPart;\n}", "assembly": "; \n; stream_is_at_end_of_file_nolock from 0x18013f674 to 0x18013f6ed (121 bytes)\n; \n; 4 xrefs:\n; > unknown_libname_72 @ 0x18013f744\n; > unknown_libname_73 @ 0x18013f7fe\n; > <???> @ 0x180203b84\n; > <???> @ 0x180203b90\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\npush    rbx                                                            ; +0x0, 0x18013f674\nsub     rsp, 20h                                                       ; +0x2, 0x18013f676\nmov     edx, [rcx+14h]                                                 ; +0x6, 0x18013f67a\nshr     edx, 3                                                         ; +0x9, 0x18013f67d\ntest    dl, 1                                                          ; +0xc, 0x18013f680\njz      short loc_18013F689                                            ; +0xf, 0x18013f683\nmov     al, 1                                                          ; +0x11, 0x18013f685\njmp     short loc_18013F6E7                                            ; +0x13, 0x18013f687\nmov     eax, [rcx+14h]                                                 ; +0x15, 0x18013f689\ntest    al, 0C0h                                                       ; +0x18, 0x18013f68c\njz      short loc_18013F699                                            ; +0x1a, 0x18013f68e\nmov     rax, [rcx+8]                                                   ; +0x1c, 0x18013f690\ncmp     [rcx], rax                                                     ; +0x20, 0x18013f694\njz      short loc_18013F6E5                                            ; +0x23, 0x18013f697\nmov     ecx, [rcx+18h]; FileHandle                                     ; +0x25, 0x18013f699\ncall    _get_osfhandle                                                 ; +0x28, 0x18013f69c\nmov     rbx, rax                                                       ; +0x2d, 0x18013f6a1\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x30, 0x18013f6a4\njz      short loc_18013F6E5                                            ; +0x34, 0x18013f6a8\nmov     r9d, 1; dwMoveMethod                                           ; +0x36, 0x18013f6aa\nlea     r8, [rsp+28h+NewFilePointer]; lpNewFilePointer                 ; +0x3c, 0x18013f6b0\nxor     edx, edx; liDistanceToMove                                     ; +0x41, 0x18013f6b5\nmov     rcx, rax; hFile                                                ; +0x43, 0x18013f6b7\ncall    cs:SetFilePointerEx                                            ; +0x46, 0x18013f6ba\ntest    eax, eax                                                       ; +0x4c, 0x18013f6c0\njz      short loc_18013F6E5                                            ; +0x4e, 0x18013f6c2\nlea     rdx, [rsp+28h+FileSize]; lpFileSize                            ; +0x50, 0x18013f6c4\nmov     rcx, rbx; hFile                                                ; +0x55, 0x18013f6c9\ncall    cs:GetFileSizeEx                                               ; +0x58, 0x18013f6cc\ntest    eax, eax                                                       ; +0x5e, 0x18013f6d2\njz      short loc_18013F6E5                                            ; +0x60, 0x18013f6d4\nmov     rax, qword ptr [rsp+28h+FileSize]                              ; +0x62, 0x18013f6d6\ncmp     qword ptr [rsp+28h+NewFilePointer], rax                        ; +0x67, 0x18013f6db\nsetz    al                                                             ; +0x6c, 0x18013f6e0\njmp     short loc_18013F6E7                                            ; +0x6f, 0x18013f6e3\nxor     al, al                                                         ; +0x71, 0x18013f6e5\nadd     rsp, 20h                                                       ; +0x73, 0x18013f6e7\npop     rbx                                                            ; +0x77, 0x18013f6eb\nretn                                                                   ; +0x78, 0x18013f6ec", "xrefs": ["unknown_libname_72 @ 0x18013f744", "unknown_libname_73 @ 0x18013f7fe", "<???> @ 0x180203b84", "<???> @ 0x180203b90"], "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"}