📄 iowin32.cod
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 14.00.50727.762
TITLE d:\src\VS2005\cpp\CeRemoteClient\zlib123\contrib\minizip\iowin32.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB OLDNAMES
EXTRN __imp__CloseHandle@4:PROC
EXTRN __imp__CreateFileA@28:PROC
EXTRN __imp__ReadFile@20:PROC
EXTRN __imp__WriteFile@20:PROC
EXTRN __imp__GetLastError@0:PROC
EXTRN __imp__SetFilePointer@16:PROC
PUBLIC _win32_error_file_func
; Function compile flags: /Ogtpy
; File d:\src\vs2005\cpp\ceremoteclient\zlib123\contrib\minizip\iowin32.c
; COMDAT _win32_error_file_func
_TEXT SEGMENT
_opaque$ = 8 ; size = 4
_stream$ = 12 ; size = 4
_win32_error_file_func PROC ; COMDAT
; 251 : int ret=-1;
; 252 : if (stream!=NULL)
00000 8b 4c 24 08 mov ecx, DWORD PTR _stream$[esp-4]
00004 83 c8 ff or eax, -1
00007 85 c9 test ecx, ecx
00009 74 03 je SHORT $LN1@win32_erro
; 253 : {
; 254 : ret = ((WIN32FILE_IOWIN*)stream) -> error;
; 255 : }
; 256 : return ret;
0000b 8b 41 04 mov eax, DWORD PTR [ecx+4]
$LN1@win32_erro:
; 257 : }
0000e c3 ret 0
_win32_error_file_func ENDP
_TEXT ENDS
PUBLIC _win32_close_file_func
; Function compile flags: /Ogtpy
; COMDAT _win32_close_file_func
_TEXT SEGMENT
_opaque$ = 8 ; size = 4
_stream$ = 12 ; size = 4
_win32_close_file_func PROC ; COMDAT
; 230 : {
00000 56 push esi
00001 57 push edi
; 231 : int ret=-1;
; 232 :
; 233 : if (stream!=NULL)
00002 8b 7c 24 10 mov edi, DWORD PTR _stream$[esp+4]
00006 83 ce ff or esi, -1
00009 85 ff test edi, edi
0000b 74 19 je SHORT $LN5@win32_clos
; 234 : {
; 235 : HANDLE hFile;
; 236 : hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
0000d 8b 07 mov eax, DWORD PTR [edi]
; 237 : if (hFile != NULL)
0000f 85 c0 test eax, eax
00011 74 09 je SHORT $LN1@win32_clos
; 238 : {
; 239 : CloseHandle(hFile);
00013 50 push eax
00014 ff 15 00 00 00
00 call DWORD PTR __imp__CloseHandle@4
; 240 : ret=0;
0001a 33 f6 xor esi, esi
$LN1@win32_clos:
; 241 : }
; 242 : free(stream);
0001c 57 push edi
0001d ff 15 00 00 00
00 call DWORD PTR __imp__free
00023 83 c4 04 add esp, 4
$LN5@win32_clos:
00026 5f pop edi
; 243 : }
; 244 : return ret;
00027 8b c6 mov eax, esi
00029 5e pop esi
; 245 : }
0002a c3 ret 0
_win32_close_file_func ENDP
_TEXT ENDS
PUBLIC _win32_seek_file_func
; Function compile flags: /Ogtpy
; COMDAT _win32_seek_file_func
_TEXT SEGMENT
_opaque$ = 8 ; size = 4
_stream$ = 12 ; size = 4
_offset$ = 16 ; size = 4
_origin$ = 20 ; size = 4
_win32_seek_file_func PROC ; COMDAT
; 191 : {
00000 56 push esi
; 192 : DWORD dwMoveMethod=0xFFFFFFFF;
; 193 : HANDLE hFile = NULL;
; 194 :
; 195 : long ret=-1;
; 196 : if (stream!=NULL)
00001 8b 74 24 0c mov esi, DWORD PTR _stream$[esp]
00005 33 d2 xor edx, edx
00007 83 c8 ff or eax, -1
0000a 85 f6 test esi, esi
0000c 74 02 je SHORT $LN10@win32_seek
; 197 : hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
0000e 8b 16 mov edx, DWORD PTR [esi]
$LN10@win32_seek:
; 198 : switch (origin)
00010 8b 4c 24 14 mov ecx, DWORD PTR _origin$[esp]
00014 83 e9 00 sub ecx, 0
00017 74 18 je SHORT $LN5@win32_seek
00019 83 e9 01 sub ecx, 1
0001c 74 0c je SHORT $LN7@win32_seek
0001e 83 e9 01 sub ecx, 1
; 208 : break;
; 209 : default: return -1;
00021 75 31 jne SHORT $LN13@win32_seek
; 203 : case ZLIB_FILEFUNC_SEEK_END :
; 204 : dwMoveMethod = FILE_END;
00023 b9 02 00 00 00 mov ecx, 2
; 205 : break;
00028 eb 09 jmp SHORT $LN8@win32_seek
$LN7@win32_seek:
; 199 : {
; 200 : case ZLIB_FILEFUNC_SEEK_CUR :
; 201 : dwMoveMethod = FILE_CURRENT;
0002a b9 01 00 00 00 mov ecx, 1
; 202 : break;
0002f eb 02 jmp SHORT $LN8@win32_seek
$LN5@win32_seek:
; 206 : case ZLIB_FILEFUNC_SEEK_SET :
; 207 : dwMoveMethod = FILE_BEGIN;
00031 33 c9 xor ecx, ecx
$LN8@win32_seek:
; 210 : }
; 211 :
; 212 : if (hFile != NULL)
00033 85 d2 test edx, edx
00035 74 24 je SHORT $LN11@win32_seek
; 213 : {
; 214 : DWORD dwSet = SetFilePointer(hFile, offset, NULL, dwMoveMethod);
00037 8b 44 24 10 mov eax, DWORD PTR _offset$[esp]
0003b 51 push ecx
0003c 6a 00 push 0
0003e 50 push eax
0003f 52 push edx
00040 ff 15 00 00 00
00 call DWORD PTR __imp__SetFilePointer@16
; 215 : if (dwSet == INVALID_SET_FILE_POINTER)
00046 83 f8 ff cmp eax, -1
00049 75 0e jne SHORT $LN2@win32_seek
; 216 : {
; 217 : DWORD dwErr = GetLastError();
0004b ff 15 00 00 00
00 call DWORD PTR __imp__GetLastError@0
; 218 : ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
00051 89 46 04 mov DWORD PTR [esi+4], eax
$LN13@win32_seek:
; 219 : ret = -1;
00054 83 c8 ff or eax, -1
00057 5e pop esi
; 223 : }
; 224 : return ret;
; 225 : }
00058 c3 ret 0
$LN2@win32_seek:
; 220 : }
; 221 : else
; 222 : ret=0;
00059 33 c0 xor eax, eax
$LN11@win32_seek:
0005b 5e pop esi
; 223 : }
; 224 : return ret;
; 225 : }
0005c c3 ret 0
_win32_seek_file_func ENDP
_TEXT ENDS
PUBLIC _win32_tell_file_func
; Function compile flags: /Ogtpy
; COMDAT _win32_tell_file_func
_TEXT SEGMENT
_opaque$ = 8 ; size = 4
_stream$ = 12 ; size = 4
_win32_tell_file_func PROC ; COMDAT
; 166 : {
00000 56 push esi
; 167 : long ret=-1;
; 168 : HANDLE hFile = NULL;
; 169 : if (stream!=NULL)
00001 8b 74 24 0c mov esi, DWORD PTR _stream$[esp]
00005 83 c8 ff or eax, -1
00008 85 f6 test esi, esi
0000a 74 24 je SHORT $LN1@win32_tell
; 170 : hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
0000c 8b 0e mov ecx, DWORD PTR [esi]
; 171 : if (hFile != NULL)
0000e 85 c9 test ecx, ecx
00010 74 1e je SHORT $LN1@win32_tell
; 172 : {
; 173 : DWORD dwSet = SetFilePointer(hFile, 0, NULL, FILE_CURRENT);
00012 6a 01 push 1
00014 6a 00 push 0
00016 6a 00 push 0
00018 51 push ecx
00019 ff 15 00 00 00
00 call DWORD PTR __imp__SetFilePointer@16
; 174 : if (dwSet == INVALID_SET_FILE_POINTER)
0001f 83 f8 ff cmp eax, -1
00022 75 0c jne SHORT $LN1@win32_tell
; 175 : {
; 176 : DWORD dwErr = GetLastError();
00024 ff 15 00 00 00
00 call DWORD PTR __imp__GetLastError@0
; 177 : ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
0002a 89 46 04 mov DWORD PTR [esi+4], eax
; 178 : ret = -1;
0002d 83 c8 ff or eax, -1
$LN1@win32_tell:
00030 5e pop esi
; 179 : }
; 180 : else
; 181 : ret=(long)dwSet;
; 182 : }
; 183 : return ret;
; 184 : }
00031 c3 ret 0
_win32_tell_file_func ENDP
_TEXT ENDS
PUBLIC _win32_write_file_func
; Function compile flags: /Ogtpy
; COMDAT _win32_write_file_func
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_opaque$ = 8 ; size = 4
_stream$ = 12 ; size = 4
_buf$ = 16 ; size = 4
_size$ = 20 ; size = 4
_win32_write_file_func PROC ; COMDAT
; 145 : {
00000 51 push ecx
00001 56 push esi
; 146 : uLong ret=0;
; 147 : HANDLE hFile = NULL;
; 148 : if (stream!=NULL)
00002 8b 74 24 10 mov esi, DWORD PTR _stream$[esp+4]
00006 33 c0 xor eax, eax
00008 85 f6 test esi, esi
0000a 89 44 24 04 mov DWORD PTR _ret$[esp+8], eax
0000e 74 35 je SHORT $LN2@win32_writ
; 149 : hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
00010 8b 0e mov ecx, DWORD PTR [esi]
; 150 :
; 151 : if (hFile !=NULL)
00012 85 c9 test ecx, ecx
00014 74 2f je SHORT $LN2@win32_writ
; 152 : if (!WriteFile(hFile, buf, size, &ret, NULL))
00016 8b 54 24 18 mov edx, DWORD PTR _size$[esp+4]
0001a 50 push eax
0001b 8d 44 24 08 lea eax, DWORD PTR _ret$[esp+12]
0001f 50 push eax
00020 8b 44 24 1c mov eax, DWORD PTR _buf$[esp+12]
00024 52 push edx
00025 50 push eax
00026 51 push ecx
00027 ff 15 00 00 00
00 call DWORD PTR __imp__WriteFile@20
0002d 85 c0 test eax, eax
0002f 75 10 jne SHORT $LN7@win32_writ
; 153 : {
; 154 : DWORD dwErr = GetLastError();
00031 ff 15 00 00 00
00 call DWORD PTR __imp__GetLastError@0
; 155 : if (dwErr == ERROR_HANDLE_EOF)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -