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

📄 deflate.cod

📁 microsoft visual c++ 2005、windows mobile 5 远程控制PC.通过阅读项目源码能让你熟悉Active Sync RAPI
💻 COD
📖 第 1 页 / 共 5 页
字号:
  0007a	8b 42 40	 mov	 eax, DWORD PTR [edx+64]
  0007d	85 c0		 test	 eax, eax
  0007f	74 0d		 je	 SHORT $LN2@deflateEnd
  00081	8b 4e 24	 mov	 ecx, DWORD PTR [esi+36]
  00084	50		 push	 eax
  00085	8b 46 28	 mov	 eax, DWORD PTR [esi+40]
  00088	50		 push	 eax
  00089	ff d1		 call	 ecx
  0008b	83 c4 08	 add	 esp, 8
$LN2@deflateEnd:

; 881  :     TRY_FREE(strm, strm->state->window);

  0008e	8b 56 1c	 mov	 edx, DWORD PTR [esi+28]
  00091	8b 42 38	 mov	 eax, DWORD PTR [edx+56]
  00094	85 c0		 test	 eax, eax
  00096	74 0d		 je	 SHORT $LN1@deflateEnd
  00098	8b 4e 24	 mov	 ecx, DWORD PTR [esi+36]
  0009b	50		 push	 eax
  0009c	8b 46 28	 mov	 eax, DWORD PTR [esi+40]
  0009f	50		 push	 eax
  000a0	ff d1		 call	 ecx
  000a2	83 c4 08	 add	 esp, 8
$LN1@deflateEnd:

; 882  : 
; 883  :     ZFREE(strm, strm->state);

  000a5	8b 56 1c	 mov	 edx, DWORD PTR [esi+28]
  000a8	8b 46 28	 mov	 eax, DWORD PTR [esi+40]
  000ab	8b 4e 24	 mov	 ecx, DWORD PTR [esi+36]
  000ae	52		 push	 edx
  000af	50		 push	 eax
  000b0	ff d1		 call	 ecx
  000b2	83 c4 08	 add	 esp, 8

; 884  :     strm->state = Z_NULL;
; 885  : 
; 886  :     return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;

  000b5	33 c0		 xor	 eax, eax
  000b7	83 ff 71	 cmp	 edi, 113		; 00000071H
  000ba	0f 95 c0	 setne	 al
  000bd	5f		 pop	 edi
  000be	c7 46 1c 00 00
	00 00		 mov	 DWORD PTR [esi+28], 0
  000c5	5e		 pop	 esi
  000c6	83 e8 01	 sub	 eax, 1
  000c9	83 e0 fd	 and	 eax, -3			; fffffffdH

; 887  : }

  000cc	c2 04 00	 ret	 4
$LN6@deflateEnd:

; 862  :     int status;
; 863  : 
; 864  :     if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;

  000cf	b8 fe ff ff ff	 mov	 eax, -2			; fffffffeH
  000d4	5e		 pop	 esi

; 887  : }

  000d5	c2 04 00	 ret	 4
_deflateEnd@4 ENDP
; Function compile flags: /Ogtpy
_TEXT	ENDS
;	COMDAT _flush_pending
_TEXT	SEGMENT
_flush_pending PROC					; COMDAT
; _strm$ = eax

; 534  : {

  00000	56		 push	 esi
  00001	8b f0		 mov	 esi, eax

; 535  :     unsigned len = strm->state->pending;

  00003	8b 46 1c	 mov	 eax, DWORD PTR [esi+28]

; 536  : 
; 537  :     if (len > strm->avail_out) len = strm->avail_out;

  00006	8b 4e 10	 mov	 ecx, DWORD PTR [esi+16]
  00009	57		 push	 edi
  0000a	8b 78 14	 mov	 edi, DWORD PTR [eax+20]
  0000d	3b f9		 cmp	 edi, ecx
  0000f	76 02		 jbe	 SHORT $LN3@flush_pend
  00011	8b f9		 mov	 edi, ecx
$LN3@flush_pend:

; 538  :     if (len == 0) return;

  00013	85 ff		 test	 edi, edi
  00015	74 35		 je	 SHORT $LN1@flush_pend

; 539  : 
; 540  :     zmemcpy(strm->next_out, strm->state->pending_out, len);

  00017	8b 40 10	 mov	 eax, DWORD PTR [eax+16]
  0001a	8b 4e 0c	 mov	 ecx, DWORD PTR [esi+12]
  0001d	57		 push	 edi
  0001e	50		 push	 eax
  0001f	51		 push	 ecx
  00020	e8 00 00 00 00	 call	 _memcpy

; 541  :     strm->next_out  += len;
; 542  :     strm->state->pending_out  += len;

  00025	8b 46 1c	 mov	 eax, DWORD PTR [esi+28]
  00028	01 7e 0c	 add	 DWORD PTR [esi+12], edi
  0002b	01 78 10	 add	 DWORD PTR [eax+16], edi

; 543  :     strm->total_out += len;

  0002e	01 7e 14	 add	 DWORD PTR [esi+20], edi

; 544  :     strm->avail_out  -= len;

  00031	29 7e 10	 sub	 DWORD PTR [esi+16], edi

; 545  :     strm->state->pending -= len;

  00034	8b 46 1c	 mov	 eax, DWORD PTR [esi+28]
  00037	29 78 14	 sub	 DWORD PTR [eax+20], edi

; 546  :     if (strm->state->pending == 0) {

  0003a	8b 76 1c	 mov	 esi, DWORD PTR [esi+28]
  0003d	83 c4 0c	 add	 esp, 12			; 0000000cH
  00040	83 7e 14 00	 cmp	 DWORD PTR [esi+20], 0
  00044	75 06		 jne	 SHORT $LN1@flush_pend

; 547  :         strm->state->pending_out = strm->state->pending_buf;

  00046	8b 56 08	 mov	 edx, DWORD PTR [esi+8]
  00049	89 56 10	 mov	 DWORD PTR [esi+16], edx
$LN1@flush_pend:
  0004c	5f		 pop	 edi
  0004d	5e		 pop	 esi

; 548  :     }
; 549  : }

  0004e	c3		 ret	 0
_flush_pending ENDP
; Function compile flags: /Ogtpy
_TEXT	ENDS
;	COMDAT _putShortMSB
_TEXT	SEGMENT
_putShortMSB PROC					; COMDAT
; _s$ = eax
; _b$ = ecx

; 521  : {

  00000	56		 push	 esi

; 522  :     put_byte(s, (Byte)(b >> 8));

  00001	8b 70 08	 mov	 esi, DWORD PTR [eax+8]
  00004	57		 push	 edi
  00005	8b 78 14	 mov	 edi, DWORD PTR [eax+20]
  00008	8b d1		 mov	 edx, ecx
  0000a	c1 ea 08	 shr	 edx, 8
  0000d	88 14 3e	 mov	 BYTE PTR [esi+edi], dl

; 523  :     put_byte(s, (Byte)(b & 0xff));

  00010	8b 78 08	 mov	 edi, DWORD PTR [eax+8]
  00013	be 01 00 00 00	 mov	 esi, 1
  00018	01 70 14	 add	 DWORD PTR [eax+20], esi
  0001b	8b 50 14	 mov	 edx, DWORD PTR [eax+20]
  0001e	88 0c 3a	 mov	 BYTE PTR [edx+edi], cl
  00021	01 70 14	 add	 DWORD PTR [eax+20], esi
  00024	5f		 pop	 edi
  00025	5e		 pop	 esi

; 524  : }

  00026	c3		 ret	 0
_putShortMSB ENDP
_TEXT	ENDS
PUBLIC	_deflatePrime@12
; Function compile flags: /Ogtpy
;	COMDAT _deflatePrime@12
_TEXT	SEGMENT
_strm$ = 8						; size = 4
_bits$ = 12						; size = 4
_value$ = 16						; size = 4
_deflatePrime@12 PROC					; COMDAT

; 409  :     if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;

  00000	8b 44 24 04	 mov	 eax, DWORD PTR _strm$[esp-4]
  00004	85 c0		 test	 eax, eax
  00006	74 30		 je	 SHORT $LN1@deflatePri
  00008	83 78 1c 00	 cmp	 DWORD PTR [eax+28], 0
  0000c	74 2a		 je	 SHORT $LN1@deflatePri

; 410  :     strm->state->bi_valid = bits;

  0000e	8b 50 1c	 mov	 edx, DWORD PTR [eax+28]
  00011	8b 4c 24 08	 mov	 ecx, DWORD PTR _bits$[esp-4]
  00015	89 8a bc 16 00
	00		 mov	 DWORD PTR [edx+5820], ecx

; 411  :     strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));

  0001b	8b 40 1c	 mov	 eax, DWORD PTR [eax+28]
  0001e	ba 01 00 00 00	 mov	 edx, 1
  00023	d3 e2		 shl	 edx, cl
  00025	83 ea 01	 sub	 edx, 1
  00028	23 54 24 0c	 and	 edx, DWORD PTR _value$[esp-4]
  0002c	66 89 90 b8 16
	00 00		 mov	 WORD PTR [eax+5816], dx

; 412  :     return Z_OK;

  00033	33 c0		 xor	 eax, eax

; 413  : }

  00035	c2 0c 00	 ret	 12			; 0000000cH
$LN1@deflatePri:

; 409  :     if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;

  00038	b8 fe ff ff ff	 mov	 eax, -2			; fffffffeH

; 413  : }

  0003d	c2 0c 00	 ret	 12			; 0000000cH
_deflatePrime@12 ENDP
; Function compile flags: /Ogtpy
;	COMDAT _read_buf
_TEXT	SEGMENT
_buf$ = 8						; size = 4
_read_buf PROC						; COMDAT
; _strm$ = esi
; _size$ = ecx

; 961  :     unsigned len = strm->avail_in;

  00000	8b 46 04	 mov	 eax, DWORD PTR [esi+4]
  00003	57		 push	 edi
  00004	8b f8		 mov	 edi, eax

; 962  : 
; 963  :     if (len > size) len = size;

  00006	3b f9		 cmp	 edi, ecx
  00008	76 02		 jbe	 SHORT $LN5@read_buf
  0000a	8b f9		 mov	 edi, ecx
$LN5@read_buf:

; 964  :     if (len == 0) return 0;

  0000c	85 ff		 test	 edi, edi
  0000e	75 04		 jne	 SHORT $LN4@read_buf
  00010	33 c0		 xor	 eax, eax
  00012	5f		 pop	 edi

; 981  : }

  00013	c3		 ret	 0
$LN4@read_buf:

; 965  : 
; 966  :     strm->avail_in  -= len;

  00014	2b c7		 sub	 eax, edi
  00016	89 46 04	 mov	 DWORD PTR [esi+4], eax

; 967  : 
; 968  :     if (strm->state->wrap == 1) {

  00019	8b 46 1c	 mov	 eax, DWORD PTR [esi+28]
  0001c	8b 40 18	 mov	 eax, DWORD PTR [eax+24]
  0001f	83 f8 01	 cmp	 eax, 1
  00022	75 0f		 jne	 SHORT $LN3@read_buf

; 969  :         strm->adler = adler32(strm->adler, strm->next_in, len);

  00024	8b 0e		 mov	 ecx, DWORD PTR [esi]
  00026	8b 56 30	 mov	 edx, DWORD PTR [esi+48]
  00029	57		 push	 edi
  0002a	51		 push	 ecx
  0002b	52		 push	 edx
  0002c	e8 00 00 00 00	 call	 _adler32@12
  00031	eb 12		 jmp	 SHORT $LN8@read_buf
$LN3@read_buf:

; 970  :     }
; 971  : #ifdef GZIP
; 972  :     else if (strm->state->wrap == 2) {

  00033	83 f8 02	 cmp	 eax, 2
  00036	75 10		 jne	 SHORT $LN1@read_buf

; 973  :         strm->adler = crc32(strm->adler, strm->next_in, len);

  00038	8b 06		 mov	 eax, DWORD PTR [esi]
  0003a	8b 4e 30	 mov	 ecx, DWORD PTR [esi+48]
  0003d	57		 push	 edi
  0003e	50		 push	 eax
  0003f	51		 push	 ecx
  00040	e8 00 00 00 00	 call	 _crc32@12
$LN8@read_buf:
  00045	89 46 30	 mov	 DWORD PTR [esi+48], eax
$LN1@read_buf:

; 974  :     }
; 975  : #endif
; 976  :     zmemcpy(buf, strm->next_in, len);

  00048	8b 16		 mov	 edx, DWORD PTR [esi]
  0004a	8b 44 24 08	 mov	 eax, DWORD PTR _buf$[esp]
  0004e	57		 push	 edi
  0004f	52		 push	 edx
  00050	50		 push	 eax
  00051	e8 00 00 00 00	 call	 _memcpy

; 977  :     strm->next_in  += len;

  00056	01 3e		 add	 DWORD PTR [esi], edi

; 978  :     strm->total_in += len;

  00058	01 7e 08	 add	 DWORD PTR [esi+8], edi
  0005b	83 c4 0c	 add	 esp, 12			; 0000000cH

; 979  : 
; 980  :     return (int)len;

  0005e	8b c7		 mov	 eax, edi
  00060	5f		 pop	 edi

; 981  : }

  00061	c3		 ret	 0
_read_buf ENDP
_TEXT	ENDS
PUBLIC	_deflateCopy@8
; Function compile flags: /Ogtpy
;	COMDAT _deflateCopy@8
_TEXT	SEGMENT
_dest$ = 8						; size = 4
_source$ = 12						; size = 4
_deflateCopy@8 PROC					; COMDAT

; 897  : {

  00000	53		 push	 ebx
  00001	55		 push	 ebp
  00002	56		 push	 esi

; 898  : #ifdef MAXSEG_64K
; 899  :     return Z_STREAM_ERROR;
; 900  : #else
; 901  :     deflate_state *ds;
; 902  :     deflate_state *ss;
; 903  :     ushf *overlay;
; 904  : 
; 905  : 
; 906  :     if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {

  00003	8b 74 24 14	 mov	 esi, DWORD PTR _source$[esp+8]
  00007	85 f6		 test	 esi, esi
  00009	0f 84 7b 01 00
	00		 je	 $LN4@deflateCop
  0000f	8b 5c 24 10	 mov	 ebx, DWORD PTR _dest$[esp+8]
  00013	85 db		 test	 ebx, ebx
  00015	0f 84 6f 01 00
	00		 je	 $LN4@deflateCop
  0001b	8b 6e 1c	 mov	 ebp, DWORD PTR [esi+28]
  0001e	85 ed		 test	 ebp, ebp
  00020	0f 84 64 01 00
	00		 je	 $LN4@deflateCop
  00026	57		 push	 edi

; 908  :     }
; 909  : 
; 910  :     ss = source->state;
; 911  : 
; 912  :     zmemcpy(dest, source, sizeof(z_stream));

  00027	b9 0e 00 00 00	 mov	 ecx, 14			; 0000000eH
  0002c	8b fb		 mov	 edi, ebx
  0002e	f3 a5		 rep movsd

; 913  : 
; 914  :     ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));

  00030	8b 43 28	 mov	 eax, DWORD PTR [ebx+40]
  00033	8b 4b 20	 mov	 ecx, DWORD PTR [ebx+32]
  00036	68 c0 16 00 00	 push	 5824			; 000016c0H
  0003b	6a 01		 push	 1
  0003d	50		 push	 eax
  0003e	ff d1		 call	 ecx
  00040	8b f0		 mov	 esi, eax
  00042	83 c4 0c	 add	 esp, 12			; 0000000cH

; 915  :     if (ds == Z_NULL) return Z_MEM_ERROR;

  00045	85 f6		 test	 esi, esi
  00047	0f 84 31 01 00
	00		 je	 $LN9@deflateCop

; 916  :     dest->state = (struct internal_state FAR *) ds;
; 917  :     zmemcpy(ds, ss, sizeof(deflate_state));

  0004d	68 c0 16 00 00	 push	 5824			; 000016c0H
  00052	55		 push	 ebp
  00053	56		 push	 esi
  00054	89 73 1c	 mov	 DWORD PTR [ebx+28], esi
  00057	e8 00 00 00 00	 call	 _memcpy

; 918  :     ds->strm = dest;
; 919  : 
; 920  :     ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));

  0005c	8b 56 2c	 mov	 edx, DWORD PTR [esi+44]
  0005f	89 1e		 mov	 DWORD PTR [esi], ebx
  00061	8b 43 28	 mov	 eax, DWORD PTR [ebx+40]
  00064	8b 4b 20	 mov	 ecx, DWORD PTR [ebx+32]
  00067	6a 02		 push	 2
  00069	52		 push	 edx
  0006a	50		 push	 eax
  0006b	ff d1		 call	 ecx

⌨️ 快捷键说明

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