📄 unzip.cod
字号:
; 916 : file_pos->num_of_file = s->num_file;
00023 8b 40 30 mov eax, DWORD PTR [eax+48]
00026 89 41 04 mov DWORD PTR [ecx+4], eax
; 917 :
; 918 : return UNZ_OK;
00029 33 c0 xor eax, eax
; 919 : }
0002b c2 08 00 ret 8
$LN2@unzGetFile:
; 910 : return UNZ_PARAMERROR;
0002e b8 9a ff ff ff mov eax, -102 ; ffffff9aH
; 919 : }
00033 c2 08 00 ret 8
_unzGetFilePos@8 ENDP
; Function compile flags: /Ogtpy
_TEXT ENDS
; COMDAT _unzlocal_DosDateToTmuDate
_TEXT SEGMENT
_unzlocal_DosDateToTmuDate PROC ; COMDAT
; _ulDosDate$ = ecx
; _ptm$ = edx
; 551 : {
00000 56 push esi
; 552 : uLong uDate;
; 553 : uDate = (uLong)(ulDosDate>>16);
00001 8b c1 mov eax, ecx
00003 c1 e8 10 shr eax, 16 ; 00000010H
; 554 : ptm->tm_mday = (uInt)(uDate&0x1f) ;
00006 8b f0 mov esi, eax
00008 83 e6 1f and esi, 31 ; 0000001fH
0000b 89 72 0c mov DWORD PTR [edx+12], esi
; 555 : ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ;
0000e 8b f0 mov esi, eax
; 556 : ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
00010 c1 e8 09 shr eax, 9
00013 83 e0 7f and eax, 127 ; 0000007fH
00016 05 bc 07 00 00 add eax, 1980 ; 000007bcH
0001b 89 42 14 mov DWORD PTR [edx+20], eax
; 557 :
; 558 : ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
0001e 8b c1 mov eax, ecx
00020 c1 e8 0b shr eax, 11 ; 0000000bH
00023 83 e0 1f and eax, 31 ; 0000001fH
00026 c1 ee 05 shr esi, 5
00029 89 42 08 mov DWORD PTR [edx+8], eax
; 559 : ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ;
0002c 8b c1 mov eax, ecx
0002e 83 e6 0f and esi, 15 ; 0000000fH
00031 83 ee 01 sub esi, 1
00034 c1 e8 05 shr eax, 5
; 560 : ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ;
00037 83 e1 1f and ecx, 31 ; 0000001fH
0003a 83 e0 3f and eax, 63 ; 0000003fH
0003d 03 c9 add ecx, ecx
0003f 89 72 10 mov DWORD PTR [edx+16], esi
00042 89 42 04 mov DWORD PTR [edx+4], eax
00045 89 0a mov DWORD PTR [edx], ecx
00047 5e pop esi
; 561 : }
00048 c3 ret 0
_unzlocal_DosDateToTmuDate ENDP
_TEXT ENDS
PUBLIC _unzGetGlobalInfo@8
; Function compile flags: /Ogtpy
; COMDAT _unzGetGlobalInfo@8
_TEXT SEGMENT
_file$ = 8 ; size = 4
_pglobal_info$ = 12 ; size = 4
_unzGetGlobalInfo@8 PROC ; COMDAT
; 536 : unz_s* s;
; 537 : if (file==NULL)
00000 8b 44 24 04 mov eax, DWORD PTR _file$[esp-4]
00004 85 c0 test eax, eax
00006 75 08 jne SHORT $LN1@unzGetGlob@2
; 538 : return UNZ_PARAMERROR;
00008 b8 9a ff ff ff mov eax, -102 ; ffffff9aH
; 542 : }
0000d c2 08 00 ret 8
$LN1@unzGetGlob@2:
; 539 : s=(unz_s*)file;
; 540 : *pglobal_info=s->gi;
00010 8b 50 24 mov edx, DWORD PTR [eax+36]
00013 8b 4c 24 08 mov ecx, DWORD PTR _pglobal_info$[esp-4]
00017 89 11 mov DWORD PTR [ecx], edx
00019 8b 40 28 mov eax, DWORD PTR [eax+40]
0001c 89 41 04 mov DWORD PTR [ecx+4], eax
; 541 : return UNZ_OK;
0001f 33 c0 xor eax, eax
; 542 : }
00021 c2 08 00 ret 8
_unzGetGlobalInfo@8 ENDP
; Function compile flags: /Ogtpy
_TEXT ENDS
; COMDAT _unzlocal_SearchCentralDir
_TEXT SEGMENT
_uMaxBack$ = -16 ; size = 4
_uBackRead$ = -12 ; size = 4
_uPosFound$ = -8 ; size = 4
_uSizeFile$ = -4 ; size = 4
_filestream$ = 8 ; size = 4
_unzlocal_SearchCentralDir PROC ; COMDAT
; _pzlib_filefunc_def$ = ebx
; 334 : {
00000 83 ec 10 sub esp, 16 ; 00000010H
; 335 : unsigned char* buf;
; 336 : uLong uSizeFile;
; 337 : uLong uBackRead;
; 338 : uLong uMaxBack=0xffff; /* maximum size of global comment */
; 339 : uLong uPosFound=0;
; 340 :
; 341 : if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
00003 8b 43 1c mov eax, DWORD PTR [ebx+28]
00006 8b 4b 10 mov ecx, DWORD PTR [ebx+16]
00009 55 push ebp
0000a 56 push esi
0000b 8b 74 24 1c mov esi, DWORD PTR _filestream$[esp+20]
0000f 6a 02 push 2
00011 6a 00 push 0
00013 56 push esi
00014 bd ff ff 00 00 mov ebp, 65535 ; 0000ffffH
00019 50 push eax
0001a 89 6c 24 18 mov DWORD PTR _uMaxBack$[esp+40], ebp
0001e c7 44 24 20 00
00 00 00 mov DWORD PTR _uPosFound$[esp+40], 0
00026 ff d1 call ecx
00028 83 c4 10 add esp, 16 ; 00000010H
0002b 85 c0 test eax, eax
0002d 74 08 je SHORT $LN14@unzlocal_S
0002f 5e pop esi
; 342 : return 0;
00030 33 c0 xor eax, eax
00032 5d pop ebp
; 386 : }
00033 83 c4 10 add esp, 16 ; 00000010H
00036 c3 ret 0
$LN14@unzlocal_S:
; 343 :
; 344 :
; 345 : uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
00037 8b 53 1c mov edx, DWORD PTR [ebx+28]
0003a 8b 43 0c mov eax, DWORD PTR [ebx+12]
0003d 57 push edi
0003e 56 push esi
0003f 52 push edx
00040 ff d0 call eax
00042 8b f8 mov edi, eax
00044 83 c4 08 add esp, 8
; 346 :
; 347 : if (uMaxBack>uSizeFile)
00047 3b fd cmp edi, ebp
00049 89 7c 24 18 mov DWORD PTR _uSizeFile$[esp+28], edi
0004d 73 06 jae SHORT $LN13@unzlocal_S
; 348 : uMaxBack = uSizeFile;
0004f 89 7c 24 0c mov DWORD PTR _uMaxBack$[esp+28], edi
00053 8b e8 mov ebp, eax
$LN13@unzlocal_S:
; 349 :
; 350 : buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
00055 68 04 04 00 00 push 1028 ; 00000404H
0005a ff 15 00 00 00
00 call DWORD PTR __imp__malloc
00060 8b f0 mov esi, eax
00062 83 c4 04 add esp, 4
; 351 : if (buf==NULL)
00065 85 f6 test esi, esi
00067 75 07 jne SHORT $LN12@unzlocal_S
00069 5f pop edi
0006a 5e pop esi
0006b 5d pop ebp
; 386 : }
0006c 83 c4 10 add esp, 16 ; 00000010H
0006f c3 ret 0
$LN12@unzlocal_S:
; 352 : return 0;
; 353 :
; 354 : uBackRead = 4;
00070 b8 04 00 00 00 mov eax, 4
; 355 : while (uBackRead<uMaxBack)
00075 3b e8 cmp ebp, eax
00077 0f 86 ad 00 00
00 jbe $LN28@unzlocal_S
0007d eb 0d jmp SHORT $LN11@unzlocal_S
0007f 90 npad 1
$LL27@unzlocal_S:
00080 8b 6c 24 0c mov ebp, DWORD PTR _uMaxBack$[esp+28]
00084 8b 7c 24 18 mov edi, DWORD PTR _uSizeFile$[esp+28]
00088 8b 44 24 10 mov eax, DWORD PTR _uBackRead$[esp+28]
$LN11@unzlocal_S:
; 356 : {
; 357 : uLong uReadSize,uReadPos ;
; 358 : int i;
; 359 : if (uBackRead+BUFREADCOMMENT>uMaxBack)
0008c 05 00 04 00 00 add eax, 1024 ; 00000400H
00091 3b c5 cmp eax, ebp
; 360 : uBackRead = uMaxBack;
00093 89 6c 24 10 mov DWORD PTR _uBackRead$[esp+28], ebp
00097 77 04 ja SHORT $LN8@unzlocal_S
; 361 : else
; 362 : uBackRead+=BUFREADCOMMENT;
00099 89 44 24 10 mov DWORD PTR _uBackRead$[esp+28], eax
$LN8@unzlocal_S:
; 363 : uReadPos = uSizeFile-uBackRead ;
0009d 8b ef mov ebp, edi
0009f 2b 6c 24 10 sub ebp, DWORD PTR _uBackRead$[esp+28]
; 364 :
; 365 : uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
; 366 : (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
000a3 8b c7 mov eax, edi
000a5 2b c5 sub eax, ebp
000a7 3d 04 04 00 00 cmp eax, 1028 ; 00000404H
000ac bf 04 04 00 00 mov edi, 1028 ; 00000404H
000b1 77 02 ja SHORT $LN18@unzlocal_S
000b3 8b f8 mov edi, eax
$LN18@unzlocal_S:
; 367 : if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
000b5 8b 4c 24 20 mov ecx, DWORD PTR _filestream$[esp+24]
000b9 8b 53 1c mov edx, DWORD PTR [ebx+28]
000bc 8b 43 10 mov eax, DWORD PTR [ebx+16]
000bf 6a 00 push 0
000c1 55 push ebp
000c2 51 push ecx
000c3 52 push edx
000c4 ff d0 call eax
000c6 83 c4 10 add esp, 16 ; 00000010H
000c9 85 c0 test eax, eax
000cb 75 5d jne SHORT $LN28@unzlocal_S
; 368 : break;
; 369 :
; 370 : if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
000cd 8b 4c 24 20 mov ecx, DWORD PTR _filestream$[esp+24]
000d1 8b 53 1c mov edx, DWORD PTR [ebx+28]
000d4 8b 43 04 mov eax, DWORD PTR [ebx+4]
000d7 57 push edi
000d8 56 push esi
000d9 51 push ecx
000da 52 push edx
000db ff d0 call eax
000dd 83 c4 10 add esp, 16 ; 00000010H
000e0 3b c7 cmp eax, edi
000e2 75 46 jne SHORT $LN28@unzlocal_S
; 371 : break;
; 372 :
; 373 : for (i=(int)uReadSize-3; (i--)>0;)
000e4 8d 47 fd lea eax, DWORD PTR [edi-3]
000e7 85 c0 test eax, eax
000e9 7e 31 jle SHORT $LN26@unzlocal_S
000eb eb 03 8d 49 00 npad 5
$LL5@unzlocal_S:
000f0 83 e8 01 sub eax, 1
; 374 : if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
; 375 : ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
000f3 80 3c 30 50 cmp BYTE PTR [eax+esi], 80 ; 00000050H
000f7 75 15 jne SHORT $LN3@unzlocal_S
000f9 80 7c 30 01 4b cmp BYTE PTR [eax+esi+1], 75 ; 0000004bH
000fe 75 0e jne SHORT $LN3@unzlocal_S
00100 80 7c 30 02 05 cmp BYTE PTR [eax+esi+2], 5
00105 75 07 jne SHORT $LN3@unzlocal_S
00107 80 7c 30 03 06 cmp BYTE PTR [eax+esi+3], 6
0010c 74 06 je SHORT $LN21@unzlocal_S
$LN3@unzlocal_S:
; 371 : break;
; 372 :
; 373 : for (i=(int)uReadSize-3; (i--)>0;)
0010e 85 c0 test eax, eax
00110 7f de jg SHORT $LL5@unzlocal_S
; 378 : break;
; 379 : }
; 380 :
; 381 : if (uPosFound!=0)
00112 eb 08 jmp SHORT $LN26@unzlocal_S
$LN21@unzlocal_S:
; 376 : {
; 377 : uPosFound = uReadPos+i;
00114 03 c5 add eax, ebp
00116 89 44 24 14 mov DWORD PTR _uPosFound$[esp+28], eax
; 378 : break;
; 379 : }
; 380 :
; 381 : if (uPosFound!=0)
0011a 75 0e jne SHORT $LN28@unzlocal_S
$LN26@unzlocal_S:
; 355 : while (uBackRead<uMaxBack)
0011c 8b 4c 24 0c mov ecx, DWORD PTR _uMaxBack$[esp+28]
00120 39 4c 24 10 cmp DWORD PTR _uBackRead$[esp+28], ecx
00124 0f 82 56 ff ff
ff jb $LL27@unzlocal_S
$LN28@unzlocal_S:
; 382 : break;
; 383 : }
; 384 : TRYFREE(buf);
0012a 56 push esi
0012b ff 15 00 00 00
00 call DWORD PTR __imp__free
; 385 : return uPosFound;
00131 8b 44 24 18 mov eax, DWORD PTR _uPosFound$[esp+32]
00135 83 c4 04 add esp, 4
00138 5f pop edi
00139 5e pop esi
0013a 5d pop ebp
; 386 : }
0013b 83 c4 10 add esp, 16 ; 00000010H
0013e c3 ret 0
_unzlocal_SearchCentralDir ENDP
; Function compile flags: /Ogtpy
_TEXT ENDS
; COMDAT _strcmpcasenosensitive_internal
_TEXT SEGMENT
_strcmpcasenosensitive_internal PROC ; COMDAT
; _fileName1$ = ecx
; _fileName2$ = eax
; 265 : {
00000 56 push esi
00001 57 push edi
00002 8b f8 mov edi, eax
00004 8b f1 mov esi, ecx
$LL8@strcmpcase:
; 266 : for (;;)
; 267 : {
; 268 : char c1=*(fileName1++);
00006 8a 0e mov cl, BYTE PTR [esi]
; 269 : char c2=*(fileName2++);
00008 8a 07 mov al, BYTE PTR [edi]
; 270 : if ((c1>='a') && (c1<='z'))
0000a 8a d1 mov dl, cl
0000c 80 ea 61 sub dl, 97 ; 00000061H
0000f 83 c6 01 add esi, 1
00012 83 c7 01 add edi, 1
00015 80 fa 19 cmp dl, 25 ; 00000019H
00018 77 03 ja SHORT $LN6@strcmpcase
; 271 : c1 -= 0x20;
0001a 80 c1 e0 add cl, -32 ; ffffffe0H
$LN6@strcmpcase:
; 272 : if ((c2>='a') && (c2<='z'))
0001d 8a d0 mov dl, al
0001f 80 ea 61 sub dl, 97 ; 00000061H
00022 80 fa 19 cmp dl, 25 ; 00000019H
00025 77 02 ja SHORT $LN5@strcmpcase
; 273 : c2 -= 0x20;
00027 04 e0 add al, -32 ; ffffffe0H
$LN5@strcmpcase:
; 274 : if (c1=='\0')
00029 84 c9 test cl, cl
0002b 74 12 je SHORT $LN13@strcmpcase
; 276 : if (c2=='\0')
0002d 84 c0 test al, al
0002f 74 06 je SHORT $LN16@strcmpcase
; 277 : return 1;
; 278 : if (c1<c2)
00031 3a c8 cmp cl, al
00033 7c 11 jl SHORT $LN15@strcmpcase
; 280 : if (c1>c2)
00035 7e cf jle SHORT $LL8@strcmpcase
$LN16@strcmpcase:
00037 5f pop edi
; 281 : return 1;
00038 b8 01 00 00 00 mov eax, 1
0003d 5e pop esi
; 282 : }
; 283 : }
0003e c3 ret 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -