?? gzio.cod
字號(hào):
0006b 8b 56 44 mov edx, DWORD PTR [esi+68]
0006e 89 16 mov DWORD PTR [esi], edx
00070 73 06 jae SHORT $LN21@check_head
00072 5f pop edi
; 308 : s->transparent = s->stream.avail_in;
00073 89 46 58 mov DWORD PTR [esi+88], eax
00076 5e pop esi
; 349 : }
00077 c3 ret 0
$LN21@check_head:
; 309 : return;
; 310 : }
; 311 : }
; 312 :
; 313 : /* Peek ahead to check the gzip magic header */
; 314 : if (s->stream.next_in[0] != gz_magic[0] ||
; 315 : s->stream.next_in[1] != gz_magic[1]) {
00078 8b 06 mov eax, DWORD PTR [esi]
0007a 80 38 1f cmp BYTE PTR [eax], 31 ; 0000001fH
0007d 0f 85 cb 00 00
00 jne $LN19@check_head
00083 80 78 01 8b cmp BYTE PTR [eax+1], 139 ; 0000008bH
00087 0f 85 c1 00 00
00 jne $LN19@check_head
; 317 : return;
; 318 : }
; 319 : s->stream.avail_in -= 2;
0008d 83 46 04 fe add DWORD PTR [esi+4], -2 ; fffffffeH
; 320 : s->stream.next_in += 2;
00091 83 c0 02 add eax, 2
00094 53 push ebx
00095 89 06 mov DWORD PTR [esi], eax
; 321 :
; 322 : /* Check the rest of the gzip header */
; 323 : method = get_byte(s);
00097 e8 00 00 00 00 call _get_byte
0009c 8b f8 mov edi, eax
; 324 : flags = get_byte(s);
0009e e8 00 00 00 00 call _get_byte
; 325 : if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
000a3 83 ff 08 cmp edi, 8
000a6 8b d8 mov ebx, eax
000a8 0f 85 95 00 00
00 jne $LN17@check_head
000ae f6 c3 e0 test bl, -32 ; ffffffe0H
000b1 0f 85 8c 00 00
00 jne $LN17@check_head
; 327 : return;
; 328 : }
; 329 :
; 330 : /* Discard time, xflags and OS code: */
; 331 : for (len = 0; len < 6; len++) (void)get_byte(s);
000b7 bf 06 00 00 00 mov edi, 6
000bc 8d 64 24 00 npad 4
$LL16@check_head:
000c0 e8 00 00 00 00 call _get_byte
000c5 83 ef 01 sub edi, 1
000c8 75 f6 jne SHORT $LL16@check_head
; 332 :
; 333 : if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
000ca f6 c3 04 test bl, 4
000cd 74 24 je SHORT $LN11@check_head
; 334 : len = (uInt)get_byte(s);
000cf e8 00 00 00 00 call _get_byte
000d4 8b f8 mov edi, eax
; 335 : len += ((uInt)get_byte(s))<<8;
000d6 e8 00 00 00 00 call _get_byte
000db c1 e0 08 shl eax, 8
000de 03 f8 add edi, eax
$LL12@check_head:
; 336 : /* len is garbage if EOF but the loop below will quit anyway */
; 337 : while (len-- != 0 && get_byte(s) != EOF) ;
000e0 8b c7 mov eax, edi
000e2 83 ef 01 sub edi, 1
000e5 85 c0 test eax, eax
000e7 74 0a je SHORT $LN11@check_head
000e9 e8 00 00 00 00 call _get_byte
000ee 83 f8 ff cmp eax, -1
000f1 75 ed jne SHORT $LL12@check_head
$LN11@check_head:
; 338 : }
; 339 : if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
000f3 f6 c3 08 test bl, 8
000f6 74 0e je SHORT $LN8@check_head
$LL9@check_head:
; 340 : while ((c = get_byte(s)) != 0 && c != EOF) ;
000f8 e8 00 00 00 00 call _get_byte
000fd 85 c0 test eax, eax
000ff 74 05 je SHORT $LN8@check_head
00101 83 f8 ff cmp eax, -1
00104 75 f2 jne SHORT $LL9@check_head
$LN8@check_head:
; 341 : }
; 342 : if ((flags & COMMENT) != 0) { /* skip the .gz file comment */
00106 f6 c3 10 test bl, 16 ; 00000010H
00109 74 13 je SHORT $LN5@check_head
0010b eb 03 8d 49 00 npad 5
$LL6@check_head:
; 343 : while ((c = get_byte(s)) != 0 && c != EOF) ;
00110 e8 00 00 00 00 call _get_byte
00115 85 c0 test eax, eax
00117 74 05 je SHORT $LN5@check_head
00119 83 f8 ff cmp eax, -1
0011c 75 f2 jne SHORT $LL6@check_head
$LN5@check_head:
; 344 : }
; 345 : if ((flags & HEAD_CRC) != 0) { /* skip the header crc */
0011e f6 c3 02 test bl, 2
00121 74 0f je SHORT $LN1@check_head
; 346 : for (len = 0; len < 2; len++) (void)get_byte(s);
00123 bf 02 00 00 00 mov edi, 2
$LL3@check_head:
00128 e8 00 00 00 00 call _get_byte
0012d 83 ef 01 sub edi, 1
00130 75 f6 jne SHORT $LL3@check_head
$LN1@check_head:
; 347 : }
; 348 : s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
00132 8b 4e 3c mov ecx, DWORD PTR [esi+60]
00135 f7 d9 neg ecx
00137 1b c9 sbb ecx, ecx
00139 5b pop ebx
0013a 83 e1 fd and ecx, -3 ; fffffffdH
0013d 5f pop edi
0013e 89 4e 38 mov DWORD PTR [esi+56], ecx
00141 5e pop esi
; 349 : }
00142 c3 ret 0
$LN17@check_head:
00143 5b pop ebx
00144 5f pop edi
; 326 : s->z_err = Z_DATA_ERROR;
00145 c7 46 38 fd ff
ff ff mov DWORD PTR [esi+56], -3 ; fffffffdH
0014c 5e pop esi
; 349 : }
0014d c3 ret 0
$LN19@check_head:
0014e 5f pop edi
; 316 : s->transparent = 1;
0014f c7 46 58 01 00
00 00 mov DWORD PTR [esi+88], 1
00156 5e pop esi
; 349 : }
00157 c3 ret 0
_check_header ENDP
; Function compile flags: /Ogtpy
; COMDAT _do_flush
_TEXT SEGMENT
_flush$ = 8 ; size = 4
_do_flush PROC ; COMDAT
; _file$ = eax
; 708 : {
00000 53 push ebx
00001 56 push esi
00002 8b f0 mov esi, eax
; 709 : uInt len;
; 710 : int done = 0;
00004 33 db xor ebx, ebx
; 711 : gz_stream *s = (gz_stream*)file;
; 712 :
; 713 : if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
00006 85 f6 test esi, esi
00008 0f 84 a6 00 00
00 je $LN8@do_flush
0000e 80 7e 5c 77 cmp BYTE PTR [esi+92], 119 ; 00000077H
00012 0f 85 9c 00 00
00 jne $LN8@do_flush
; 714 :
; 715 : s->stream.avail_in = 0; /* should be zero already anyway */
00018 89 5e 04 mov DWORD PTR [esi+4], ebx
0001b 57 push edi
0001c 8d 64 24 00 npad 4
$LL7@do_flush:
; 716 :
; 717 : for (;;) {
; 718 : len = Z_BUFSIZE - s->stream.avail_out;
00020 bf 00 40 00 00 mov edi, 16384 ; 00004000H
00025 2b 7e 10 sub edi, DWORD PTR [esi+16]
; 719 :
; 720 : if (len != 0) {
00028 74 25 je SHORT $LN5@do_flush
; 721 : if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
0002a 8b 46 40 mov eax, DWORD PTR [esi+64]
0002d 8b 4e 48 mov ecx, DWORD PTR [esi+72]
00030 50 push eax
00031 57 push edi
00032 6a 01 push 1
00034 51 push ecx
00035 ff 15 00 00 00
00 call DWORD PTR __imp__fwrite
0003b 83 c4 10 add esp, 16 ; 00000010H
0003e 3b c7 cmp eax, edi
00040 75 68 jne SHORT $LN17@do_flush
; 723 : return Z_ERRNO;
; 724 : }
; 725 : s->stream.next_out = s->outbuf;
00042 8b 56 48 mov edx, DWORD PTR [esi+72]
00045 89 56 0c mov DWORD PTR [esi+12], edx
; 726 : s->stream.avail_out = Z_BUFSIZE;
00048 c7 46 10 00 40
00 00 mov DWORD PTR [esi+16], 16384 ; 00004000H
$LN5@do_flush:
; 727 : }
; 728 : if (done) break;
0004f 85 db test ebx, ebx
00051 75 45 jne SHORT $LN21@do_flush
; 729 : s->out += s->stream.avail_out;
; 730 : s->z_err = deflate(&(s->stream), flush);
00053 8b 4c 24 10 mov ecx, DWORD PTR _flush$[esp+8]
00057 8b 46 10 mov eax, DWORD PTR [esi+16]
0005a 01 46 68 add DWORD PTR [esi+104], eax
0005d 51 push ecx
0005e 56 push esi
0005f e8 00 00 00 00 call _deflate@8
; 731 : s->out -= s->stream.avail_out;
00064 8b 4e 10 mov ecx, DWORD PTR [esi+16]
00067 29 4e 68 sub DWORD PTR [esi+104], ecx
; 732 :
; 733 : /* Ignore the second of two consecutive flushes: */
; 734 : if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;
0006a 85 ff test edi, edi
0006c 89 46 38 mov DWORD PTR [esi+56], eax
0006f 75 08 jne SHORT $LN2@do_flush
00071 83 f8 fb cmp eax, -5 ; fffffffbH
00074 75 03 jne SHORT $LN2@do_flush
00076 89 7e 38 mov DWORD PTR [esi+56], edi
$LN2@do_flush:
; 735 :
; 736 : /* deflate has finished flushing only when it hasn't used up
; 737 : * all the available space in the output buffer:
; 738 : */
; 739 : done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
00079 85 c9 test ecx, ecx
0007b 75 0a jne SHORT $LN20@do_flush
0007d 83 7e 38 01 cmp DWORD PTR [esi+56], 1
00081 74 04 je SHORT $LN20@do_flush
00083 33 db xor ebx, ebx
00085 eb 05 jmp SHORT $LN13@do_flush
$LN20@do_flush:
00087 bb 01 00 00 00 mov ebx, 1
$LN13@do_flush:
; 740 :
; 741 : if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;
0008c 8b 46 38 mov eax, DWORD PTR [esi+56]
0008f 85 c0 test eax, eax
00091 74 8d je SHORT $LL7@do_flush
00093 83 f8 01 cmp eax, 1
00096 74 88 je SHORT $LL7@do_flush
$LN21@do_flush:
; 742 : }
; 743 : return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
00098 8b 76 38 mov esi, DWORD PTR [esi+56]
0009b 8b c6 mov eax, esi
0009d 83 e8 01 sub eax, 1
000a0 f7 d8 neg eax
000a2 1b c0 sbb eax, eax
000a4 5f pop edi
000a5 23 c6 and eax, esi
000a7 5e pop esi
000a8 5b pop ebx
; 744 : }
000a9 c3 ret 0
$LN17@do_flush:
; 722 : s->z_err = Z_ERRNO;
000aa 83 c8 ff or eax, -1
000ad 5f pop edi
000ae 89 46 38 mov DWORD PTR [esi+56], eax
000b1 5e pop esi
000b2 5b pop ebx
; 744 : }
000b3 c3 ret 0
$LN8@do_flush:
000b4 5e pop esi
; 711 : gz_stream *s = (gz_stream*)file;
; 712 :
; 713 : if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
000b5 b8 fe ff ff ff mov eax, -2 ; fffffffeH
000ba 5b pop ebx
; 744 : }
000bb c3 ret 0
_do_flush ENDP
_TEXT ENDS
PUBLIC _gzwrite@12
; Function compile flags: /Ogtpy
; COMDAT _gzwrite@12
_TEXT SEGMENT
_file$ = 8 ; size = 4
_buf$ = 12 ; size = 4
_len$ = 16 ; size = 4
_gzwrite@12 PROC ; COMDAT
; 563 : {
00000 56 push esi
; 564 : gz_stream *s = (gz_stream*)file;
; 565 :
; 566 : if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
00001 8b 74 24 08 mov esi, DWORD PTR _file$[esp]
00005 85 f6 test esi, esi
00007 0f 84 9b 00 00
00 je $LN6@gzwrite
0000d 80 7e 5c 77 cmp BYTE PTR [esi+92], 119 ; 00000077H
00011 0f 85 91 00 00
00 jne $LN6@gzwrite
; 567 :
; 568 : s->stream.next_in = (Bytef*)buf;
00017 8b 44 24 0c mov eax, DWORD PTR _buf$[esp]
0001b 53 push ebx
; 569 : s->stream.avail_in = len;
0001c 8b 5c 24 14 mov ebx, DWORD PTR _len$[esp+4]
; 570 :
; 571 : while (s->stream.avail_in != 0) {
00020 85 db test ebx, ebx
00022 89 06 mov DWORD PTR [esi], eax
00024 89 5e 04 mov DWORD PTR [esi+4], ebx
00027 74 63 je SHORT $LN14@gzwrite
00029 57 push edi
0002a 8b 3d 00 00 00
00 mov edi, DWORD PTR __imp__fwrite
$LL5@gzwrite:
; 572 :
; 573 : if (s->stream.avail_out == 0) {
00030 83 7e 10 00 cmp DWORD PTR [esi+16], 0
00034 75 21 jne SHORT $LN3@gzwrite
; 574 :
; 575 : s->stream.next_out = s->outbuf;
; 576 : if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
00036 8b 4e 40 mov ecx, DWORD PTR [esi+64]
00039 8b 46 48 mov eax, DWORD PTR [esi+72]
0003c 51 push ecx
0003d 68 00 40 00 00 push 16384 ; 00004000H
00042 6a 01 push 1
00044 50 push eax
00045 89 46 0c mov DWORD PTR [esi+12], eax
00048 ff d7 call edi
0004a 83 c4 10 add esp, 16 ; 00000010H
0004d 3d 00 40 00 00 cmp eax, 16384 ; 00004000H
00052 75 30 jne SHORT $LN11@gzwrite
; 578 : break;
; 579 : }
; 580 : s->stream.avail_out = Z_BUFSIZE;
00054 89 46 10 mov DWORD PTR [esi+16], eax
$LN3@gzwrite:
; 581 : }
; 582 : s->in += s->stream.avail_in;
00057 8b 56 04 mov edx, DWORD PTR [esi+4]
; 583 : s->out += s->stream.avail_out;
0005a 8b 46 10 mov eax, DWORD PTR [esi+16]
0005d 01 56 64 add DWORD PTR [esi+100], edx
00060 01 46 68 add DWORD PTR [esi+104], eax
; 584 : s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
00063 6a 00 push 0
00065 56 push esi
00066 e8 00 00 00 00 call _deflate@8
; 585 : s->in -= s->stream.avail_in;
0006b 8b 4e 04 mov ecx, DWORD PTR [esi+4]
; 586 : s->out -= s->stream.avail_out;
0006e 8b 56 10 mov edx, DWORD PTR [esi+16]
00071 29 4e 64 sub DWORD PTR [esi+100], ecx
00074 29 56 68 sub DWORD PTR [esi+104], edx
; 587 : if (s->z_err != Z_OK) break;
00077 85 c0 test eax, eax
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -