⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zip.cod

📁 microsoft visual c++ 2005、windows mobile 5 远程控制PC.通过阅读项目源码能让你熟悉Active Sync RAPI
💻 COD
📖 第 1 页 / 共 5 页
字号:
$LN20@zipCloseFi:

; 1042 :     zi = (zip_internal*)file;
; 1043 : 
; 1044 :     if (zi->in_opened_file_inzip == 0)

  00016	39 6f 2c	 cmp	 DWORD PTR [edi+44], ebp

; 1045 :         return ZIP_PARAMERROR;

  00019	74 f1		 je	 SHORT $LN36@zipCloseFi

; 1046 :     zi->ci.stream.avail_in = 0;
; 1047 : 
; 1048 :     if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))

  0001b	83 bf 80 00 00
	00 08		 cmp	 DWORD PTR [edi+128], 8
  00022	53		 push	 ebx
  00023	56		 push	 esi
  00024	89 6f 34	 mov	 DWORD PTR [edi+52], ebp
  00027	75 48		 jne	 SHORT $LN32@zipCloseFi
  00029	39 af 84 00 00
	00		 cmp	 DWORD PTR [edi+132], ebp
  0002f	75 40		 jne	 SHORT $LN32@zipCloseFi
  00031	8d 77 30	 lea	 esi, DWORD PTR [edi+48]
$LL17@zipCloseFi:

; 1049 :         while (err==ZIP_OK)
; 1050 :     {
; 1051 :         uLong uTotalOutBefore;
; 1052 :         if (zi->ci.stream.avail_out == 0)

  00034	83 7f 40 00	 cmp	 DWORD PTR [edi+64], 0
  00038	75 17		 jne	 SHORT $LN15@zipCloseFi

; 1053 :         {
; 1054 :             if (zipFlushWriteBuffer(zi) == ZIP_ERRNO)

  0003a	8b df		 mov	 ebx, edi
  0003c	e8 00 00 00 00	 call	 _zipFlushWriteBuffer

; 1055 :                 err = ZIP_ERRNO;
; 1056 :             zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
; 1057 :             zi->ci.stream.next_out = zi->ci.buffered_data;

  00041	8d 87 88 00 00
	00		 lea	 eax, DWORD PTR [edi+136]
  00047	c7 47 40 00 40
	00 00		 mov	 DWORD PTR [edi+64], 16384 ; 00004000H
  0004e	89 47 3c	 mov	 DWORD PTR [edi+60], eax
$LN15@zipCloseFi:

; 1058 :         }
; 1059 :         uTotalOutBefore = zi->ci.stream.total_out;

  00051	8b 5f 44	 mov	 ebx, DWORD PTR [edi+68]

; 1060 :         err=deflate(&zi->ci.stream,  Z_FINISH);

  00054	6a 04		 push	 4
  00056	56		 push	 esi
  00057	e8 00 00 00 00	 call	 _deflate@8

; 1061 :         zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;

  0005c	8b 4f 44	 mov	 ecx, DWORD PTR [edi+68]
  0005f	2b cb		 sub	 ecx, ebx
  00061	01 4f 6c	 add	 DWORD PTR [edi+108], ecx
  00064	8b e8		 mov	 ebp, eax
  00066	85 ed		 test	 ebp, ebp
  00068	74 ca		 je	 SHORT $LL17@zipCloseFi

; 1062 :     }
; 1063 : 
; 1064 :     if (err==Z_STREAM_END)

  0006a	83 fd 01	 cmp	 ebp, 1
  0006d	75 02		 jne	 SHORT $LN32@zipCloseFi

; 1065 :         err=ZIP_OK; /* this is normal */

  0006f	33 ed		 xor	 ebp, ebp
$LN32@zipCloseFi:

; 1066 : 
; 1067 :     if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK))

  00071	83 7f 6c 00	 cmp	 DWORD PTR [edi+108], 0
  00075	76 12		 jbe	 SHORT $LN29@zipCloseFi
  00077	85 ed		 test	 ebp, ebp
  00079	75 0e		 jne	 SHORT $LN29@zipCloseFi

; 1068 :         if (zipFlushWriteBuffer(zi)==ZIP_ERRNO)

  0007b	8b df		 mov	 ebx, edi
  0007d	e8 00 00 00 00	 call	 _zipFlushWriteBuffer
  00082	83 f8 ff	 cmp	 eax, -1
  00085	75 02		 jne	 SHORT $LN29@zipCloseFi

; 1069 :             err = ZIP_ERRNO;

  00087	0b e8		 or	 ebp, eax
$LN29@zipCloseFi:

; 1070 : 
; 1071 :     if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))

  00089	83 bf 80 00 00
	00 08		 cmp	 DWORD PTR [edi+128], 8
  00090	75 1b		 jne	 SHORT $LN34@zipCloseFi
  00092	83 bf 84 00 00
	00 00		 cmp	 DWORD PTR [edi+132], 0
  00099	75 2c		 jne	 SHORT $LN28@zipCloseFi

; 1072 :     {
; 1073 :         err=deflateEnd(&zi->ci.stream);

  0009b	8d 57 30	 lea	 edx, DWORD PTR [edi+48]
  0009e	52		 push	 edx
  0009f	e8 00 00 00 00	 call	 _deflateEnd@4
  000a4	8b e8		 mov	 ebp, eax

; 1074 :         zi->ci.stream_initialised = 0;

  000a6	c7 47 68 00 00
	00 00		 mov	 DWORD PTR [edi+104], 0
$LN34@zipCloseFi:

; 1075 :     }
; 1076 : 
; 1077 :     if (!zi->ci.raw)

  000ad	83 bf 84 00 00
	00 00		 cmp	 DWORD PTR [edi+132], 0
  000b4	75 11		 jne	 SHORT $LN28@zipCloseFi

; 1078 :     {
; 1079 :         crc32 = (uLong)zi->ci.crc32;

  000b6	8b 87 8c 40 00
	00		 mov	 eax, DWORD PTR [edi+16524]

; 1080 :         uncompressed_size = (uLong)zi->ci.stream.total_in;

  000bc	8b 4f 38	 mov	 ecx, DWORD PTR [edi+56]
  000bf	89 44 24 1c	 mov	 DWORD PTR _crc32$[esp+12], eax
  000c3	89 4c 24 18	 mov	 DWORD PTR _uncompressed_size$[esp+12], ecx
$LN28@zipCloseFi:

; 1081 :     }
; 1082 :     compressed_size = (uLong)zi->ci.stream.total_out;
; 1083 : #    ifndef NOCRYPT
; 1084 :     compressed_size += zi->ci.crypt_header_size;
; 1085 : #    endif
; 1086 : 
; 1087 :     ziplocal_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/

  000c7	8b 77 74	 mov	 esi, DWORD PTR [edi+116]
  000ca	8b 9f a4 40 00
	00		 mov	 ebx, DWORD PTR [edi+16548]
  000d0	8b 4c 24 1c	 mov	 ecx, DWORD PTR _crc32$[esp+12]
  000d4	03 5f 44	 add	 ebx, DWORD PTR [edi+68]
  000d7	83 c6 10	 add	 esi, 16			; 00000010H
  000da	ba 04 00 00 00	 mov	 edx, 4
  000df	e8 00 00 00 00	 call	 _ziplocal_putValue_inmemory

; 1088 :     ziplocal_putValue_inmemory(zi->ci.central_header+20,
; 1089 :                                 compressed_size,4); /*compr size*/

  000e4	8b 77 74	 mov	 esi, DWORD PTR [edi+116]
  000e7	83 c6 14	 add	 esi, 20			; 00000014H
  000ea	ba 04 00 00 00	 mov	 edx, 4
  000ef	8b cb		 mov	 ecx, ebx
  000f1	e8 00 00 00 00	 call	 _ziplocal_putValue_inmemory

; 1090 :     if (zi->ci.stream.data_type == Z_ASCII)

  000f6	b9 01 00 00 00	 mov	 ecx, 1
  000fb	39 4f 5c	 cmp	 DWORD PTR [edi+92], ecx
  000fe	75 0e		 jne	 SHORT $LN8@zipCloseFi

; 1091 :         ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2);

  00100	8b 77 74	 mov	 esi, DWORD PTR [edi+116]
  00103	83 c6 24	 add	 esi, 36			; 00000024H
  00106	8d 51 01	 lea	 edx, DWORD PTR [ecx+1]
  00109	e8 00 00 00 00	 call	 _ziplocal_putValue_inmemory
$LN8@zipCloseFi:

; 1092 :     ziplocal_putValue_inmemory(zi->ci.central_header+24,
; 1093 :                                 uncompressed_size,4); /*uncompr size*/

  0010e	8b 77 74	 mov	 esi, DWORD PTR [edi+116]
  00111	8b 4c 24 18	 mov	 ecx, DWORD PTR _uncompressed_size$[esp+12]
  00115	83 c6 18	 add	 esi, 24			; 00000018H
  00118	ba 04 00 00 00	 mov	 edx, 4
  0011d	e8 00 00 00 00	 call	 _ziplocal_putValue_inmemory

; 1094 : 
; 1095 :     if (err==ZIP_OK)

  00122	85 ed		 test	 ebp, ebp
  00124	75 16		 jne	 SHORT $LN7@zipCloseFi

; 1096 :         err = add_data_in_datablock(&zi->central_dir,zi->ci.central_header,
; 1097 :                                        (uLong)zi->ci.size_centralheader);

  00126	8b 57 78	 mov	 edx, DWORD PTR [edi+120]
  00129	8b 47 74	 mov	 eax, DWORD PTR [edi+116]
  0012c	52		 push	 edx
  0012d	50		 push	 eax
  0012e	8d 4f 24	 lea	 ecx, DWORD PTR [edi+36]
  00131	51		 push	 ecx
  00132	e8 00 00 00 00	 call	 _add_data_in_datablock
  00137	83 c4 0c	 add	 esp, 12			; 0000000cH
  0013a	8b e8		 mov	 ebp, eax
$LN7@zipCloseFi:

; 1098 :     free(zi->ci.central_header);

  0013c	8b 57 74	 mov	 edx, DWORD PTR [edi+116]
  0013f	52		 push	 edx
  00140	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__free
  00146	83 c4 04	 add	 esp, 4

; 1099 : 
; 1100 :     if (err==ZIP_OK)

  00149	85 ed		 test	 ebp, ebp
  0014b	0f 85 91 00 00
	00		 jne	 $LN1@zipCloseFi

; 1101 :     {
; 1102 :         long cur_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream);

  00151	8b 47 20	 mov	 eax, DWORD PTR [edi+32]
  00154	8b 4f 1c	 mov	 ecx, DWORD PTR [edi+28]
  00157	8b 57 0c	 mov	 edx, DWORD PTR [edi+12]
  0015a	50		 push	 eax
  0015b	51		 push	 ecx
  0015c	ff d2		 call	 edx

; 1103 :         if (ZSEEK(zi->z_filefunc,zi->filestream,
; 1104 :                   zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0)

  0015e	8b 4f 20	 mov	 ecx, DWORD PTR [edi+32]
  00161	8b 57 1c	 mov	 edx, DWORD PTR [edi+28]
  00164	89 44 24 1c	 mov	 DWORD PTR _cur_pos_inzip$80989[esp+20], eax
  00168	8b 47 70	 mov	 eax, DWORD PTR [edi+112]
  0016b	55		 push	 ebp
  0016c	83 c0 0e	 add	 eax, 14			; 0000000eH
  0016f	50		 push	 eax
  00170	8b 47 10	 mov	 eax, DWORD PTR [edi+16]
  00173	51		 push	 ecx
  00174	52		 push	 edx
  00175	ff d0		 call	 eax
  00177	83 c4 18	 add	 esp, 24			; 00000018H
  0017a	85 c0		 test	 eax, eax
  0017c	74 05		 je	 SHORT $LN26@zipCloseFi

; 1105 :             err = ZIP_ERRNO;

  0017e	83 cd ff	 or	 ebp, -1

; 1106 : 
; 1107 :         if (err==ZIP_OK)

  00181	eb 41		 jmp	 SHORT $LN30@zipCloseFi
$LN26@zipCloseFi:

; 1108 :             err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */

  00183	8b 4f 20	 mov	 ecx, DWORD PTR [edi+32]
  00186	51		 push	 ecx
  00187	8b 4c 24 20	 mov	 ecx, DWORD PTR _crc32$[esp+16]
  0018b	be 04 00 00 00	 mov	 esi, 4
  00190	e8 00 00 00 00	 call	 _ziplocal_putValue
  00195	8b e8		 mov	 ebp, eax
  00197	83 c4 04	 add	 esp, 4

; 1109 : 
; 1110 :         if (err==ZIP_OK) /* compressed size, unknown */

  0019a	85 ed		 test	 ebp, ebp
  0019c	75 26		 jne	 SHORT $LN30@zipCloseFi

; 1111 :             err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4);

  0019e	8b 57 20	 mov	 edx, DWORD PTR [edi+32]
  001a1	52		 push	 edx
  001a2	8b cb		 mov	 ecx, ebx
  001a4	e8 00 00 00 00	 call	 _ziplocal_putValue
  001a9	8b e8		 mov	 ebp, eax
  001ab	83 c4 04	 add	 esp, 4

; 1112 : 
; 1113 :         if (err==ZIP_OK) /* uncompressed size, unknown */

  001ae	85 ed		 test	 ebp, ebp
  001b0	75 12		 jne	 SHORT $LN30@zipCloseFi

; 1114 :             err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4);

  001b2	8b 47 20	 mov	 eax, DWORD PTR [edi+32]
  001b5	8b 4c 24 18	 mov	 ecx, DWORD PTR _uncompressed_size$[esp+12]
  001b9	50		 push	 eax
  001ba	e8 00 00 00 00	 call	 _ziplocal_putValue
  001bf	83 c4 04	 add	 esp, 4
  001c2	8b e8		 mov	 ebp, eax
$LN30@zipCloseFi:

; 1115 : 
; 1116 :         if (ZSEEK(zi->z_filefunc,zi->filestream,
; 1117 :                   cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0)

  001c4	8b 4c 24 14	 mov	 ecx, DWORD PTR _cur_pos_inzip$80989[esp+12]
  001c8	8b 57 20	 mov	 edx, DWORD PTR [edi+32]
  001cb	8b 47 1c	 mov	 eax, DWORD PTR [edi+28]
  001ce	6a 00		 push	 0
  001d0	51		 push	 ecx
  001d1	8b 4f 10	 mov	 ecx, DWORD PTR [edi+16]
  001d4	52		 push	 edx
  001d5	50		 push	 eax
  001d6	ff d1		 call	 ecx
  001d8	83 c4 10	 add	 esp, 16			; 00000010H
  001db	85 c0		 test	 eax, eax
  001dd	74 03		 je	 SHORT $LN1@zipCloseFi

; 1118 :             err = ZIP_ERRNO;

  001df	83 cd ff	 or	 ebp, -1
$LN1@zipCloseFi:

; 1119 :     }
; 1120 : 
; 1121 :     zi->number_entry ++;

  001e2	83 87 b0 40 00
	00 01		 add	 DWORD PTR [edi+16560], 1
  001e9	5e		 pop	 esi
  001ea	5b		 pop	 ebx

; 1122 :     zi->in_opened_file_inzip = 0;

  001eb	c7 47 2c 00 00
	00 00		 mov	 DWORD PTR [edi+44], 0
  001f2	5f		 pop	 edi

; 1123 : 
; 1124 :     return err;

  001f3	8b c5		 mov	 eax, ebp
  001f5	5d		 pop	 ebp

; 1125 : }

  001f6	c2 0c 00	 ret	 12			; 0000000cH
_zipCloseFileInZipRaw@12 ENDP
_TEXT	ENDS
PUBLIC	_zipWriteInFileInZip@12
; Function compile flags: /Ogtpy
;	COMDAT _zipWriteInFileInZip@12
_TEXT	SEGMENT
_file$ = 8						; size = 4
_buf$ = 12						; size = 4
_len$ = 16						; size = 4
_zipWriteInFileInZip@12 PROC				; COMDAT

; 970  : {

  00000	53		 push	 ebx

; 971  :     zip_internal* zi;
; 972  :     int err=ZIP_OK;
; 973  : 
; 974  :     if (file == NULL)

  00001	8b 5c 24 08	 mov	 ebx, DWORD PTR _file$[esp]
  00005	55		 push	 ebp
  00006	33 ed		 xor	 ebp, ebp
  00008	85 db		 test	 ebx, ebx
  0000a	75 0a		 jne	 SHORT $LN14@zipWriteIn
$LN22@zipWriteIn:
  0000c	5d		 pop	 ebp

; 975  :         return ZIP_PARAMERROR;

  0000d	b8 9a ff ff ff	 mov	 eax, -102		; ffffff9aH
  00012	5b		 pop	 ebx

; 1029 : }

  00013	c2 0c 00	 ret	 12			; 0000000cH
$LN14@zipWriteIn:

; 976  :     zi = (zip_internal*)file;
; 977  : 
; 978  :     if (zi->in_opened_file_inzip == 0)

  00016	39 6b 2c	 cmp	 DWORD PTR [ebx+44], ebp

; 979  :         return ZIP_PARAMERROR;

  00019	74 f1		 je	 SHORT $LN22@zipWriteIn

; 980  : 
; 981  :     zi->ci.stream.next_in = (void*)buf;
; 982  :     zi->ci.stream.avail_in = len;

  0001b	8b 4c 24 14	 mov	 ecx, DWORD PTR _len$[esp+4]
  0001f	8b 44 24 10	 mov	 eax, DWORD PTR _buf$[esp+4]
  00023	56		 push	 esi
  00024	57		 push	 edi

; 983  :     zi->ci.crc32 = crc32(zi->ci.crc32,buf,len);

  00025	51		 push	 ecx
  00026	8d 7b 30	 lea	 edi, DWORD PTR [ebx+48]
  00029	50		 push	 eax
  0002a	89 07		 mov	 DWORD PTR [edi], eax
  0002c	8b 83 8c 40 00
	00		 mov	 eax, DWORD PTR [ebx+16524]
  00032	50		 push	 eax
  00033	89 4b 34	 mov	 DWORD PTR [ebx+52], ecx
  00036	e8 00 00 00 00	 call	 _crc32@12
  0003b	89 83 8c 40 00
	00		 mov	 DWORD PTR [ebx+16524], eax
$LL12@zipWriteIn:

; 984  : 
; 985  :     while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0))

  00041	83 7b 34 00	 cmp	 DWORD PTR [ebx+52], 0
  00045	76 4f		 jbe	 SHORT $LN19@zipWriteIn

; 986  :     {
; 987  :         if (zi->ci.stream.avail_out == 0)

  00047	83 7b 40 00	 cmp	 DWORD PTR [ebx+64], 0
  0004b	75 1c		 jne	 SHORT $LN10@zipWriteIn

; 988  :         {
; 989  :             if (zipFlushWriteBuffer(zi) == ZIP_ERRNO)

  0004d	e8 00 00 00 00	 call	 _zipFlushWriteBuffer
  00052	83 f8 ff	 cmp	 eax, -1
  00055	75 02		 jne	 SHORT $LN9@zipWriteIn

; 990  :                 err = ZIP_ERRNO;

  00057	0b e8		 or	 ebp, eax
$LN9@zipWriteIn:

; 991  :             zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
; 992  :             zi->ci.stream.next_out = zi->ci.buffered_data;

  00059	8d 8b 88 00 00
	00		 lea	 ecx, DWORD PTR [ebx+136]
  0005f	c7 43 40 00 40
	00 00		 mov	 DWORD PTR [ebx+64], 16384 ; 00004000H
  00066	89 4b 3c	 mov	 DWORD PTR [ebx+60], ecx
$LN10@zipWriteIn:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -