首页
社区
课程
招聘
[求助]哪位高手帮看看这个代码!
发表于: 2005-8-15 10:58 3231

[求助]哪位高手帮看看这个代码!

2005-8-15 10:58
3231
00404A3D      8D40 00       lea eax,dword ptr ds:[eax]
00404A40      6A 00         push 0
00404A42      8B40 40       mov eax,dword ptr ds:[eax+40]
00404A45      50            push eax
00404A46      E8 65F0FFFF   call <jmp.&KERNEL32.GetFileSize>
00404A4B      83F8 FF       cmp eax,-1
00404A4E      75 02         jnz short rolf1.00404A52
00404A50      33C0          xor eax,eax
00404A52      C3            retn

这里 getfilesize 获得了文件的大小后,这个大小的值存在什么地方了呢?

[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 442
活跃值: (1221)
能力值: ( LV12,RANK:1130 )
在线值:
发帖
回帖
粉丝
2
GetFileSize

The GetFileSize function retrieves the size of the specified file. The file size that can be reported by this function is limited to a DWORD value.

To retrieve a file size that is larger than a DWORD value, use the GetFileSizeEx function.

DWORD GetFileSize(
  HANDLE hFile,
  LPDWORD lpFileSizeHigh
);

Parameters
hFile
[in] Handle to the file whose size is to be returned.
lpFileSizeHigh
[out] Pointer to the variable where the high-order word of the file size is returned. This parameter can be NULL if the application does not require the high-order word.
Return Values
If the function succeeds, the return value is the low-order doubleword of the file size, and, if lpFileSizeHigh is non-NULL, the function puts the high-order doubleword of the file size into the variable pointed to by that parameter.

If the function fails and lpFileSizeHigh is NULL, the return value is INVALID_FILE_SIZE. To get extended error information, call GetLastError.

If the function fails and lpFileSizeHigh is non-NULL, the return value is INVALID_FILE_SIZE and GetLastError will return a value other than NO_ERROR.

Remarks
You cannot use the GetFileSize function with a handle of a nonseeking device such as a pipe or a communications device. To determine the file type for hFile, use the GetFileType function.

The GetFileSize function retrieves the uncompressed size of a file. Use the GetCompressedFileSize function to obtain the compressed size of a file.

Note that if the return value is INVALID_FILE_SIZE, an application must call GetLastError to determine whether the function has succeeded or failed. The reason the function may appear to fail when it has not is that lpFileSizeHigh could be non-NULL or the file size could be 0xffffffff. In this case, GetLastError will return NO_ERROR upon success.
2005-8-15 11:19
0
游客
登录 | 注册 方可回帖
返回
//