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

📄 crc32.cod

📁 microsoft visual c++ 2005、windows mobile 5 远程控制PC.通过阅读项目源码能让你熟悉Active Sync RAPI
💻 COD
📖 第 1 页 / 共 4 页
字号:
  00017	8b f8		 mov	 edi, eax
  00019	c1 e7 10	 shl	 edi, 16			; 00000010H
  0001c	03 d7		 add	 edx, edi
  0001e	c1 e2 08	 shl	 edx, 8
  00021	03 d3		 add	 edx, ebx
  00023	c1 e8 18	 shr	 eax, 24			; 00000018H
  00026	03 d0		 add	 edx, eax

; 312  :     while (len && ((ptrdiff_t)buf & 3)) {

  00028	85 f6		 test	 esi, esi
  0002a	f7 d2		 not	 edx
  0002c	74 23		 je	 SHORT $LN9@crc32_big
  0002e	8b ff		 npad	 2
$LL10@crc32_big:
  00030	f6 c1 03	 test	 cl, 3
  00033	74 1c		 je	 SHORT $LN9@crc32_big

; 313  :         c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);

  00035	0f b6 39	 movzx	 edi, BYTE PTR [ecx]
  00038	8b c2		 mov	 eax, edx
  0003a	c1 e8 18	 shr	 eax, 24			; 00000018H
  0003d	33 c7		 xor	 eax, edi
  0003f	c1 e2 08	 shl	 edx, 8
  00042	33 14 85 00 10
	00 00		 xor	 edx, DWORD PTR _crc_table[eax*4+4096]
  00049	83 c1 01	 add	 ecx, 1

; 314  :         len--;

  0004c	83 ee 01	 sub	 esi, 1
  0004f	75 df		 jne	 SHORT $LL10@crc32_big
$LN9@crc32_big:

; 315  :     }
; 316  : 
; 317  :     buf4 = (const u4 FAR *)(const void FAR *)buf;
; 318  :     buf4--;
; 319  :     while (len >= 32) {

  00051	83 fe 20	 cmp	 esi, 32			; 00000020H
  00054	8d 41 fc	 lea	 eax, DWORD PTR [ecx-4]
  00057	0f 82 e7 01 00
	00		 jb	 $LN15@crc32_big
  0005d	8b fe		 mov	 edi, esi
  0005f	c1 ef 05	 shr	 edi, 5
$LL8@crc32_big:

; 320  :         DOBIG32;

  00062	33 50 04	 xor	 edx, DWORD PTR [eax+4]
  00065	83 c0 04	 add	 eax, 4
  00068	8b ca		 mov	 ecx, edx
  0006a	0f b6 de	 movzx	 ebx, dh
  0006d	c1 e9 10	 shr	 ecx, 16			; 00000010H
  00070	81 e1 ff 00 00
	00		 and	 ecx, 255		; 000000ffH
  00076	8b 0c 8d 00 18
	00 00		 mov	 ecx, DWORD PTR _crc_table[ecx*4+6144]
  0007d	33 0c 9d 00 14
	00 00		 xor	 ecx, DWORD PTR _crc_table[ebx*4+5120]
  00084	8b da		 mov	 ebx, edx
  00086	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  0008c	c1 eb 18	 shr	 ebx, 24			; 00000018H
  0008f	33 0c 9d 00 1c
	00 00		 xor	 ecx, DWORD PTR _crc_table[ebx*4+7168]
  00096	83 c0 04	 add	 eax, 4
  00099	33 0c 95 00 10
	00 00		 xor	 ecx, DWORD PTR _crc_table[edx*4+4096]
  000a0	83 c0 04	 add	 eax, 4
  000a3	33 48 fc	 xor	 ecx, DWORD PTR [eax-4]
  000a6	83 c0 04	 add	 eax, 4
  000a9	8b d1		 mov	 edx, ecx
  000ab	c1 ea 10	 shr	 edx, 16			; 00000010H
  000ae	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  000b4	8b 14 95 00 18
	00 00		 mov	 edx, DWORD PTR _crc_table[edx*4+6144]
  000bb	0f b6 dd	 movzx	 ebx, ch
  000be	33 14 9d 00 14
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+5120]
  000c5	8b d9		 mov	 ebx, ecx
  000c7	81 e1 ff 00 00
	00		 and	 ecx, 255		; 000000ffH
  000cd	c1 eb 18	 shr	 ebx, 24			; 00000018H
  000d0	33 14 9d 00 1c
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+7168]
  000d7	83 c0 04	 add	 eax, 4
  000da	33 14 8d 00 10
	00 00		 xor	 edx, DWORD PTR _crc_table[ecx*4+4096]
  000e1	83 c0 04	 add	 eax, 4
  000e4	33 50 f4	 xor	 edx, DWORD PTR [eax-12]
  000e7	83 c0 04	 add	 eax, 4
  000ea	8b ca		 mov	 ecx, edx
  000ec	0f b6 de	 movzx	 ebx, dh
  000ef	c1 e9 10	 shr	 ecx, 16			; 00000010H
  000f2	81 e1 ff 00 00
	00		 and	 ecx, 255		; 000000ffH
  000f8	8b 0c 8d 00 18
	00 00		 mov	 ecx, DWORD PTR _crc_table[ecx*4+6144]
  000ff	33 0c 9d 00 14
	00 00		 xor	 ecx, DWORD PTR _crc_table[ebx*4+5120]
  00106	8b da		 mov	 ebx, edx
  00108	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  0010e	c1 eb 18	 shr	 ebx, 24			; 00000018H
  00111	33 0c 9d 00 1c
	00 00		 xor	 ecx, DWORD PTR _crc_table[ebx*4+7168]
  00118	33 0c 95 00 10
	00 00		 xor	 ecx, DWORD PTR _crc_table[edx*4+4096]
  0011f	33 48 f4	 xor	 ecx, DWORD PTR [eax-12]
  00122	8b d1		 mov	 edx, ecx
  00124	c1 ea 10	 shr	 edx, 16			; 00000010H
  00127	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  0012d	8b 14 95 00 18
	00 00		 mov	 edx, DWORD PTR _crc_table[edx*4+6144]
  00134	0f b6 dd	 movzx	 ebx, ch
  00137	33 14 9d 00 14
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+5120]
  0013e	8b d9		 mov	 ebx, ecx
  00140	c1 eb 18	 shr	 ebx, 24			; 00000018H
  00143	33 14 9d 00 1c
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+7168]
  0014a	81 e1 ff 00 00
	00		 and	 ecx, 255		; 000000ffH
  00150	33 14 8d 00 10
	00 00		 xor	 edx, DWORD PTR _crc_table[ecx*4+4096]
  00157	33 50 f8	 xor	 edx, DWORD PTR [eax-8]
  0015a	8b ca		 mov	 ecx, edx
  0015c	0f b6 de	 movzx	 ebx, dh
  0015f	c1 e9 10	 shr	 ecx, 16			; 00000010H
  00162	81 e1 ff 00 00
	00		 and	 ecx, 255		; 000000ffH
  00168	8b 0c 8d 00 18
	00 00		 mov	 ecx, DWORD PTR _crc_table[ecx*4+6144]
  0016f	33 0c 9d 00 14
	00 00		 xor	 ecx, DWORD PTR _crc_table[ebx*4+5120]
  00176	8b da		 mov	 ebx, edx
  00178	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  0017e	c1 eb 18	 shr	 ebx, 24			; 00000018H
  00181	33 0c 9d 00 1c
	00 00		 xor	 ecx, DWORD PTR _crc_table[ebx*4+7168]
  00188	33 0c 95 00 10
	00 00		 xor	 ecx, DWORD PTR _crc_table[edx*4+4096]
  0018f	33 48 fc	 xor	 ecx, DWORD PTR [eax-4]
  00192	8b d1		 mov	 edx, ecx
  00194	c1 ea 10	 shr	 edx, 16			; 00000010H
  00197	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  0019d	8b 14 95 00 18
	00 00		 mov	 edx, DWORD PTR _crc_table[edx*4+6144]
  001a4	0f b6 dd	 movzx	 ebx, ch
  001a7	33 14 9d 00 14
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+5120]
  001ae	8b d9		 mov	 ebx, ecx
  001b0	c1 eb 18	 shr	 ebx, 24			; 00000018H
  001b3	33 14 9d 00 1c
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+7168]
  001ba	81 e1 ff 00 00
	00		 and	 ecx, 255		; 000000ffH
  001c0	33 14 8d 00 10
	00 00		 xor	 edx, DWORD PTR _crc_table[ecx*4+4096]
  001c7	33 10		 xor	 edx, DWORD PTR [eax]
  001c9	83 c0 04	 add	 eax, 4
  001cc	8b ca		 mov	 ecx, edx
  001ce	c1 e9 10	 shr	 ecx, 16			; 00000010H
  001d1	0f b6 de	 movzx	 ebx, dh
  001d4	81 e1 ff 00 00
	00		 and	 ecx, 255		; 000000ffH
  001da	8b 0c 8d 00 18
	00 00		 mov	 ecx, DWORD PTR _crc_table[ecx*4+6144]
  001e1	33 0c 9d 00 14
	00 00		 xor	 ecx, DWORD PTR _crc_table[ebx*4+5120]
  001e8	8b da		 mov	 ebx, edx
  001ea	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  001f0	c1 eb 18	 shr	 ebx, 24			; 00000018H
  001f3	33 0c 9d 00 1c
	00 00		 xor	 ecx, DWORD PTR _crc_table[ebx*4+7168]

; 321  :         len -= 32;

  001fa	83 ee 20	 sub	 esi, 32			; 00000020H
  001fd	33 0c 95 00 10
	00 00		 xor	 ecx, DWORD PTR _crc_table[edx*4+4096]
  00204	33 08		 xor	 ecx, DWORD PTR [eax]
  00206	8b d1		 mov	 edx, ecx
  00208	c1 ea 10	 shr	 edx, 16			; 00000010H
  0020b	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  00211	8b 14 95 00 18
	00 00		 mov	 edx, DWORD PTR _crc_table[edx*4+6144]
  00218	0f b6 dd	 movzx	 ebx, ch
  0021b	33 14 9d 00 14
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+5120]
  00222	8b d9		 mov	 ebx, ecx
  00224	c1 eb 18	 shr	 ebx, 24			; 00000018H
  00227	33 14 9d 00 1c
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+7168]
  0022e	81 e1 ff 00 00
	00		 and	 ecx, 255		; 000000ffH
  00234	33 14 8d 00 10
	00 00		 xor	 edx, DWORD PTR _crc_table[ecx*4+4096]
  0023b	83 ef 01	 sub	 edi, 1
  0023e	0f 85 1e fe ff
	ff		 jne	 $LL8@crc32_big
$LN15@crc32_big:

; 322  :     }
; 323  :     while (len >= 4) {

  00244	83 fe 04	 cmp	 esi, 4
  00247	72 4c		 jb	 SHORT $LN5@crc32_big
  00249	8b ce		 mov	 ecx, esi
  0024b	c1 e9 02	 shr	 ecx, 2
  0024e	8b ff		 npad	 2
$LL6@crc32_big:

; 324  :         DOBIG4;

  00250	33 50 04	 xor	 edx, DWORD PTR [eax+4]
  00253	83 c0 04	 add	 eax, 4
  00256	8b fa		 mov	 edi, edx
  00258	c1 ef 10	 shr	 edi, 16			; 00000010H
  0025b	81 e7 ff 00 00
	00		 and	 edi, 255		; 000000ffH
  00261	8b 3c bd 00 18
	00 00		 mov	 edi, DWORD PTR _crc_table[edi*4+6144]
  00268	0f b6 de	 movzx	 ebx, dh
  0026b	33 3c 9d 00 14
	00 00		 xor	 edi, DWORD PTR _crc_table[ebx*4+5120]
  00272	8b da		 mov	 ebx, edx
  00274	c1 eb 18	 shr	 ebx, 24			; 00000018H
  00277	33 3c 9d 00 1c
	00 00		 xor	 edi, DWORD PTR _crc_table[ebx*4+7168]
  0027e	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  00284	33 3c 95 00 10
	00 00		 xor	 edi, DWORD PTR _crc_table[edx*4+4096]

; 325  :         len -= 4;

  0028b	83 ee 04	 sub	 esi, 4
  0028e	83 e9 01	 sub	 ecx, 1
  00291	8b d7		 mov	 edx, edi
  00293	75 bb		 jne	 SHORT $LL6@crc32_big
$LN5@crc32_big:

; 326  :     }
; 327  :     buf4++;

  00295	83 c0 04	 add	 eax, 4

; 328  :     buf = (const unsigned char FAR *)buf4;
; 329  : 
; 330  :     if (len) do {

  00298	85 f6		 test	 esi, esi
  0029a	74 20		 je	 SHORT $LN1@crc32_big
  0029c	8d 64 24 00	 npad	 4
$LL3@crc32_big:

; 331  :         c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);

  002a0	0f b6 38	 movzx	 edi, BYTE PTR [eax]
  002a3	8b ca		 mov	 ecx, edx
  002a5	c1 e9 18	 shr	 ecx, 24			; 00000018H
  002a8	33 cf		 xor	 ecx, edi
  002aa	c1 e2 08	 shl	 edx, 8
  002ad	33 14 8d 00 10
	00 00		 xor	 edx, DWORD PTR _crc_table[ecx*4+4096]
  002b4	83 c0 01	 add	 eax, 1

; 332  :     } while (--len);

  002b7	83 ee 01	 sub	 esi, 1
  002ba	75 e4		 jne	 SHORT $LL3@crc32_big
$LN1@crc32_big:

; 333  :     c = ~c;

  002bc	f7 d2		 not	 edx

; 334  :     return (unsigned long)(REV(c));

  002be	8b c2		 mov	 eax, edx
  002c0	25 00 ff 00 00	 and	 eax, 65280		; 0000ff00H
  002c5	8b ca		 mov	 ecx, edx
  002c7	c1 e1 10	 shl	 ecx, 16			; 00000010H
  002ca	03 c1		 add	 eax, ecx
  002cc	89 54 24 10	 mov	 DWORD PTR _c$[esp+8], edx
  002d0	33 c9		 xor	 ecx, ecx
  002d2	8a 6c 24 12	 mov	 ch, BYTE PTR _c$[esp+10]
  002d6	c1 e0 08	 shl	 eax, 8
  002d9	5f		 pop	 edi
  002da	c1 ea 18	 shr	 edx, 24			; 00000018H
  002dd	5e		 pop	 esi
  002de	5b		 pop	 ebx
  002df	03 c1		 add	 eax, ecx
  002e1	03 c2		 add	 eax, edx

; 335  : }

  002e3	c3		 ret	 0
_crc32_big ENDP
; Function compile flags: /Ogtpy
_TEXT	ENDS
;	COMDAT _crc32_little
_TEXT	SEGMENT
_crc32_little PROC					; COMDAT
; _crc$ = eax
; _buf$ = ecx
; _len$ = edx

; 266  : {

  00000	56		 push	 esi
  00001	8b f2		 mov	 esi, edx

; 267  :     register u4 c;
; 268  :     register const u4 FAR *buf4;
; 269  : 
; 270  :     c = (u4)crc;
; 271  :     c = ~c;
; 272  :     while (len && ((ptrdiff_t)buf & 3)) {

  00003	85 f6		 test	 esi, esi
  00005	f7 d0		 not	 eax
  00007	74 29		 je	 SHORT $LN9@crc32_litt
  00009	8d a4 24 00 00
	00 00		 npad	 7
$LL10@crc32_litt:
  00010	f6 c1 03	 test	 cl, 3
  00013	74 1d		 je	 SHORT $LN9@crc32_litt

; 273  :         c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);

  00015	0f b6 11	 movzx	 edx, BYTE PTR [ecx]
  00018	33 d0		 xor	 edx, eax
  0001a	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  00020	c1 e8 08	 shr	 eax, 8
  00023	33 04 95 00 00
	00 00		 xor	 eax, DWORD PTR _crc_table[edx*4]
  0002a	83 c1 01	 add	 ecx, 1

; 274  :         len--;

  0002d	83 ee 01	 sub	 esi, 1
  00030	75 de		 jne	 SHORT $LL10@crc32_litt
$LN9@crc32_litt:

; 275  :     }
; 276  : 
; 277  :     buf4 = (const u4 FAR *)(const void FAR *)buf;
; 278  :     while (len >= 32) {

  00032	83 fe 20	 cmp	 esi, 32			; 00000020H
  00035	53		 push	 ebx
  00036	57		 push	 edi
  00037	0f 82 df 01 00
	00		 jb	 $LN15@crc32_litt
  0003d	8b fe		 mov	 edi, esi
  0003f	c1 ef 05	 shr	 edi, 5
$LL8@crc32_litt:

; 279  :         DOLIT32;

  00042	33 01		 xor	 eax, DWORD PTR [ecx]
  00044	83 c1 04	 add	 ecx, 4
  00047	8b d0		 mov	 edx, eax
  00049	c1 ea 10	 shr	 edx, 16			; 00000010H
  0004c	0f b6 dc	 movzx	 ebx, ah
  0004f	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  00055	8b 14 95 00 04
	00 00		 mov	 edx, DWORD PTR _crc_table[edx*4+1024]
  0005c	33 14 9d 00 08
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+2048]
  00063	8b d8		 mov	 ebx, eax
  00065	25 ff 00 00 00	 and	 eax, 255		; 000000ffH
  0006a	c1 eb 18	 shr	 ebx, 24			; 00000018H
  0006d	33 14 9d 00 00
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4]
  00074	83 c1 04	 add	 ecx, 4
  00077	33 14 85 00 0c
	00 00		 xor	 edx, DWORD PTR _crc_table[eax*4+3072]
  0007e	83 c1 04	 add	 ecx, 4
  00081	33 51 f8	 xor	 edx, DWORD PTR [ecx-8]
  00084	83 c1 04	 add	 ecx, 4
  00087	8b c2		 mov	 eax, edx
  00089	c1 e8 10	 shr	 eax, 16			; 00000010H
  0008c	25 ff 00 00 00	 and	 eax, 255		; 000000ffH
  00091	8b 04 85 00 04
	00 00		 mov	 eax, DWORD PTR _crc_table[eax*4+1024]
  00098	0f b6 de	 movzx	 ebx, dh
  0009b	33 04 9d 00 08
	00 00		 xor	 eax, DWORD PTR _crc_table[ebx*4+2048]
  000a2	8b da		 mov	 ebx, edx
  000a4	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  000aa	c1 eb 18	 shr	 ebx, 24			; 00000018H
  000ad	33 04 9d 00 00
	00 00		 xor	 eax, DWORD PTR _crc_table[ebx*4]
  000b4	83 c1 04	 add	 ecx, 4
  000b7	33 04 95 00 0c
	00 00		 xor	 eax, DWORD PTR _crc_table[edx*4+3072]
  000be	83 c1 04	 add	 ecx, 4
  000c1	33 41 f0	 xor	 eax, DWORD PTR [ecx-16]
  000c4	8b d0		 mov	 edx, eax
  000c6	c1 ea 10	 shr	 edx, 16			; 00000010H
  000c9	0f b6 dc	 movzx	 ebx, ah
  000cc	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  000d2	8b 14 95 00 04
	00 00		 mov	 edx, DWORD PTR _crc_table[edx*4+1024]
  000d9	33 14 9d 00 08
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+2048]
  000e0	8b d8		 mov	 ebx, eax
  000e2	25 ff 00 00 00	 and	 eax, 255		; 000000ffH
  000e7	c1 eb 18	 shr	 ebx, 24			; 00000018H
  000ea	33 14 9d 00 00
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4]
  000f1	33 14 85 00 0c
	00 00		 xor	 edx, DWORD PTR _crc_table[eax*4+3072]
  000f8	33 51 f4	 xor	 edx, DWORD PTR [ecx-12]
  000fb	8b c2		 mov	 eax, edx
  000fd	c1 e8 10	 shr	 eax, 16			; 00000010H
  00100	25 ff 00 00 00	 and	 eax, 255		; 000000ffH
  00105	8b 04 85 00 04
	00 00		 mov	 eax, DWORD PTR _crc_table[eax*4+1024]
  0010c	0f b6 de	 movzx	 ebx, dh
  0010f	33 04 9d 00 08
	00 00		 xor	 eax, DWORD PTR _crc_table[ebx*4+2048]
  00116	8b da		 mov	 ebx, edx
  00118	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  0011e	c1 eb 18	 shr	 ebx, 24			; 00000018H
  00121	33 04 9d 00 00
	00 00		 xor	 eax, DWORD PTR _crc_table[ebx*4]
  00128	33 04 95 00 0c
	00 00		 xor	 eax, DWORD PTR _crc_table[edx*4+3072]
  0012f	33 41 f8	 xor	 eax, DWORD PTR [ecx-8]
  00132	8b d0		 mov	 edx, eax
  00134	c1 ea 10	 shr	 edx, 16			; 00000010H
  00137	0f b6 dc	 movzx	 ebx, ah
  0013a	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  00140	8b 14 95 00 04
	00 00		 mov	 edx, DWORD PTR _crc_table[edx*4+1024]
  00147	33 14 9d 00 08
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+2048]
  0014e	8b d8		 mov	 ebx, eax
  00150	25 ff 00 00 00	 and	 eax, 255		; 000000ffH
  00155	c1 eb 18	 shr	 ebx, 24			; 00000018H
  00158	33 14 9d 00 00
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4]
  0015f	33 14 85 00 0c
	00 00		 xor	 edx, DWORD PTR _crc_table[eax*4+3072]
  00166	33 51 fc	 xor	 edx, DWORD PTR [ecx-4]
  00169	8b c2		 mov	 eax, edx
  0016b	c1 e8 10	 shr	 eax, 16			; 00000010H
  0016e	25 ff 00 00 00	 and	 eax, 255		; 000000ffH
  00173	8b 04 85 00 04
	00 00		 mov	 eax, DWORD PTR _crc_table[eax*4+1024]
  0017a	0f b6 de	 movzx	 ebx, dh
  0017d	33 04 9d 00 08
	00 00		 xor	 eax, DWORD PTR _crc_table[ebx*4+2048]
  00184	8b da		 mov	 ebx, edx
  00186	c1 eb 18	 shr	 ebx, 24			; 00000018H
  00189	33 04 9d 00 00
	00 00		 xor	 eax, DWORD PTR _crc_table[ebx*4]
  00190	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  00196	33 04 95 00 0c
	00 00		 xor	 eax, DWORD PTR _crc_table[edx*4+3072]
  0019d	33 01		 xor	 eax, DWORD PTR [ecx]
  0019f	83 c1 04	 add	 ecx, 4
  001a2	8b d0		 mov	 edx, eax
  001a4	c1 ea 10	 shr	 edx, 16			; 00000010H
  001a7	0f b6 dc	 movzx	 ebx, ah
  001aa	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  001b0	8b 14 95 00 04
	00 00		 mov	 edx, DWORD PTR _crc_table[edx*4+1024]
  001b7	33 14 9d 00 08
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4+2048]
  001be	8b d8		 mov	 ebx, eax
  001c0	25 ff 00 00 00	 and	 eax, 255		; 000000ffH
  001c5	c1 eb 18	 shr	 ebx, 24			; 00000018H
  001c8	33 14 9d 00 00
	00 00		 xor	 edx, DWORD PTR _crc_table[ebx*4]
  001cf	83 c1 04	 add	 ecx, 4
  001d2	33 14 85 00 0c
	00 00		 xor	 edx, DWORD PTR _crc_table[eax*4+3072]

; 280  :         len -= 32;

  001d9	83 ee 20	 sub	 esi, 32			; 00000020H
  001dc	33 51 fc	 xor	 edx, DWORD PTR [ecx-4]
  001df	8b c2		 mov	 eax, edx
  001e1	c1 e8 10	 shr	 eax, 16			; 00000010H
  001e4	25 ff 00 00 00	 and	 eax, 255		; 000000ffH
  001e9	8b 04 85 00 04
	00 00		 mov	 eax, DWORD PTR _crc_table[eax*4+1024]
  001f0	0f b6 de	 movzx	 ebx, dh
  001f3	33 04 9d 00 08
	00 00		 xor	 eax, DWORD PTR _crc_table[ebx*4+2048]
  001fa	8b da		 mov	 ebx, edx
  001fc	c1 eb 18	 shr	 ebx, 24			; 00000018H
  001ff	33 04 9d 00 00
	00 00		 xor	 eax, DWORD PTR _crc_table[ebx*4]
  00206	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  0020c	33 04 95 00 0c
	00 00		 xor	 eax, DWORD PTR _crc_table[edx*4+3072]
  00213	83 ef 01	 sub	 edi, 1
  00216	0f 85 26 fe ff
	ff		 jne	 $LL8@crc32_litt
$LN15@crc32_litt:

; 281  :     }
; 282  :     while (len >= 4) {

  0021c	83 fe 04	 cmp	 esi, 4
  0021f	72 48		 jb	 SHORT $LN5@crc32_litt
  00221	8b d6		 mov	 edx, esi
  00223	c1 ea 02	 shr	 edx, 2
$LL6@crc32_litt:

; 283  :         DOLIT4;

  00226	33 01		 xor	 eax, DWORD PTR [ecx]
  00228	83 c1 04	 add	 ecx, 4
  0022b	8b f8		 mov	 edi, eax
  0022d	c1 ef 10	 shr	 edi, 16			; 00000010H
  00230	81 e7 ff 00 00
	00		 and	 edi, 255		; 000000ffH
  00236	8b 3c bd 00 04
	00 00		 mov	 edi, DWORD PTR _crc_table[edi*4+1024]
  0023d	0f b6 dc	 movzx	 ebx, ah
  00240	33 3c 9d 00 08
	00 00		 xor	 edi, DWORD PTR _crc_table[ebx*4+2048]
  00247	8b d8		 mov	 ebx, eax
  00249	c1 eb 18	 shr	 ebx, 24			; 00000018H
  0024c	33 3c 9d 00 00
	00 00		 xor	 edi, DWORD PTR _crc_table[ebx*4]
  00253	25 ff 00 00 00	 and	 eax, 255		; 000000ffH
  00258	33 3c 85 00 0c
	00 00		 xor	 edi, DWORD PTR _crc_table[eax*4+3072]

; 284  :         len -= 4;

  0025f	83 ee 04	 sub	 esi, 4
  00262	83 ea 01	 sub	 edx, 1
  00265	8b c7		 mov	 eax, edi
  00267	75 bd		 jne	 SHORT $LL6@crc32_litt
$LN5@crc32_litt:

; 285  :     }
; 286  :     buf = (const unsigned char FAR *)buf4;
; 287  : 
; 288  :     if (len) do {

  00269	85 f6		 test	 esi, esi
  0026b	5f		 pop	 edi
  0026c	5b		 pop	 ebx
  0026d	74 1e		 je	 SHORT $LN1@crc32_litt
  0026f	90		 npad	 1
$LL3@crc32_litt:

; 289  :         c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);

  00270	0f b6 11	 movzx	 edx, BYTE PTR [ecx]
  00273	33 d0		 xor	 edx, eax
  00275	81 e2 ff 00 00
	00		 and	 edx, 255		; 000000ffH
  0027b	c1 e8 08	 shr	 eax, 8
  0027e	33 04 95 00 00
	00 00		 xor	 eax, DWORD PTR _crc_table[edx*4]
  00285	83 c1 01	 add	 ecx, 1

; 290  :     } while (--len);

  00288	83 ee 01	 sub	 esi, 1
  0028b	75 e3		 jne	 SHORT $LL3@crc32_litt
$LN1@crc32_litt:

; 291  :     c = ~c;

  0028d	f7 d0		 not	 eax
  0028f	5e		 pop	 esi

; 292  :     return (unsigned long)c;
; 293  : }

  00290	c3		 ret	 0
_crc32_little ENDP
_TEXT	ENDS
PUBLIC	_crc32@12
; Function compile flags: /Ogtpy
;	COMDAT _crc32@12
_TEXT	SEGMENT
_crc$ = 8						; size = 4
_buf$ = 12						; size = 4
_len$ = 16						; size = 4
_crc32@12 PROC						; COMDAT

; 224  :     if (buf == Z_NULL) return 0UL;

  00000	8b 4c 24 08	 mov	 ecx, DWORD PTR _buf$[esp-4]
  00004	85 c9		 test	 ecx, ecx
  00006	75 05		 jne	 SHORT $LN10@crc32
  00008	33 c0		 xor	 eax, eax

; 238  :         else
; 239  :             return crc32_big(crc, buf, len);
; 240  :     }
; 241  : #endif /* BYFOUR */
; 242  :     crc = crc ^ 0xffffffffUL;
; 243  :     while (len >= 8) {
; 244  :         DO8;
; 245  :         len -= 8;
; 246  :     }
; 247  :     if (len) do {
; 248  :         DO1;
; 249  :     } while (--len);
; 250  :     return crc ^ 0xffffffffUL;
; 251  : }

  0000a	c2 0c 00	 ret	 12			; 0000000cH
$LN10@crc32:

; 225  : 
; 226  : #ifdef DYNAMIC_CRC_TABLE
; 227  :     if (crc_table_empty)
; 228  :         make_crc_table();
; 229  : #endif /* DYNAMIC_CRC_TABLE */
; 230  : 
; 231  : #ifdef BYFOUR
; 232  :     if (sizeof(void *) == sizeof(ptrdiff_t)) {
; 233  :         u4 endian;
; 234  : 
; 235  :         endian = 1;
; 236  :         if (*((unsigned char *)(&endian)))
; 237  :             return crc32_little(crc, buf, len);

  0000d	8b 54 24 0c	 mov	 edx, DWORD PTR _len$[esp-4]
  00011	8b 44 24 04	 mov	 eax, DWORD PTR _crc$[esp-4]
  00015	e8 00 00 00 00	 call	 _crc32_little

; 238  :         else
; 239  :             return crc32_big(crc, buf, len);
; 240  :     }
; 241  : #endif /* BYFOUR */
; 242  :     crc = crc ^ 0xffffffffUL;
; 243  :     while (len >= 8) {
; 244  :         DO8;
; 245  :         len -= 8;
; 246  :     }
; 247  :     if (len) do {
; 248  :         DO1;
; 249  :     } while (--len);
; 250  :     return crc ^ 0xffffffffUL;
; 251  : }

  0001a	c2 0c 00	 ret	 12			; 0000000cH
_crc32@12 ENDP
_TEXT	ENDS
PUBLIC	_get_crc_table@0
; Function compile flags: /Ogtpy
;	COMDAT _get_crc_table@0
_TEXT	SEGMENT
_get_crc_table@0 PROC					; COMDAT

; 207  : #ifdef DYNAMIC_CRC_TABLE
; 208  :     if (crc_table_empty)
; 209  :         make_crc_table();
; 210  : #endif /* DYNAMIC_CRC_TABLE */
; 211  :     return (const unsigned long FAR *)crc_table;

  00000	b8 00 00 00 00	 mov	 eax, OFFSET _crc_table

; 212  : }

  00005	c3		 ret	 0
_get_crc_table@0 ENDP
END

⌨️ 快捷键说明

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