📄 inftrees.cod
字号:
; 239 : } while (fill != 0);
002e8 85 c0 test eax, eax
002ea 89 39 mov DWORD PTR [ecx], edi
002ec 75 f6 jne SHORT $LL22@inflate_ta
; 240 :
; 241 : /* backwards increment the len-bit code huff */
; 242 : incr = 1U << (len - 1);
002ee 8b 54 24 18 mov edx, DWORD PTR _len$[esp+140]
002f2 8d 4a ff lea ecx, DWORD PTR [edx-1]
002f5 b8 01 00 00 00 mov eax, 1
002fa d3 e0 shl eax, cl
; 243 : while (huff & incr)
002fc 85 c5 test eax, ebp
002fe 74 06 je SHORT $LN18@inflate_ta
$LL19@inflate_ta:
; 244 : incr >>= 1;
00300 d1 e8 shr eax, 1
00302 85 c5 test eax, ebp
00304 75 fa jne SHORT $LL19@inflate_ta
$LN18@inflate_ta:
; 245 : if (incr != 0) {
00306 85 c0 test eax, eax
00308 74 0b je SHORT $LN17@inflate_ta
; 246 : huff &= incr - 1;
0030a 8d 48 ff lea ecx, DWORD PTR [eax-1]
0030d 23 cd and ecx, ebp
; 247 : huff += incr;
0030f 03 c8 add ecx, eax
00311 8b e9 mov ebp, ecx
; 248 : }
; 249 : else
00313 eb 02 jmp SHORT $LN16@inflate_ta
$LN17@inflate_ta:
; 250 : huff = 0;
00315 33 ed xor ebp, ebp
$LN16@inflate_ta:
; 251 :
; 252 : /* go to next symbol, update count, len */
; 253 : sym++;
; 254 : if (--(count[len]) == 0) {
00317 66 81 44 54 4c
ff ff add WORD PTR _count$[esp+edx*2+140], 65535 ; 0000ffffH
0031e 0f b7 44 54 4c movzx eax, WORD PTR _count$[esp+edx*2+140]
00323 83 44 24 24 02 add DWORD PTR tv1307[esp+140], 2
00328 66 85 c0 test ax, ax
0032b 75 20 jne SHORT $LN117@inflate_ta
; 255 : if (len == max) break;
0032d 3b 54 24 1c cmp edx, DWORD PTR _max$[esp+140]
00331 0f 84 df 00 00
00 je $LN85@inflate_ta
; 256 : len = lens[work[sym]];
00337 8b 54 24 24 mov edx, DWORD PTR tv1307[esp+140]
0033b 0f b7 02 movzx eax, WORD PTR [edx]
0033e 8b 8c 24 94 00
00 00 mov ecx, DWORD PTR _lens$[esp+136]
00345 0f b7 14 41 movzx edx, WORD PTR [ecx+eax*2]
00349 89 54 24 18 mov DWORD PTR _len$[esp+140], edx
$LN117@inflate_ta:
; 257 : }
; 258 :
; 259 : /* create new sub-table if needed */
; 260 : if (len > root && (huff & mask) != low) {
0034d 3b 54 24 14 cmp edx, DWORD PTR _root$[esp+140]
00351 0f 86 09 ff ff
ff jbe $LL28@inflate_ta
00357 8b 74 24 40 mov esi, DWORD PTR _mask$[esp+140]
0035b 23 f5 and esi, ebp
0035d 3b 74 24 38 cmp esi, DWORD PTR _low$[esp+140]
00361 89 74 24 48 mov DWORD PTR tv664[esp+140], esi
00365 0f 84 f5 fe ff
ff je $LL28@inflate_ta
; 261 : /* if first time, transition to sub-tables */
; 262 : if (drop == 0)
0036b 85 db test ebx, ebx
0036d 75 04 jne SHORT $LN12@inflate_ta
; 263 : drop = root;
0036f 8b 5c 24 14 mov ebx, DWORD PTR _root$[esp+140]
$LN12@inflate_ta:
; 264 :
; 265 : /* increment past last table */
; 266 : next += min; /* here min is 1 << curr */
00373 8b 44 24 20 mov eax, DWORD PTR _next$[esp+140]
00377 8b 4c 24 44 mov ecx, DWORD PTR _min$[esp+140]
0037b 8d 14 88 lea edx, DWORD PTR [eax+ecx*4]
; 267 :
; 268 : /* determine length of next table */
; 269 : curr = len - drop;
0037e 8b 4c 24 18 mov ecx, DWORD PTR _len$[esp+140]
00382 2b cb sub ecx, ebx
00384 89 54 24 20 mov DWORD PTR _next$[esp+140], edx
; 270 : left = (int)(1 << curr);
00388 b8 01 00 00 00 mov eax, 1
; 271 : while (curr + drop < max) {
0038d 8d 14 0b lea edx, DWORD PTR [ebx+ecx]
00390 d3 e0 shl eax, cl
00392 3b 54 24 1c cmp edx, DWORD PTR _max$[esp+140]
00396 73 26 jae SHORT $LN120@inflate_ta
; 264 :
; 265 : /* increment past last table */
; 266 : next += min; /* here min is 1 << curr */
00398 8d 74 54 4c lea esi, DWORD PTR _count$[esp+edx*2+140]
0039c 8d 64 24 00 npad 4
$LL11@inflate_ta:
; 272 : left -= count[curr + drop];
003a0 0f b7 3e movzx edi, WORD PTR [esi]
003a3 2b c7 sub eax, edi
; 273 : if (left <= 0) break;
003a5 85 c0 test eax, eax
003a7 7e 11 jle SHORT $LN118@inflate_ta
; 274 : curr++;
003a9 83 c2 01 add edx, 1
003ac 83 c1 01 add ecx, 1
003af 83 c6 02 add esi, 2
; 275 : left <<= 1;
003b2 03 c0 add eax, eax
003b4 3b 54 24 1c cmp edx, DWORD PTR _max$[esp+140]
003b8 72 e6 jb SHORT $LL11@inflate_ta
$LN118@inflate_ta:
; 271 : while (curr + drop < max) {
003ba 8b 74 24 48 mov esi, DWORD PTR tv664[esp+140]
$LN120@inflate_ta:
; 276 : }
; 277 :
; 278 : /* check for enough space */
; 279 : used += 1U << curr;
003be b8 01 00 00 00 mov eax, 1
003c3 d3 e0 shl eax, cl
003c5 01 44 24 28 add DWORD PTR _used$[esp+140], eax
; 280 : if (type == LENS && used >= ENOUGH - MAXD)
003c9 83 bc 24 90 00
00 00 01 cmp DWORD PTR _type$[esp+136], 1
003d1 89 44 24 3c mov DWORD PTR tv635[esp+140], eax
003d5 75 0e jne SHORT $LN8@inflate_ta
003d7 81 7c 24 28 b0
05 00 00 cmp DWORD PTR _used$[esp+140], 1456 ; 000005b0H
003df 0f 83 d4 00 00
00 jae $LN86@inflate_ta
$LN8@inflate_ta:
; 282 :
; 283 : /* point entry in root table to sub-table */
; 284 : low = huff & mask;
003e5 8b d6 mov edx, esi
; 285 : (*table)[low].op = (unsigned char)curr;
003e7 8b b4 24 9c 00
00 00 mov esi, DWORD PTR _table$[esp+136]
003ee 8b 06 mov eax, DWORD PTR [esi]
003f0 88 0c 90 mov BYTE PTR [eax+edx*4], cl
; 286 : (*table)[low].bits = (unsigned char)root;
003f3 8b 0e mov ecx, DWORD PTR [esi]
003f5 8a 44 24 14 mov al, BYTE PTR _root$[esp+140]
003f9 88 44 91 01 mov BYTE PTR [ecx+edx*4+1], al
; 287 : (*table)[low].val = (unsigned short)(next - *table);
003fd 8b 06 mov eax, DWORD PTR [esi]
003ff 8b 4c 24 20 mov ecx, DWORD PTR _next$[esp+140]
00403 2b c8 sub ecx, eax
00405 c1 f9 02 sar ecx, 2
00408 89 54 24 38 mov DWORD PTR _low$[esp+140], edx
0040c 66 89 4c 90 02 mov WORD PTR [eax+edx*4+2], cx
; 288 : }
; 289 : }
00411 e9 4a fe ff ff jmp $LL28@inflate_ta
$LN85@inflate_ta:
; 290 :
; 291 : /*
; 292 : Fill in rest of table for incomplete codes. This loop is similar to the
; 293 : loop above in incrementing huff for table indices. It is assumed that
; 294 : len is equal to curr + drop, so there is no loop needed to increment
; 295 : through high index bits. When the current sub-table is filled, the loop
; 296 : drops back to the root table to fill in any remaining entries there.
; 297 : */
; 298 : this.op = (unsigned char)64; /* invalid code marker */
; 299 : this.bits = (unsigned char)(len - drop);
; 300 : this.val = (unsigned short)0;
; 301 : while (huff != 0) {
00416 8b bc 24 9c 00
00 00 mov edi, DWORD PTR _table$[esp+136]
0041d 8a c2 mov al, dl
0041f 2a c3 sub al, bl
00421 85 ed test ebp, ebp
00423 c6 44 24 10 40 mov BYTE PTR _this$[esp+140], 64 ; 00000040H
00428 88 44 24 11 mov BYTE PTR _this$[esp+141], al
0042c 66 c7 44 24 12
00 00 mov WORD PTR _this$[esp+142], 0
00433 74 60 je SHORT $LN116@inflate_ta
00435 8b 74 24 20 mov esi, DWORD PTR _next$[esp+140]
00439 8d a4 24 00 00
00 00 npad 7
$LL7@inflate_ta:
; 302 : /* when done with sub-table, drop back to root table */
; 303 : if (drop != 0 && (huff & mask) != low) {
00440 85 db test ebx, ebx
00442 74 1e je SHORT $LN115@inflate_ta
00444 8b 4c 24 40 mov ecx, DWORD PTR _mask$[esp+140]
00448 23 cd and ecx, ebp
0044a 3b 4c 24 38 cmp ecx, DWORD PTR _low$[esp+140]
0044e 74 12 je SHORT $LN115@inflate_ta
; 304 : drop = 0;
; 305 : len = root;
00450 8b 44 24 14 mov eax, DWORD PTR _root$[esp+140]
; 306 : next = *table;
00454 8b 37 mov esi, DWORD PTR [edi]
00456 33 db xor ebx, ebx
00458 89 44 24 18 mov DWORD PTR _len$[esp+140], eax
; 307 : this.bits = (unsigned char)len;
0045c 88 44 24 11 mov BYTE PTR _this$[esp+141], al
00460 8b d0 mov edx, eax
$LN115@inflate_ta:
; 308 : }
; 309 :
; 310 : /* put invalid code marker in table */
; 311 : next[huff >> drop] = this;
00462 8b cb mov ecx, ebx
00464 8b c5 mov eax, ebp
00466 d3 e8 shr eax, cl
00468 8b 4c 24 10 mov ecx, DWORD PTR _this$[esp+140]
0046c 89 0c 86 mov DWORD PTR [esi+eax*4], ecx
; 312 :
; 313 : /* backwards increment the len-bit code huff */
; 314 : incr = 1U << (len - 1);
0046f 8d 4a ff lea ecx, DWORD PTR [edx-1]
00472 b8 01 00 00 00 mov eax, 1
00477 d3 e0 shl eax, cl
; 315 : while (huff & incr)
00479 85 c5 test eax, ebp
0047b 74 09 je SHORT $LN3@inflate_ta
0047d 8d 49 00 npad 3
$LL4@inflate_ta:
; 316 : incr >>= 1;
00480 d1 e8 shr eax, 1
00482 85 c5 test eax, ebp
00484 75 fa jne SHORT $LL4@inflate_ta
$LN3@inflate_ta:
; 317 : if (incr != 0) {
00486 85 c0 test eax, eax
00488 74 0b je SHORT $LN116@inflate_ta
; 318 : huff &= incr - 1;
0048a 8d 48 ff lea ecx, DWORD PTR [eax-1]
0048d 23 cd and ecx, ebp
; 319 : huff += incr;
0048f 03 c8 add ecx, eax
00491 8b e9 mov ebp, ecx
00493 75 ab jne SHORT $LL7@inflate_ta
$LN116@inflate_ta:
; 320 : }
; 321 : else
; 322 : huff = 0;
; 323 : }
; 324 :
; 325 : /* set return parameters */
; 326 : *table += used;
00495 8b 54 24 28 mov edx, DWORD PTR _used$[esp+140]
; 327 : *bits = root;
00499 8b 8c 24 a0 00
00 00 mov ecx, DWORD PTR _bits$[esp+136]
004a0 8d 04 95 00 00
00 00 lea eax, DWORD PTR [edx*4]
004a7 01 07 add DWORD PTR [edi], eax
004a9 8b 54 24 14 mov edx, DWORD PTR _root$[esp+140]
004ad 5f pop edi
004ae 5e pop esi
004af 5d pop ebp
004b0 89 11 mov DWORD PTR [ecx], edx
; 328 : return 0;
004b2 33 c0 xor eax, eax
004b4 5b pop ebx
; 329 : }
004b5 83 c4 7c add esp, 124 ; 0000007cH
004b8 c3 ret 0
$LN86@inflate_ta:
004b9 5f pop edi
004ba 5e pop esi
004bb 5d pop ebp
; 281 : return 1;
004bc b8 01 00 00 00 mov eax, 1
004c1 5b pop ebx
; 329 : }
004c2 83 c4 7c add esp, 124 ; 0000007cH
004c5 c3 ret 0
_inflate_table ENDP
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -