📄 deflate.cod
字号:
00184 f7 d9 neg ecx
00186 1a c9 sbb cl, cl
00188 83 e1 04 and ecx, 4
0018b 02 d1 add dl, cl
0018d 83 38 00 cmp DWORD PTR [eax], 0
00190 8b 4e 08 mov ecx, DWORD PTR [esi+8]
00193 0f 95 c0 setne al
00196 02 d0 add dl, al
00198 88 14 29 mov BYTE PTR [ecx+ebp], dl
0019b 01 5e 14 add DWORD PTR [esi+20], ebx
0019e 8b 46 14 mov eax, DWORD PTR [esi+20]
; 603 : put_byte(s, (Byte)(s->gzhead->time & 0xff));
001a1 8b 56 1c mov edx, DWORD PTR [esi+28]
001a4 0f b6 52 04 movzx edx, BYTE PTR [edx+4]
001a8 8b 4e 08 mov ecx, DWORD PTR [esi+8]
001ab 88 14 08 mov BYTE PTR [eax+ecx], dl
001ae 01 5e 14 add DWORD PTR [esi+20], ebx
; 604 : put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
001b1 8b 4e 1c mov ecx, DWORD PTR [esi+28]
001b4 0f b6 49 05 movzx ecx, BYTE PTR [ecx+5]
001b8 8b 46 14 mov eax, DWORD PTR [esi+20]
001bb 8b 56 08 mov edx, DWORD PTR [esi+8]
001be 88 0c 10 mov BYTE PTR [eax+edx], cl
001c1 01 5e 14 add DWORD PTR [esi+20], ebx
; 605 : put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
001c4 8b 56 1c mov edx, DWORD PTR [esi+28]
001c7 0f b6 52 06 movzx edx, BYTE PTR [edx+6]
001cb 8b 46 14 mov eax, DWORD PTR [esi+20]
001ce 8b 4e 08 mov ecx, DWORD PTR [esi+8]
001d1 88 14 08 mov BYTE PTR [eax+ecx], dl
001d4 01 5e 14 add DWORD PTR [esi+20], ebx
; 606 : put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
001d7 8b 4e 1c mov ecx, DWORD PTR [esi+28]
001da 0f b6 49 07 movzx ecx, BYTE PTR [ecx+7]
001de 8b 46 14 mov eax, DWORD PTR [esi+20]
001e1 8b 56 08 mov edx, DWORD PTR [esi+8]
001e4 88 0c 10 mov BYTE PTR [eax+edx], cl
001e7 01 5e 14 add DWORD PTR [esi+20], ebx
; 607 : put_byte(s, s->level == 9 ? 2 :
; 608 : (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
; 609 : 4 : 0));
001ea 8b 86 84 00 00
00 mov eax, DWORD PTR [esi+132]
001f0 83 f8 09 cmp eax, 9
001f3 8b 4e 14 mov ecx, DWORD PTR [esi+20]
001f6 75 07 jne SHORT $LN90@deflate
001f8 b8 02 00 00 00 mov eax, 2
001fd eb 17 jmp SHORT $LN89@deflate
$LN90@deflate:
001ff 83 be 88 00 00
00 02 cmp DWORD PTR [esi+136], 2
00206 7d 09 jge SHORT $LN88@deflate
00208 83 f8 02 cmp eax, 2
0020b 7c 04 jl SHORT $LN88@deflate
0020d 33 c0 xor eax, eax
0020f eb 05 jmp SHORT $LN89@deflate
$LN88@deflate:
00211 b8 04 00 00 00 mov eax, 4
$LN89@deflate:
00216 8b 56 08 mov edx, DWORD PTR [esi+8]
00219 88 04 11 mov BYTE PTR [ecx+edx], al
0021c 01 5e 14 add DWORD PTR [esi+20], ebx
; 610 : put_byte(s, s->gzhead->os & 0xff);
0021f 8b 4e 1c mov ecx, DWORD PTR [esi+28]
00222 8b 46 14 mov eax, DWORD PTR [esi+20]
00225 8a 49 0c mov cl, BYTE PTR [ecx+12]
00228 8b 56 08 mov edx, DWORD PTR [esi+8]
0022b 88 0c 10 mov BYTE PTR [eax+edx], cl
0022e 01 5e 14 add DWORD PTR [esi+20], ebx
; 611 : if (s->gzhead->extra != NULL) {
00231 8b 46 1c mov eax, DWORD PTR [esi+28]
00234 83 78 10 00 cmp DWORD PTR [eax+16], 0
00238 8b 4e 14 mov ecx, DWORD PTR [esi+20]
0023b 74 21 je SHORT $LN71@deflate
; 612 : put_byte(s, s->gzhead->extra_len & 0xff);
0023d 8a 40 14 mov al, BYTE PTR [eax+20]
00240 8b 56 08 mov edx, DWORD PTR [esi+8]
00243 88 04 11 mov BYTE PTR [ecx+edx], al
00246 01 5e 14 add DWORD PTR [esi+20], ebx
; 613 : put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
00249 8b 4e 1c mov ecx, DWORD PTR [esi+28]
0024c 8a 49 15 mov cl, BYTE PTR [ecx+21]
0024f 8b 46 14 mov eax, DWORD PTR [esi+20]
00252 8b 56 08 mov edx, DWORD PTR [esi+8]
00255 88 0c 10 mov BYTE PTR [eax+edx], cl
00258 01 5e 14 add DWORD PTR [esi+20], ebx
0025b 8b 4e 14 mov ecx, DWORD PTR [esi+20]
$LN71@deflate:
; 614 : }
; 615 : if (s->gzhead->hcrc)
0025e 8b 56 1c mov edx, DWORD PTR [esi+28]
00261 83 7a 2c 00 cmp DWORD PTR [edx+44], 0
00265 74 11 je SHORT $LN70@deflate
; 616 : strm->adler = crc32(strm->adler, s->pending_buf,
; 617 : s->pending);
00267 8b 46 08 mov eax, DWORD PTR [esi+8]
0026a 51 push ecx
0026b 8b 4f 30 mov ecx, DWORD PTR [edi+48]
0026e 50 push eax
0026f 51 push ecx
00270 e8 00 00 00 00 call _crc32@12
00275 89 47 30 mov DWORD PTR [edi+48], eax
$LN70@deflate:
; 618 : s->gzindex = 0;
00278 c7 46 20 00 00
00 00 mov DWORD PTR [esi+32], 0
; 619 : s->status = EXTRA_STATE;
0027f c7 46 04 45 00
00 00 mov DWORD PTR [esi+4], 69 ; 00000045H
; 620 : }
; 621 : }
; 622 : else
00286 e9 93 00 00 00 jmp $LN69@deflate
$LN74@deflate:
; 623 : #endif
; 624 : {
; 625 : uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
0028b 8b 4e 30 mov ecx, DWORD PTR [esi+48]
0028e 83 e9 08 sub ecx, 8
00291 c1 e1 0c shl ecx, 12 ; 0000000cH
00294 81 c1 00 08 00
00 add ecx, 2048 ; 00000800H
; 626 : uInt level_flags;
; 627 :
; 628 : if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
0029a 39 86 88 00 00
00 cmp DWORD PTR [esi+136], eax
002a0 7d 1f jge SHORT $LN67@deflate
002a2 8b ae 84 00 00
00 mov ebp, DWORD PTR [esi+132]
002a8 3b e8 cmp ebp, eax
002aa 7c 15 jl SHORT $LN67@deflate
; 630 : else if (s->level < 6)
002ac 83 fd 06 cmp ebp, 6
002af 7d 04 jge SHORT $LN65@deflate
; 631 : level_flags = 1;
002b1 8b c3 mov eax, ebx
002b3 eb 0e jmp SHORT $LN62@deflate
$LN65@deflate:
; 632 : else if (s->level == 6)
002b5 33 d2 xor edx, edx
002b7 83 fd 06 cmp ebp, 6
002ba 0f 95 c2 setne dl
002bd 03 c2 add eax, edx
; 633 : level_flags = 2;
; 634 : else
; 635 : level_flags = 3;
002bf eb 02 jmp SHORT $LN62@deflate
$LN67@deflate:
; 629 : level_flags = 0;
002c1 33 c0 xor eax, eax
$LN62@deflate:
; 636 : header |= (level_flags << 6);
002c3 c1 e0 06 shl eax, 6
002c6 0b c8 or ecx, eax
; 637 : if (s->strstart != 0) header |= PRESET_DICT;
002c8 83 7e 6c 00 cmp DWORD PTR [esi+108], 0
002cc 74 03 je SHORT $LN61@deflate
002ce 83 c9 20 or ecx, 32 ; 00000020H
$LN61@deflate:
; 638 : header += 31 - (header % 31);
002d1 b8 85 10 42 08 mov eax, 138547333 ; 08421085H
002d6 f7 e1 mul ecx
002d8 2b ca sub ecx, edx
002da d1 e9 shr ecx, 1
002dc 03 ca add ecx, edx
002de c1 e9 04 shr ecx, 4
; 639 :
; 640 : s->status = BUSY_STATE;
; 641 : putShortMSB(s, header);
002e1 03 cb add ecx, ebx
002e3 8b c1 mov eax, ecx
002e5 c1 e1 05 shl ecx, 5
002e8 2b c8 sub ecx, eax
002ea 8b c6 mov eax, esi
002ec c7 46 04 71 00
00 00 mov DWORD PTR [esi+4], 113 ; 00000071H
002f3 e8 00 00 00 00 call _putShortMSB
; 642 :
; 643 : /* Save the adler32 of the preset dictionary: */
; 644 : if (s->strstart != 0) {
002f8 83 7e 6c 00 cmp DWORD PTR [esi+108], 0
002fc 74 12 je SHORT $LN60@deflate
; 645 : putShortMSB(s, (uInt)(strm->adler >> 16));
002fe 0f b7 4f 32 movzx ecx, WORD PTR [edi+50]
00302 e8 00 00 00 00 call _putShortMSB
; 646 : putShortMSB(s, (uInt)(strm->adler & 0xffff));
00307 0f b7 4f 30 movzx ecx, WORD PTR [edi+48]
0030b e8 00 00 00 00 call _putShortMSB
$LN60@deflate:
; 647 : }
; 648 : strm->adler = adler32(0L, Z_NULL, 0);
00310 6a 00 push 0
00312 6a 00 push 0
00314 6a 00 push 0
00316 e8 00 00 00 00 call _adler32@12
0031b 89 47 30 mov DWORD PTR [edi+48], eax
$LN69@deflate:
; 649 : }
; 650 : }
; 651 : #ifdef GZIP
; 652 : if (s->status == EXTRA_STATE) {
0031e 83 7e 04 45 cmp DWORD PTR [esi+4], 69 ; 00000045H
00322 0f 85 bb 00 00
00 jne $LN106@deflate
; 653 : if (s->gzhead->extra != NULL) {
00328 8b 46 1c mov eax, DWORD PTR [esi+28]
0032b 83 78 10 00 cmp DWORD PTR [eax+16], 0
0032f 0f 84 a7 00 00
00 je $LN58@deflate
; 654 : uInt beg = s->pending; /* start of bytes to update crc */
; 655 :
; 656 : while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
00335 0f b7 40 14 movzx eax, WORD PTR [eax+20]
00339 39 46 20 cmp DWORD PTR [esi+32], eax
0033c 8b 4e 14 mov ecx, DWORD PTR [esi+20]
0033f 73 64 jae SHORT $LN95@deflate
$LL57@deflate:
; 657 : if (s->pending == s->pending_buf_size) {
00341 8b 46 14 mov eax, DWORD PTR [esi+20]
00344 3b 46 0c cmp eax, DWORD PTR [esi+12]
00347 75 33 jne SHORT $LN53@deflate
; 658 : if (s->gzhead->hcrc && s->pending > beg)
00349 8b 56 1c mov edx, DWORD PTR [esi+28]
0034c 83 7a 2c 00 cmp DWORD PTR [edx+44], 0
00350 74 19 je SHORT $LN54@deflate
00352 3b c1 cmp eax, ecx
00354 76 15 jbe SHORT $LN54@deflate
; 659 : strm->adler = crc32(strm->adler, s->pending_buf + beg,
; 660 : s->pending - beg);
00356 2b c1 sub eax, ecx
00358 50 push eax
00359 8b 46 08 mov eax, DWORD PTR [esi+8]
0035c 03 c1 add eax, ecx
0035e 8b 4f 30 mov ecx, DWORD PTR [edi+48]
00361 50 push eax
00362 51 push ecx
00363 e8 00 00 00 00 call _crc32@12
00368 89 47 30 mov DWORD PTR [edi+48], eax
$LN54@deflate:
; 661 : flush_pending(strm);
0036b 8b c7 mov eax, edi
0036d e8 00 00 00 00 call _flush_pending
; 662 : beg = s->pending;
00372 8b 46 14 mov eax, DWORD PTR [esi+20]
; 663 : if (s->pending == s->pending_buf_size)
00375 3b 46 0c cmp eax, DWORD PTR [esi+12]
00378 8b c8 mov ecx, eax
0037a 74 29 je SHORT $LN95@deflate
$LN53@deflate:
; 664 : break;
; 665 : }
; 666 : put_byte(s, s->gzhead->extra[s->gzindex]);
0037c 8b 56 1c mov edx, DWORD PTR [esi+28]
0037f 8b 52 10 mov edx, DWORD PTR [edx+16]
00382 8b 5e 20 mov ebx, DWORD PTR [esi+32]
00385 8a 14 1a mov dl, BYTE PTR [edx+ebx]
00388 8b 6e 08 mov ebp, DWORD PTR [esi+8]
0038b 88 14 28 mov BYTE PTR [eax+ebp], dl
0038e b8 01 00 00 00 mov eax, 1
00393 01 46 14 add DWORD PTR [esi+20], eax
; 667 : s->gzindex++;
00396 01 46 20 add DWORD PTR [esi+32], eax
00399 8b 46 1c mov eax, DWORD PTR [esi+28]
0039c 0f b7 50 14 movzx edx, WORD PTR [eax+20]
003a0 39 56 20 cmp DWORD PTR [esi+32], edx
003a3 72 9c jb SHORT $LL57@deflate
$LN95@deflate:
; 668 : }
; 669 : if (s->gzhead->hcrc && s->pending > beg)
003a5 8b 46 1c mov eax, DWORD PTR [esi+28]
003a8 83 78 2c 00 cmp DWORD PTR [eax+44], 0
003ac 74 1c je SHORT $LN52@deflate
003ae 8b 46 14 mov eax, DWORD PTR [esi+20]
003b1 3b c1 cmp eax, ecx
003b3 76 15 jbe SHORT $LN52@deflate
; 670 : strm->adler = crc32(strm->adler, s->pending_buf + beg,
; 671 : s->pending - beg);
003b5 8b 56 08 mov edx, DWORD PTR [esi+8]
003b8 2b c1 sub eax, ecx
003ba 50 push eax
003bb 8b 47 30 mov eax, DWORD PTR [edi+48]
003be 03 d1 add edx, ecx
003c0 52 push edx
003c1 50 push eax
003c2 e8 00 00 00 00 call _crc32@12
003c7 89 47 30 mov DWORD PTR [edi+48], eax
$LN52@deflate:
; 672 : if (s->gzindex == s->gzhead->extra_len) {
003ca 8b 4e 1c mov ecx, DWORD PTR [esi+28]
003cd 8b 56 20 mov edx, DWORD PTR [esi+32]
003d0 3b 51 14 cmp edx, DWORD PTR [ecx+20]
003d3 75 0e jne SHORT $LN106@deflate
; 673 : s->gzindex = 0;
003d5 c7 46 20 00 00
00 00 mov DWORD PTR [esi+32], 0
$LN58@deflate:
; 674 : s->status = NAME_STATE;
; 675 : }
; 676 : }
; 677 : else
; 678 : s->status = NAME_STATE;
003dc c7 46 04 49 00
00 00 mov DWORD PTR [esi+4], 73 ; 00000049H
$LN106@deflate:
; 679 : }
; 680 : if (s->status == NAME_STATE) {
003e3 83 7e 04 49 cmp DWORD PTR [esi+4], 73 ; 00000049H
; 681 : if (s->gzhead->name != NULL) {
; 682 : uInt beg = s->pending; /* start of bytes to update crc */
003e7 bd 01 00 00 00 mov ebp, 1
003ec 0f 85 a1 00 00
00 jne $LN39@deflate
003f2 8b 46 1c mov eax, DWORD PTR [esi+28]
003f5 83 78 1c 00 cmp DWORD PTR [eax+28], 0
003f9 0f 84 8d 00 00
00 je $LN48@deflate
003ff 8b 56 14 mov edx, DWORD PTR [esi+20]
$LL47@deflate:
; 683 : int val;
; 684 :
; 685 : do {
; 686 : if (s->pending == s->pending_buf_size) {
00402 8b 46 14 mov eax, DWORD PTR [esi+20]
00405 3b 46 0c cmp eax, DWORD PTR [esi+12]
00408 75 33 jne SHORT $LN42@deflate
; 687 : if (s->gzhead->hcrc && s->pending > beg)
0040a 8b 4e 1c mov ecx, DWORD PTR [esi+28]
0040d 83 79 2c 00 cmp DWORD PTR [ecx+44], 0
00411 74 19 je SHORT $LN43@deflate
00413 3b c2 cmp eax, edx
00415 76 15 jbe SHORT $LN43@deflate
; 688 : strm->adler = crc32(strm->adler, s->pending_buf + beg,
; 689 : s->pending - beg);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -