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

📄 deflate.cod

📁 microsoft visual c++ 2005、windows mobile 5 远程控制PC.通过阅读项目源码能让你熟悉Active Sync RAPI
💻 COD
📖 第 1 页 / 共 5 页
字号:
; 921  :     ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));

  0006d	8b 56 2c	 mov	 edx, DWORD PTR [esi+44]
  00070	89 46 38	 mov	 DWORD PTR [esi+56], eax
  00073	8b 43 28	 mov	 eax, DWORD PTR [ebx+40]
  00076	8b 4b 20	 mov	 ecx, DWORD PTR [ebx+32]
  00079	6a 02		 push	 2
  0007b	52		 push	 edx
  0007c	50		 push	 eax
  0007d	ff d1		 call	 ecx

; 922  :     ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));

  0007f	8b 56 4c	 mov	 edx, DWORD PTR [esi+76]
  00082	89 46 40	 mov	 DWORD PTR [esi+64], eax
  00085	8b 43 28	 mov	 eax, DWORD PTR [ebx+40]
  00088	8b 4b 20	 mov	 ecx, DWORD PTR [ebx+32]
  0008b	6a 02		 push	 2
  0008d	52		 push	 edx
  0008e	50		 push	 eax
  0008f	ff d1		 call	 ecx

; 923  :     overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);

  00091	8b 96 9c 16 00
	00		 mov	 edx, DWORD PTR [esi+5788]
  00097	89 46 44	 mov	 DWORD PTR [esi+68], eax
  0009a	8b 43 28	 mov	 eax, DWORD PTR [ebx+40]
  0009d	8b 4b 20	 mov	 ecx, DWORD PTR [ebx+32]
  000a0	6a 04		 push	 4
  000a2	52		 push	 edx
  000a3	50		 push	 eax
  000a4	ff d1		 call	 ecx
  000a6	8b f8		 mov	 edi, eax

; 924  :     ds->pending_buf = (uchf *) overlay;
; 925  : 
; 926  :     if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
; 927  :         ds->pending_buf == Z_NULL) {

  000a8	8b 46 38	 mov	 eax, DWORD PTR [esi+56]
  000ab	83 c4 3c	 add	 esp, 60			; 0000003cH
  000ae	85 c0		 test	 eax, eax
  000b0	89 7e 08	 mov	 DWORD PTR [esi+8], edi
  000b3	0f 84 bf 00 00
	00		 je	 $LN1@deflateCop
  000b9	83 7e 40 00	 cmp	 DWORD PTR [esi+64], 0
  000bd	0f 84 b5 00 00
	00		 je	 $LN1@deflateCop
  000c3	83 7e 44 00	 cmp	 DWORD PTR [esi+68], 0
  000c7	0f 84 ab 00 00
	00		 je	 $LN1@deflateCop
  000cd	85 ff		 test	 edi, edi
  000cf	0f 84 a3 00 00
	00		 je	 $LN1@deflateCop

; 930  :     }
; 931  :     /* following zmemcpy do not work for 16-bit MSDOS */
; 932  :     zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));

  000d5	8b 56 2c	 mov	 edx, DWORD PTR [esi+44]
  000d8	8b 4d 38	 mov	 ecx, DWORD PTR [ebp+56]
  000db	03 d2		 add	 edx, edx
  000dd	52		 push	 edx
  000de	51		 push	 ecx
  000df	50		 push	 eax
  000e0	e8 00 00 00 00	 call	 _memcpy

; 933  :     zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));

  000e5	8b 56 2c	 mov	 edx, DWORD PTR [esi+44]
  000e8	8b 45 40	 mov	 eax, DWORD PTR [ebp+64]
  000eb	8b 4e 40	 mov	 ecx, DWORD PTR [esi+64]
  000ee	03 d2		 add	 edx, edx
  000f0	52		 push	 edx
  000f1	50		 push	 eax
  000f2	51		 push	 ecx
  000f3	e8 00 00 00 00	 call	 _memcpy

; 934  :     zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));

  000f8	8b 56 4c	 mov	 edx, DWORD PTR [esi+76]
  000fb	8b 45 44	 mov	 eax, DWORD PTR [ebp+68]
  000fe	8b 4e 44	 mov	 ecx, DWORD PTR [esi+68]
  00101	03 d2		 add	 edx, edx
  00103	52		 push	 edx
  00104	50		 push	 eax
  00105	51		 push	 ecx
  00106	e8 00 00 00 00	 call	 _memcpy

; 935  :     zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);

  0010b	8b 56 0c	 mov	 edx, DWORD PTR [esi+12]
  0010e	8b 45 08	 mov	 eax, DWORD PTR [ebp+8]
  00111	8b 4e 08	 mov	 ecx, DWORD PTR [esi+8]
  00114	52		 push	 edx
  00115	50		 push	 eax
  00116	51		 push	 ecx
  00117	e8 00 00 00 00	 call	 _memcpy

; 936  : 
; 937  :     ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);

  0011c	8b 55 10	 mov	 edx, DWORD PTR [ebp+16]
  0011f	2b 55 08	 sub	 edx, DWORD PTR [ebp+8]
  00122	8b 4e 08	 mov	 ecx, DWORD PTR [esi+8]

; 938  :     ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);

  00125	8b 86 9c 16 00
	00		 mov	 eax, DWORD PTR [esi+5788]
  0012b	03 d1		 add	 edx, ecx
  0012d	89 56 10	 mov	 DWORD PTR [esi+16], edx
  00130	8b d0		 mov	 edx, eax

; 939  :     ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;

  00132	8d 0c 41	 lea	 ecx, DWORD PTR [ecx+eax*2]
  00135	d1 ea		 shr	 edx, 1
  00137	03 c8		 add	 ecx, eax
  00139	83 c4 30	 add	 esp, 48			; 00000030H
  0013c	8d 14 57	 lea	 edx, DWORD PTR [edi+edx*2]
  0013f	89 96 a4 16 00
	00		 mov	 DWORD PTR [esi+5796], edx
  00145	89 8e 98 16 00
	00		 mov	 DWORD PTR [esi+5784], ecx

; 940  : 
; 941  :     ds->l_desc.dyn_tree = ds->dyn_ltree;
; 942  :     ds->d_desc.dyn_tree = ds->dyn_dtree;

  0014b	8d 86 88 09 00
	00		 lea	 eax, DWORD PTR [esi+2440]
  00151	8d 96 94 00 00
	00		 lea	 edx, DWORD PTR [esi+148]

; 943  :     ds->bl_desc.dyn_tree = ds->bl_tree;

  00157	8d 8e 7c 0a 00
	00		 lea	 ecx, DWORD PTR [esi+2684]
  0015d	5f		 pop	 edi
  0015e	89 86 24 0b 00
	00		 mov	 DWORD PTR [esi+2852], eax
  00164	89 96 18 0b 00
	00		 mov	 DWORD PTR [esi+2840], edx
  0016a	89 8e 30 0b 00
	00		 mov	 DWORD PTR [esi+2864], ecx
  00170	5e		 pop	 esi
  00171	5d		 pop	 ebp

; 944  : 
; 945  :     return Z_OK;

  00172	33 c0		 xor	 eax, eax
  00174	5b		 pop	 ebx

; 946  : #endif /* MAXSEG_64K */
; 947  : }

  00175	c2 08 00	 ret	 8
$LN1@deflateCop:

; 928  :         deflateEnd (dest);

  00178	53		 push	 ebx
  00179	e8 00 00 00 00	 call	 _deflateEnd@4
$LN9@deflateCop:
  0017e	5f		 pop	 edi
  0017f	5e		 pop	 esi
  00180	5d		 pop	 ebp

; 929  :         return Z_MEM_ERROR;

  00181	b8 fc ff ff ff	 mov	 eax, -4			; fffffffcH
  00186	5b		 pop	 ebx

; 946  : #endif /* MAXSEG_64K */
; 947  : }

  00187	c2 08 00	 ret	 8
$LN4@deflateCop:
  0018a	5e		 pop	 esi
  0018b	5d		 pop	 ebp

; 907  :         return Z_STREAM_ERROR;

  0018c	b8 fe ff ff ff	 mov	 eax, -2			; fffffffeH
  00191	5b		 pop	 ebx

; 946  : #endif /* MAXSEG_64K */
; 947  : }

  00192	c2 08 00	 ret	 8
_deflateCopy@8 ENDP
_TEXT	ENDS
PUBLIC	_deflate@8
; Function compile flags: /Ogtpy
;	COMDAT _deflate@8
_TEXT	SEGMENT
_old_flush$ = 8						; size = 4
_strm$ = 8						; size = 4
_flush$ = 12						; size = 4
_deflate@8 PROC						; COMDAT

; 555  : {

  00000	56		 push	 esi
  00001	57		 push	 edi

; 556  :     int old_flush; /* value of flush param for previous deflate call */
; 557  :     deflate_state *s;
; 558  : 
; 559  :     if (strm == Z_NULL || strm->state == Z_NULL ||
; 560  :         flush > Z_FINISH || flush < 0) {

  00002	8b 7c 24 0c	 mov	 edi, DWORD PTR _strm$[esp+4]
  00006	85 ff		 test	 edi, edi
  00008	0f 84 ab 07 00
	00		 je	 $LN80@deflate
  0000e	8b 77 1c	 mov	 esi, DWORD PTR [edi+28]
  00011	85 f6		 test	 esi, esi
  00013	0f 84 a0 07 00
	00		 je	 $LN80@deflate
  00019	8b 4c 24 10	 mov	 ecx, DWORD PTR _flush$[esp+4]
  0001d	83 f9 04	 cmp	 ecx, 4
  00020	0f 87 93 07 00
	00		 ja	 $LN80@deflate

; 561  :         return Z_STREAM_ERROR;
; 562  :     }
; 563  :     s = strm->state;
; 564  : 
; 565  :     if (strm->next_out == Z_NULL ||
; 566  :         (strm->next_in == Z_NULL && strm->avail_in != 0) ||
; 567  :         (s->status == FINISH_STATE && flush != Z_FINISH)) {

  00026	83 7f 0c 00	 cmp	 DWORD PTR [edi+12], 0
  0002a	0f 84 82 07 00
	00		 je	 $LN78@deflate
  00030	83 3f 00	 cmp	 DWORD PTR [edi], 0
  00033	75 0a		 jne	 SHORT $LN77@deflate
  00035	83 7f 04 00	 cmp	 DWORD PTR [edi+4], 0
  00039	0f 85 73 07 00
	00		 jne	 $LN78@deflate
$LN77@deflate:
  0003f	8b 46 04	 mov	 eax, DWORD PTR [esi+4]
  00042	3d 9a 02 00 00	 cmp	 eax, 666		; 0000029aH
  00047	75 09		 jne	 SHORT $LN79@deflate
  00049	83 f9 04	 cmp	 ecx, 4
  0004c	0f 85 60 07 00
	00		 jne	 $LN78@deflate
$LN79@deflate:

; 569  :     }
; 570  :     if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);

  00052	83 7f 10 00	 cmp	 DWORD PTR [edi+16], 0
  00056	75 11		 jne	 SHORT $LN76@deflate
  00058	c7 47 18 00 00
	00 00		 mov	 DWORD PTR [edi+24], OFFSET ??_C@_0N@DFPGLBGC@buffer?5error?$AA@
  0005f	5f		 pop	 edi
  00060	b8 fb ff ff ff	 mov	 eax, -5			; fffffffbH
  00065	5e		 pop	 esi

; 856  : }

  00066	c2 08 00	 ret	 8
$LN76@deflate:

; 571  : 
; 572  :     s->strm = strm; /* just in case */
; 573  :     old_flush = s->last_flush;
; 574  :     s->last_flush = flush;
; 575  : 
; 576  :     /* Write the header */
; 577  :     if (s->status == INIT_STATE) {

  00069	83 f8 2a	 cmp	 eax, 42			; 0000002aH
  0006c	8b 56 28	 mov	 edx, DWORD PTR [esi+40]
  0006f	53		 push	 ebx
  00070	55		 push	 ebp
  00071	89 3e		 mov	 DWORD PTR [esi], edi
  00073	89 54 24 14	 mov	 DWORD PTR _old_flush$[esp+12], edx
  00077	89 4e 28	 mov	 DWORD PTR [esi+40], ecx
  0007a	bb 01 00 00 00	 mov	 ebx, 1
  0007f	0f 85 99 02 00
	00		 jne	 $LN69@deflate

; 578  : #ifdef GZIP
; 579  :         if (s->wrap == 2) {

  00085	b8 02 00 00 00	 mov	 eax, 2
  0008a	39 46 18	 cmp	 DWORD PTR [esi+24], eax
  0008d	0f 85 f8 01 00
	00		 jne	 $LN74@deflate

; 580  :             strm->adler = crc32(0L, Z_NULL, 0);

  00093	6a 00		 push	 0
  00095	6a 00		 push	 0
  00097	6a 00		 push	 0
  00099	e8 00 00 00 00	 call	 _crc32@12
  0009e	89 47 30	 mov	 DWORD PTR [edi+48], eax

; 581  :             put_byte(s, 31);

  000a1	8b 4e 14	 mov	 ecx, DWORD PTR [esi+20]
  000a4	8b 46 08	 mov	 eax, DWORD PTR [esi+8]
  000a7	c6 04 08 1f	 mov	 BYTE PTR [eax+ecx], 31	; 0000001fH
  000ab	01 5e 14	 add	 DWORD PTR [esi+20], ebx
  000ae	8b 46 14	 mov	 eax, DWORD PTR [esi+20]

; 582  :             put_byte(s, 139);

  000b1	8b 56 08	 mov	 edx, DWORD PTR [esi+8]
  000b4	c6 04 10 8b	 mov	 BYTE PTR [eax+edx], 139	; 0000008bH
  000b8	01 5e 14	 add	 DWORD PTR [esi+20], ebx
  000bb	8b 46 14	 mov	 eax, DWORD PTR [esi+20]

; 583  :             put_byte(s, 8);

  000be	8b 4e 08	 mov	 ecx, DWORD PTR [esi+8]
  000c1	c6 04 08 08	 mov	 BYTE PTR [eax+ecx], 8
  000c5	01 5e 14	 add	 DWORD PTR [esi+20], ebx

; 584  :             if (s->gzhead == NULL) {

  000c8	8b 46 1c	 mov	 eax, DWORD PTR [esi+28]
  000cb	85 c0		 test	 eax, eax
  000cd	8b 6e 14	 mov	 ebp, DWORD PTR [esi+20]
  000d0	0f 85 89 00 00
	00		 jne	 $LN73@deflate

; 585  :                 put_byte(s, 0);

  000d6	8b 56 08	 mov	 edx, DWORD PTR [esi+8]
  000d9	88 04 2a	 mov	 BYTE PTR [edx+ebp], al
  000dc	01 5e 14	 add	 DWORD PTR [esi+20], ebx
  000df	8b 46 14	 mov	 eax, DWORD PTR [esi+20]

; 586  :                 put_byte(s, 0);

  000e2	8b 4e 08	 mov	 ecx, DWORD PTR [esi+8]
  000e5	c6 04 08 00	 mov	 BYTE PTR [eax+ecx], 0
  000e9	01 5e 14	 add	 DWORD PTR [esi+20], ebx
  000ec	8b 46 14	 mov	 eax, DWORD PTR [esi+20]

; 587  :                 put_byte(s, 0);

  000ef	8b 56 08	 mov	 edx, DWORD PTR [esi+8]
  000f2	c6 04 10 00	 mov	 BYTE PTR [eax+edx], 0
  000f6	01 5e 14	 add	 DWORD PTR [esi+20], ebx
  000f9	8b 46 14	 mov	 eax, DWORD PTR [esi+20]

; 588  :                 put_byte(s, 0);

  000fc	8b 4e 08	 mov	 ecx, DWORD PTR [esi+8]
  000ff	c6 04 08 00	 mov	 BYTE PTR [eax+ecx], 0
  00103	01 5e 14	 add	 DWORD PTR [esi+20], ebx
  00106	8b 46 14	 mov	 eax, DWORD PTR [esi+20]

; 589  :                 put_byte(s, 0);

  00109	8b 56 08	 mov	 edx, DWORD PTR [esi+8]
  0010c	c6 04 10 00	 mov	 BYTE PTR [eax+edx], 0
  00110	01 5e 14	 add	 DWORD PTR [esi+20], ebx

; 590  :                 put_byte(s, s->level == 9 ? 2 :
; 591  :                             (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
; 592  :                              4 : 0));

  00113	8b 86 84 00 00
	00		 mov	 eax, DWORD PTR [esi+132]
  00119	83 f8 09	 cmp	 eax, 9
  0011c	8b 4e 14	 mov	 ecx, DWORD PTR [esi+20]
  0011f	75 05		 jne	 SHORT $LN86@deflate
  00121	8d 43 01	 lea	 eax, DWORD PTR [ebx+1]
  00124	eb 17		 jmp	 SHORT $LN85@deflate
$LN86@deflate:
  00126	83 be 88 00 00
	00 02		 cmp	 DWORD PTR [esi+136], 2
  0012d	7d 09		 jge	 SHORT $LN84@deflate
  0012f	83 f8 02	 cmp	 eax, 2
  00132	7c 04		 jl	 SHORT $LN84@deflate
  00134	33 c0		 xor	 eax, eax
  00136	eb 05		 jmp	 SHORT $LN85@deflate
$LN84@deflate:
  00138	b8 04 00 00 00	 mov	 eax, 4
$LN85@deflate:
  0013d	8b 56 08	 mov	 edx, DWORD PTR [esi+8]
  00140	88 04 11	 mov	 BYTE PTR [ecx+edx], al
  00143	01 5e 14	 add	 DWORD PTR [esi+20], ebx
  00146	8b 46 14	 mov	 eax, DWORD PTR [esi+20]

; 593  :                 put_byte(s, OS_CODE);

  00149	8b 4e 08	 mov	 ecx, DWORD PTR [esi+8]
  0014c	c6 04 08 0b	 mov	 BYTE PTR [eax+ecx], 11	; 0000000bH
  00150	01 5e 14	 add	 DWORD PTR [esi+20], ebx

; 594  :                 s->status = BUSY_STATE;

  00153	c7 46 04 71 00
	00 00		 mov	 DWORD PTR [esi+4], 113	; 00000071H

; 595  :             }
; 596  :             else {

  0015a	e9 bf 01 00 00	 jmp	 $LN69@deflate
$LN73@deflate:

; 597  :                 put_byte(s, (s->gzhead->text ? 1 : 0) +
; 598  :                             (s->gzhead->hcrc ? 2 : 0) +
; 599  :                             (s->gzhead->extra == Z_NULL ? 0 : 4) +
; 600  :                             (s->gzhead->name == Z_NULL ? 0 : 8) +
; 601  :                             (s->gzhead->comment == Z_NULL ? 0 : 16)
; 602  :                         );

  0015f	8b 50 24	 mov	 edx, DWORD PTR [eax+36]
  00162	8b 48 2c	 mov	 ecx, DWORD PTR [eax+44]
  00165	f7 da		 neg	 edx
  00167	1a d2		 sbb	 dl, dl
  00169	83 e2 10	 and	 edx, 16			; 00000010H
  0016c	f7 d9		 neg	 ecx
  0016e	1a c9		 sbb	 cl, cl
  00170	83 e1 02	 and	 ecx, 2
  00173	02 d1		 add	 dl, cl
  00175	8b 48 1c	 mov	 ecx, DWORD PTR [eax+28]
  00178	f7 d9		 neg	 ecx
  0017a	1a c9		 sbb	 cl, cl
  0017c	83 e1 08	 and	 ecx, 8
  0017f	02 d1		 add	 dl, cl
  00181	8b 48 10	 mov	 ecx, DWORD PTR [eax+16]

⌨️ 快捷键说明

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