📄 infback.cod
字号:
00 00 mov DWORD PTR [esi+36], OFFSET _zcfree
$LN2@inflateBac@2:
; 49 : state = (struct inflate_state FAR *)ZALLOC(strm, 1,
; 50 : sizeof(struct inflate_state));
00064 8b 4e 28 mov ecx, DWORD PTR [esi+40]
00067 8b 56 20 mov edx, DWORD PTR [esi+32]
0006a 68 30 25 00 00 push 9520 ; 00002530H
0006f 6a 01 push 1
00071 51 push ecx
00072 ff d2 call edx
00074 83 c4 0c add esp, 12 ; 0000000cH
; 51 : if (state == Z_NULL) return Z_MEM_ERROR;
00077 3b c3 cmp eax, ebx
00079 75 0c jne SHORT $LN1@inflateBac@2
0007b 5f pop edi
0007c 5e pop esi
0007d 5d pop ebp
0007e b8 fc ff ff ff mov eax, -4 ; fffffffcH
00083 5b pop ebx
; 61 : }
00084 c2 14 00 ret 20 ; 00000014H
$LN1@inflateBac@2:
; 52 : Tracev((stderr, "inflate: allocated\n"));
; 53 : strm->state = (struct internal_state FAR *)state;
00087 89 46 1c mov DWORD PTR [esi+28], eax
; 54 : state->dmax = 32768U;
; 55 : state->wbits = windowBits;
; 56 : state->wsize = 1U << windowBits;
0008a 8b cf mov ecx, edi
0008c 89 78 24 mov DWORD PTR [eax+36], edi
0008f ba 01 00 00 00 mov edx, 1
00094 5f pop edi
00095 d3 e2 shl edx, cl
00097 5e pop esi
; 57 : state->window = window;
00098 89 68 34 mov DWORD PTR [eax+52], ebp
; 58 : state->write = 0;
0009b 89 58 30 mov DWORD PTR [eax+48], ebx
; 59 : state->whave = 0;
0009e 89 58 2c mov DWORD PTR [eax+44], ebx
000a1 5d pop ebp
000a2 c7 40 14 00 80
00 00 mov DWORD PTR [eax+20], 32768 ; 00008000H
000a9 89 50 28 mov DWORD PTR [eax+40], edx
; 60 : return Z_OK;
000ac 33 c0 xor eax, eax
000ae 5b pop ebx
; 61 : }
000af c2 14 00 ret 20 ; 00000014H
$LN4@inflateBac@2:
000b2 5f pop edi
000b3 5e pop esi
000b4 5d pop ebp
; 42 : return Z_STREAM_ERROR;
000b5 b8 fe ff ff ff mov eax, -2 ; fffffffeH
000ba 5b pop ebx
; 61 : }
000bb c2 14 00 ret 20 ; 00000014H
$LN6@inflateBac@2:
; 39 : return Z_VERSION_ERROR;
000be b8 fa ff ff ff mov eax, -6 ; fffffffaH
000c3 5b pop ebx
; 61 : }
000c4 c2 14 00 ret 20 ; 00000014H
_inflateBackInit_@20 ENDP
PUBLIC _inflateBack@20
; Function compile flags: /Ogtpy
; COMDAT _inflateBack@20
_TEXT SEGMENT
_next$ = -24 ; size = 4
_left$ = -20 ; size = 4
_put$ = -16 ; size = 4
tv1438 = -12 ; size = 4
_last$ = -12 ; size = 4
_len$ = -12 ; size = 4
_this$ = -12 ; size = 4
_copy$ = -12 ; size = 4
tv1421 = -8 ; size = 4
tv1420 = -4 ; size = 4
_from$ = -4 ; size = 4
_strm$ = 8 ; size = 4
_in$ = 12 ; size = 4
_in_desc$ = 16 ; size = 4
_out$ = 20 ; size = 4
_out_desc$ = 24 ; size = 4
_inflateBack@20 PROC ; COMDAT
; 248 : struct inflate_state FAR *state;
; 249 : unsigned char FAR *next; /* next input */
; 250 : unsigned char FAR *put; /* next output */
; 251 : unsigned have, left; /* available input and output */
; 252 : unsigned long hold; /* bit buffer */
; 253 : unsigned bits; /* bits in bit buffer */
; 254 : unsigned copy; /* number of stored or match bytes to copy */
; 255 : unsigned char FAR *from; /* where to copy match bytes from */
; 256 : code this; /* current decoding table entry */
; 257 : code last; /* parent table entry */
; 258 : unsigned len; /* length to copy for repeats, bits to drop */
; 259 : int ret; /* return code */
; 260 : static const unsigned short order[19] = /* permutation of code lengths */
; 261 : {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
; 262 :
; 263 : /* Check that the strm exists and that the state was initialized */
; 264 : if (strm == Z_NULL || strm->state == Z_NULL)
00000 8b 44 24 04 mov eax, DWORD PTR _strm$[esp-4]
00004 83 ec 18 sub esp, 24 ; 00000018H
00007 56 push esi
00008 33 f6 xor esi, esi
0000a 3b c6 cmp eax, esi
0000c 57 push edi
0000d 0f 84 4b 0d 00
00 je $LN345@inflateBac@3
00013 8b 78 1c mov edi, DWORD PTR [eax+28]
00016 3b fe cmp edi, esi
00018 0f 84 40 0d 00
00 je $LN345@inflateBac@3
; 266 : state = (struct inflate_state FAR *)strm->state;
; 267 :
; 268 : /* Reset the state */
; 269 : strm->msg = Z_NULL;
0001e 89 70 18 mov DWORD PTR [eax+24], esi
; 270 : state->mode = TYPE;
00021 c7 07 0b 00 00
00 mov DWORD PTR [edi], 11 ; 0000000bH
; 271 : state->last = 0;
00027 89 77 04 mov DWORD PTR [edi+4], esi
; 272 : state->whave = 0;
0002a 89 77 2c mov DWORD PTR [edi+44], esi
; 273 : next = strm->next_in;
0002d 8b 08 mov ecx, DWORD PTR [eax]
; 274 : have = next != Z_NULL ? strm->avail_in : 0;
0002f 3b ce cmp ecx, esi
00031 53 push ebx
00032 55 push ebp
00033 89 4c 24 10 mov DWORD PTR _next$[esp+40], ecx
00037 74 05 je SHORT $LN349@inflateBac@3
00039 8b 68 04 mov ebp, DWORD PTR [eax+4]
0003c eb 02 jmp SHORT $LN350@inflateBac@3
$LN349@inflateBac@3:
0003e 33 ed xor ebp, ebp
$LN350@inflateBac@3:
; 275 : hold = 0;
; 276 : bits = 0;
; 277 : put = state->window;
00040 8b 47 34 mov eax, DWORD PTR [edi+52]
; 278 : left = state->wsize;
00043 8b 4f 28 mov ecx, DWORD PTR [edi+40]
00046 89 44 24 18 mov DWORD PTR _put$[esp+40], eax
; 279 :
; 280 : /* Inflate until end of block marked as last */
; 281 : for (;;)
; 282 : switch (state->mode) {
0004a 8b 07 mov eax, DWORD PTR [edi]
0004c 83 e8 0b sub eax, 11 ; 0000000bH
0004f 33 db xor ebx, ebx
00051 83 f8 10 cmp eax, 16 ; 00000010H
00054 89 4c 24 14 mov DWORD PTR _left$[esp+40], ecx
00058 0f 87 9e 0c 00
00 ja $LN1@inflateBac@3
0005e 8b ff npad 2
$LL344@inflateBac@3:
00060 0f b6 90 00 00
00 00 movzx edx, BYTE PTR $LN429@inflateBac@3[eax]
00067 ff 24 95 00 00
00 00 jmp DWORD PTR $LN469@inflateBac@3[edx*4]
$LN340@inflateBac@3:
; 283 : case TYPE:
; 284 : /* determine and dispatch block type */
; 285 : if (state->last) {
0006e 83 7f 04 00 cmp DWORD PTR [edi+4], 0
00072 74 14 je SHORT $LN335@inflateBac@3
; 286 : BYTEBITS();
00074 8b ce mov ecx, esi
00076 83 e1 07 and ecx, 7
00079 d3 eb shr ebx, cl
0007b 2b f1 sub esi, ecx
; 287 : state->mode = DONE;
0007d c7 07 1a 00 00
00 mov DWORD PTR [edi], 26 ; 0000001aH
; 288 : break;
00083 e9 66 0c 00 00 jmp $LN453@inflateBac@3
$LN335@inflateBac@3:
; 289 : }
; 290 : NEEDBITS(3);
00088 83 fe 03 cmp esi, 3
0008b 73 41 jae SHORT $LN334@inflateBac@3
0008d 8d 49 00 npad 3
$LL332@inflateBac@3:
00090 85 ed test ebp, ebp
00092 75 1b jne SHORT $LN326@inflateBac@3
00094 8b 4c 24 34 mov ecx, DWORD PTR _in_desc$[esp+36]
00098 8d 44 24 10 lea eax, DWORD PTR _next$[esp+40]
0009c 50 push eax
0009d 51 push ecx
0009e ff 54 24 38 call DWORD PTR _in$[esp+44]
000a2 8b e8 mov ebp, eax
000a4 83 c4 08 add esp, 8
000a7 85 ed test ebp, ebp
000a9 0f 84 6b 0c 00
00 je $LN376@inflateBac@3
$LN326@inflateBac@3:
000af 8b 44 24 10 mov eax, DWORD PTR _next$[esp+40]
000b3 0f b6 10 movzx edx, BYTE PTR [eax]
000b6 8b ce mov ecx, esi
000b8 d3 e2 shl edx, cl
000ba 83 c0 01 add eax, 1
000bd 83 c6 08 add esi, 8
000c0 83 ed 01 sub ebp, 1
000c3 03 da add ebx, edx
000c5 83 fe 03 cmp esi, 3
000c8 89 44 24 10 mov DWORD PTR _next$[esp+40], eax
000cc 72 c2 jb SHORT $LL332@inflateBac@3
$LN334@inflateBac@3:
; 291 : state->last = BITS(1);
000ce 8b c3 mov eax, ebx
000d0 83 e0 01 and eax, 1
; 292 : DROPBITS(1);
000d3 d1 eb shr ebx, 1
000d5 89 47 04 mov DWORD PTR [edi+4], eax
; 293 : switch (BITS(2)) {
000d8 8b c3 mov eax, ebx
000da 83 e0 03 and eax, 3
000dd 83 ee 01 sub esi, 1
000e0 83 f8 03 cmp eax, 3
000e3 77 52 ja SHORT $LN313@inflateBac@3
000e5 ff 24 85 00 00
00 00 jmp DWORD PTR $LN470@inflateBac@3[eax*4]
$LN317@inflateBac@3:
; 313 : }
; 314 : DROPBITS(2);
000ec c1 eb 02 shr ebx, 2
000ef c7 07 0d 00 00
00 mov DWORD PTR [edi], 13 ; 0000000dH
000f5 83 ee 02 sub esi, 2
; 315 : break;
000f8 e9 f1 0b 00 00 jmp $LN453@inflateBac@3
$LN316@inflateBac@3:
; 294 : case 0: /* stored block */
; 295 : Tracev((stderr, "inflate: stored block%s\n",
; 296 : state->last ? " (last)" : ""));
; 297 : state->mode = STORED;
; 298 : break;
; 299 : case 1: /* fixed block */
; 300 : fixedtables(state);
000fd 8b c7 mov eax, edi
000ff e8 00 00 00 00 call _fixedtables
; 313 : }
; 314 : DROPBITS(2);
00104 c1 eb 02 shr ebx, 2
00107 c7 07 12 00 00
00 mov DWORD PTR [edi], 18 ; 00000012H
0010d 83 ee 02 sub esi, 2
; 315 : break;
00110 e9 d9 0b 00 00 jmp $LN453@inflateBac@3
$LN315@inflateBac@3:
; 313 : }
; 314 : DROPBITS(2);
00115 c1 eb 02 shr ebx, 2
00118 c7 07 0f 00 00
00 mov DWORD PTR [edi], 15 ; 0000000fH
0011e 83 ee 02 sub esi, 2
; 315 : break;
00121 e9 c8 0b 00 00 jmp $LN453@inflateBac@3
$LN314@inflateBac@3:
; 301 : Tracev((stderr, "inflate: fixed codes block%s\n",
; 302 : state->last ? " (last)" : ""));
; 303 : state->mode = LEN; /* decode codes */
; 304 : break;
; 305 : case 2: /* dynamic block */
; 306 : Tracev((stderr, "inflate: dynamic codes block%s\n",
; 307 : state->last ? " (last)" : ""));
; 308 : state->mode = TABLE;
; 309 : break;
; 310 : case 3:
; 311 : strm->msg = (char *)"invalid block type";
00126 8b 4c 24 2c mov ecx, DWORD PTR _strm$[esp+36]
0012a c7 41 18 00 00
00 00 mov DWORD PTR [ecx+24], OFFSET ??_C@_0BD@PJCBIDD@invalid?5block?5type?$AA@
; 312 : state->mode = BAD;
00131 c7 07 1b 00 00
00 mov DWORD PTR [edi], 27 ; 0000001bH
$LN313@inflateBac@3:
; 313 : }
; 314 : DROPBITS(2);
00137 c1 eb 02 shr ebx, 2
0013a 83 ee 02 sub esi, 2
; 315 : break;
0013d e9 ac 0b 00 00 jmp $LN453@inflateBac@3
$LN309@inflateBac@3:
; 316 :
; 317 : case STORED:
; 318 : /* get and verify stored block length */
; 319 : BYTEBITS(); /* go to byte boundary */
00142 8b ce mov ecx, esi
00144 83 e1 07 and ecx, 7
00147 2b f1 sub esi, ecx
00149 d3 eb shr ebx, cl
; 320 : NEEDBITS(32);
0014b 83 fe 20 cmp esi, 32 ; 00000020H
0014e 73 3e jae SHORT $LN305@inflateBac@3
$LL303@inflateBac@3:
00150 85 ed test ebp, ebp
00152 75 1b jne SHORT $LN297@inflateBac@3
00154 8b 44 24 34 mov eax, DWORD PTR _in_desc$[esp+36]
00158 8d 54 24 10 lea edx, DWORD PTR _next$[esp+40]
0015c 52 push edx
0015d 50 push eax
0015e ff 54 24 38 call DWORD PTR _in$[esp+44]
00162 8b e8 mov ebp, eax
00164 83 c4 08 add esp, 8
00167 85 ed test ebp, ebp
00169 0f 84 ab 0b 00
00 je $LN376@inflateBac@3
$LN297@inflateBac@3:
0016f 8b 44 24 10 mov eax, DWORD PTR _next$[esp+40]
00173 0f b6 10 movzx edx, BYTE PTR [eax]
00176 8b ce mov ecx, esi
00178 d3 e2 shl edx, cl
0017a 83 c0 01 add eax, 1
0017d 83 c6 08 add esi, 8
00180 83 ed 01 sub ebp, 1
00183 03 da add ebx, edx
00185 83 fe 20 cmp esi, 32 ; 00000020H
00188 89 44 24 10 mov DWORD PTR _next$[esp+40], eax
0018c 72 c2 jb SHORT $LL303@inflateBac@3
$LN305@inflateBac@3:
; 321 : if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
0018e 8b cb mov ecx, ebx
00190 8b c3 mov eax, ebx
00192 f7 d1 not ecx
00194 25 ff ff 00 00 and eax, 65535 ; 0000ffffH
00199 c1 e9 10 shr ecx, 16 ; 00000010H
0019c 3b c1 cmp eax, ecx
0019e 74 16 je SHORT $LN293@inflateBac@3
; 322 : strm->msg = (char *)"invalid stored block lengths";
001a0 8b 54 24 2c mov edx, DWORD PTR _strm$[esp+36]
001a4 c7 42 18 00 00
00 00 mov DWORD PTR [edx+24], OFFSET ??_C@_0BN@LGAADGOK@invalid?5stored?5block?5lengths?$AA@
; 323 : state->mode = BAD;
001ab c7 07 1b 00 00
00 mov DWORD PTR [edi], 27 ; 0000001bH
; 324 : break;
001b1 e9 38 0b 00 00 jmp $LN453@inflateBac@3
$LN293@inflateBac@3:
; 325 : }
; 326 : state->length = (unsigned)hold & 0xffff;
; 327 : Tracev((stderr, "inflate: stored length %u\n",
; 328 : state->length));
; 329 : INITBITS();
001b6 33 db xor ebx, ebx
001b8 33 f6 xor esi, esi
; 330 :
; 331 : /* copy stored block from input to output */
; 332 : while (state->length != 0) {
001ba 85 c0 test eax, eax
001bc 89 47 40 mov DWORD PTR [edi+64], eax
001bf 0f 84 a4 00 00
00 je $LN288@inflateBac@3
$LL289@inflateBac@3:
; 333 : copy = state->length;
; 334 : PULL();
001c5 85 ed test ebp, ebp
001c7 8b 47 40 mov eax, DWORD PTR [edi+64]
001ca 89 44 24 1c mov DWORD PTR _copy$[esp+40], eax
001ce 75 1b jne SHORT $LN286@inflateBac@3
001d0 8b 54 24 34 mov edx, DWORD PTR _in_desc$[esp+36]
001d4 8d 4c 24 10 lea ecx, DWORD PTR _next$[esp+40]
001d8 51 push ecx
001d9 52 push edx
001da ff 54 24 38 call DWORD PTR _in$[esp+44]
001de 8b e8 mov ebp, eax
001e0 83 c4 08 add esp, 8
001e3 85 ed test ebp, ebp
001e5 0f 84 2f 0b 00
00 je $LN376@inflateBac@3
$LN286@inflateBac@3:
; 335 : ROOM();
001eb 83 7c 24 14 00 cmp DWORD PTR _left$[esp+40], 0
001f0 75 27 jne SHORT $LN281@inflateBac@3
001f2 8b 47 28 mov eax, DWORD PTR [edi+40]
001f5 8b 4f 34 mov ecx, DWORD PTR [edi+52]
001f8 50 push eax
001f9 89 44 24 18 mov DWORD PTR _left$[esp+44], eax
001fd 89 47 2c mov DWORD PTR [edi+44], eax
00200 8b 44 24 40 mov eax, DWORD PTR _out_desc$[esp+40]
00204 51 push ecx
00205 50 push eax
00206 89 4c 24 24 mov DWORD PTR _put$[esp+52], ecx
0020a ff 54 24 44 call DWORD PTR _out$[esp+48]
0020e 83 c4 0c add esp, 12 ; 0000000cH
00211 85 c0 test eax, eax
00213 0f 85 09 0b 00
00 jne $LN379@inflateBac@3
$LN281@inflateBac@3:
; 336 : if (copy > have) copy = have;
00219 8b 44 24 1c mov eax, DWORD PTR _copy$[esp+40]
0021d 3b c5 cmp eax, ebp
0021f 76 06 jbe SHORT $LN277@inflateBac@3
00221 8b c5 mov eax, ebp
00223 89 6c 24 1c mov DWORD PTR _copy$[esp+40], ebp
$LN277@inflateBac@3:
; 337 : if (copy > left) copy = left;
00227 8b 4c 24 14 mov ecx, DWORD PTR _left$[esp+40]
0022b 3b c1 cmp eax, ecx
0022d 76 04 jbe SHORT $LN276@inflateBac@3
0022f 89 4c 24 1c mov DWORD PTR _copy$[esp+40], ecx
$LN276@inflateBac@3:
; 338 : zmemcpy(put, next, copy);
00233 8b 4c 24 1c mov ecx, DWORD PTR _copy$[esp+40]
00237 8b 54 24 10 mov edx, DWORD PTR _next$[esp+40]
0023b 8b 44 24 18 mov eax, DWORD PTR _put$[esp+40]
0023f 51 push ecx
00240 52 push edx
00241 50 push eax
00242 e8 00 00 00 00 call _memcpy
; 339 : have -= copy;
00247 8b 44 24 28 mov eax, DWORD PTR _copy$[esp+52]
; 340 : next += copy;
0024b 01 44 24 1c add DWORD PTR _next$[esp+52], eax
; 341 : left -= copy;
0024f 29 44 24 20 sub DWORD PTR _left$[esp+52], eax
; 342 : put += copy;
00253 01 44 24 24 add DWORD PTR _put$[esp+52], eax
; 343 : state->length -= copy;
00257 29 47 40 sub DWORD PTR [edi+64], eax
0025a 83 c4 0c add esp, 12 ; 0000000cH
0025d 2b e8 sub ebp, eax
0025f 83 7f 40 00 cmp DWORD PTR [edi+64], 0
00263 0f 85 5c ff ff
ff jne $LL289@inflateBac@3
$LN288@inflateBac@3:
; 344 : }
; 345 : Tracev((stderr, "inflate: stored end\n"));
; 346 : state->mode = TYPE;
00269 c7 07 0b 00 00
00 mov DWORD PTR [edi], 11 ; 0000000bH
; 347 : break;
0026f e9 7a 0a 00 00 jmp $LN453@inflateBac@3
$LN274@inflateBac@3:
; 348 :
; 349 : case TABLE:
; 350 : /* get dynamic table entries descriptor */
; 351 : NEEDBITS(14);
00274 83 fe 0e cmp esi, 14 ; 0000000eH
00277 73 45 jae SHORT $LN273@inflateBac@3
00279 8d a4 24 00 00
00 00 npad 7
$LL271@inflateBac@3:
00280 85 ed test ebp, ebp
00282 75 1b jne SHORT $LN265@inflateBac@3
00284 8b 54 24 34 mov edx, DWORD PTR _in_desc$[esp+36]
00288 8d 4c 24 10 lea ecx, DWORD PTR _next$[esp+40]
0028c 51 push ecx
0028d 52 push edx
0028e ff 54 24 38 call DWORD PTR _in$[esp+44]
00292 8b e8 mov ebp, eax
00294 83 c4 08 add esp, 8
00297 85 ed test ebp, ebp
00299 0f 84 7b 0a 00
00 je $LN376@inflateBac@3
$LN265@inflateBac@3:
0029f 8b 44 24 10 mov eax, DWORD PTR _next$[esp+40]
002a3 0f b6 10 movzx edx, BYTE PTR [eax]
002a6 8b ce mov ecx, esi
002a8 d3 e2 shl edx, cl
002aa 83 c0 01 add eax, 1
002ad 83 c6 08 add esi, 8
002b0 83 ed 01 sub ebp, 1
002b3 03 da add ebx, edx
002b5 83 fe 0e cmp esi, 14 ; 0000000eH
002b8 89 44 24 10 mov DWORD PTR _next$[esp+40], eax
002bc 72 c2 jb SHORT $LL271@inflateBac@3
$LN273@inflateBac@3:
; 352 : state->nlen = BITS(5) + 257;
002be 8b c3 mov eax, ebx
; 353 : DROPBITS(5);
002c0 c1 eb 05 shr ebx, 5
002c3 83 e0 1f and eax, 31 ; 0000001fH
; 354 : state->ndist = BITS(5) + 1;
002c6 8b cb mov ecx, ebx
; 355 : DROPBITS(5);
002c8 c1 eb 05 shr ebx, 5
002cb 05 01 01 00 00 add eax, 257 ; 00000101H
; 356 : state->ncode = BITS(4) + 4;
002d0 8b d3 mov edx, ebx
002d2 89 47 60 mov DWORD PTR [edi+96], eax
002d5 83 e1 1f and ecx, 31 ; 0000001fH
002d8 83 e2 0f and edx, 15 ; 0000000fH
002db b8 01 00 00 00 mov eax, 1
002e0 03 c8 add ecx, eax
002e2 83 c2 04 add edx, 4
; 357 : DROPBITS(4);
002e5 c1 eb 04 shr ebx, 4
002e8 83 ee 0e sub esi, 14 ; 0000000eH
; 358 : #ifndef PKZIP_BUG_WORKAROUND
; 359 : if (state->nlen > 286 || state->ndist > 30) {
002eb 81 7f 60 1e 01
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -