📄 unzip.cod
字号:
000e1 8b 8b 80 00 00
00 mov ecx, DWORD PTR [ebx+128]
000e7 8b 53 7c mov edx, DWORD PTR [ebx+124]
000ea 56 push esi
000eb 50 push eax
000ec 8b 43 64 mov eax, DWORD PTR [ebx+100]
000ef 51 push ecx
000f0 52 push edx
000f1 ff d0 call eax
000f3 83 c4 10 add esp, 16 ; 00000010H
000f6 3b c6 cmp eax, esi
000f8 0f 85 2a 01 00
00 jne $LN38@unzReadCur
; 1284 :
; 1285 :
; 1286 : # ifndef NOUNCRYPT
; 1287 : if(s->encrypted)
000fe 83 bf a0 00 00
00 00 cmp DWORD PTR [edi+160], 0
00105 74 41 je SHORT $LN48@unzReadCur
; 1288 : {
; 1289 : uInt i;
; 1290 : for(i=0;i<uReadThis;i++)
00107 33 ed xor ebp, ebp
00109 85 f6 test esi, esi
0010b 76 3b jbe SHORT $LN48@unzReadCur
0010d 8d b7 a4 00 00
00 lea esi, DWORD PTR [edi+164]
$LL16@unzReadCur:
; 1291 : pfile_in_zip_read_info->read_buffer[i] =
; 1292 : zdecode(s->keys,s->pcrc_32_tab,
; 1293 : pfile_in_zip_read_info->read_buffer[i]);
00113 8b 0b mov ecx, DWORD PTR [ebx]
00115 8b c6 mov eax, esi
00117 8d 14 29 lea edx, DWORD PTR [ecx+ebp]
0011a e8 00 00 00 00 call _decrypt_byte
0011f 30 02 xor BYTE PTR [edx], al
00121 8b 13 mov edx, DWORD PTR [ebx]
00123 0f be 04 2a movsx eax, BYTE PTR [edx+ebp]
00127 8b bf b0 00 00
00 mov edi, DWORD PTR [edi+176]
0012d e8 00 00 00 00 call _update_keys
00132 8b 0b mov ecx, DWORD PTR [ebx]
00134 8b 7c 24 18 mov edi, DWORD PTR _file$[esp+16]
00138 88 04 29 mov BYTE PTR [ecx+ebp], al
0013b 83 c5 01 add ebp, 1
0013e 3b 6c 24 20 cmp ebp, DWORD PTR _uReadThis$80676[esp+16]
00142 72 cf jb SHORT $LL16@unzReadCur
; 1288 : {
; 1289 : uInt i;
; 1290 : for(i=0;i<uReadThis;i++)
00144 8b 74 24 20 mov esi, DWORD PTR _uReadThis$80676[esp+16]
$LN48@unzReadCur:
; 1294 : }
; 1295 : # endif
; 1296 :
; 1297 :
; 1298 : pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
; 1299 :
; 1300 : pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
; 1301 :
; 1302 : pfile_in_zip_read_info->stream.next_in =
; 1303 : (Bytef*)pfile_in_zip_read_info->read_buffer;
00148 8b 13 mov edx, DWORD PTR [ebx]
0014a 01 73 3c add DWORD PTR [ebx+60], esi
0014d 29 73 58 sub DWORD PTR [ebx+88], esi
00150 89 53 04 mov DWORD PTR [ebx+4], edx
; 1304 : pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
00153 89 73 08 mov DWORD PTR [ebx+8], esi
$LN22@unzReadCur:
; 1305 : }
; 1306 :
; 1307 : if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
00156 83 bb 84 00 00
00 00 cmp DWORD PTR [ebx+132], 0
0015d 74 5c je SHORT $LN12@unzReadCur
0015f 83 bb 8c 00 00
00 00 cmp DWORD PTR [ebx+140], 0
00166 75 53 jne SHORT $LN12@unzReadCur
; 1335 : }
; 1336 : else
; 1337 : {
; 1338 : uLong uTotalOutBefore,uTotalOutAfter;
; 1339 : const Bytef *bufBefore;
; 1340 : uLong uOutThis;
; 1341 : int flush=Z_SYNC_FLUSH;
; 1342 :
; 1343 : uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
; 1344 : bufBefore = pfile_in_zip_read_info->stream.next_out;
00168 8b 43 10 mov eax, DWORD PTR [ebx+16]
0016b 8b 7b 18 mov edi, DWORD PTR [ebx+24]
; 1345 :
; 1346 : /*
; 1347 : if ((pfile_in_zip_read_info->rest_read_uncompressed ==
; 1348 : pfile_in_zip_read_info->stream.avail_out) &&
; 1349 : (pfile_in_zip_read_info->rest_read_compressed == 0))
; 1350 : flush = Z_FINISH;
; 1351 : */
; 1352 : err=inflate(&pfile_in_zip_read_info->stream,flush);
0016e 6a 02 push 2
00170 8d 4b 04 lea ecx, DWORD PTR [ebx+4]
00173 51 push ecx
00174 89 44 24 28 mov DWORD PTR _bufBefore$80702[esp+24], eax
00178 e8 00 00 00 00 call _inflate@8
0017d 8b e8 mov ebp, eax
; 1353 :
; 1354 : if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))
0017f 85 ed test ebp, ebp
00181 7c 0b jl SHORT $LN4@unzReadCur
00183 83 7b 1c 00 cmp DWORD PTR [ebx+28], 0
00187 74 05 je SHORT $LN4@unzReadCur
; 1355 : err = Z_DATA_ERROR;
00189 bd fd ff ff ff mov ebp, -3 ; fffffffdH
$LN4@unzReadCur:
; 1356 :
; 1357 : uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
0018e 8b 73 18 mov esi, DWORD PTR [ebx+24]
; 1358 : uOutThis = uTotalOutAfter-uTotalOutBefore;
; 1359 :
; 1360 : pfile_in_zip_read_info->crc32 =
; 1361 : crc32(pfile_in_zip_read_info->crc32,bufBefore,
; 1362 : (uInt)(uOutThis));
00191 8b 54 24 20 mov edx, DWORD PTR _bufBefore$80702[esp+16]
00195 8b 43 50 mov eax, DWORD PTR [ebx+80]
00198 2b f7 sub esi, edi
0019a 56 push esi
0019b 52 push edx
0019c 50 push eax
0019d e8 00 00 00 00 call _crc32@12
; 1363 :
; 1364 : pfile_in_zip_read_info->rest_read_uncompressed -=
; 1365 : uOutThis;
001a2 29 73 5c sub DWORD PTR [ebx+92], esi
; 1366 :
; 1367 : iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
001a5 01 74 24 10 add DWORD PTR _iRead$[esp+20], esi
; 1368 :
; 1369 : if (err==Z_STREAM_END)
001a9 83 fd 01 cmp ebp, 1
001ac 89 43 50 mov DWORD PTR [ebx+80], eax
001af 74 6b je SHORT $LN44@unzReadCur
; 1370 : return (iRead==0) ? UNZ_EOF : iRead;
; 1371 : if (err!=Z_OK)
001b1 85 ed test ebp, ebp
001b3 75 7e jne SHORT $LN1@unzReadCur
001b5 8b 7c 24 18 mov edi, DWORD PTR _file$[esp+16]
001b9 eb 57 jmp SHORT $LN2@unzReadCur
$LN12@unzReadCur:
; 1308 : {
; 1309 : uInt uDoCopy,i ;
; 1310 :
; 1311 : if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
; 1312 : (pfile_in_zip_read_info->rest_read_compressed == 0))
001bb 8b 43 08 mov eax, DWORD PTR [ebx+8]
001be 85 c0 test eax, eax
001c0 75 05 jne SHORT $LN11@unzReadCur
001c2 39 43 58 cmp DWORD PTR [ebx+88], eax
001c5 74 55 je SHORT $LN44@unzReadCur
$LN11@unzReadCur:
; 1313 : return (iRead==0) ? UNZ_EOF : iRead;
; 1314 :
; 1315 : if (pfile_in_zip_read_info->stream.avail_out <
; 1316 : pfile_in_zip_read_info->stream.avail_in)
001c7 8b 73 14 mov esi, DWORD PTR [ebx+20]
001ca 3b f0 cmp esi, eax
; 1317 : uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
; 1318 : else
001cc 72 02 jb SHORT $LN9@unzReadCur
; 1319 : uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
001ce 8b f0 mov esi, eax
$LN9@unzReadCur:
; 1320 :
; 1321 : for (i=0;i<uDoCopy;i++)
001d0 33 c0 xor eax, eax
001d2 85 f6 test esi, esi
001d4 76 13 jbe SHORT $LN6@unzReadCur
$LL8@unzReadCur:
; 1322 : *(pfile_in_zip_read_info->stream.next_out+i) =
; 1323 : *(pfile_in_zip_read_info->stream.next_in+i);
001d6 8b 4b 04 mov ecx, DWORD PTR [ebx+4]
001d9 8a 0c 08 mov cl, BYTE PTR [eax+ecx]
001dc 8b 53 10 mov edx, DWORD PTR [ebx+16]
001df 88 0c 10 mov BYTE PTR [eax+edx], cl
001e2 83 c0 01 add eax, 1
001e5 3b c6 cmp eax, esi
001e7 72 ed jb SHORT $LL8@unzReadCur
$LN6@unzReadCur:
; 1324 :
; 1325 : pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
; 1326 : pfile_in_zip_read_info->stream.next_out,
; 1327 : uDoCopy);
001e9 8b 6b 10 mov ebp, DWORD PTR [ebx+16]
001ec 8b 53 50 mov edx, DWORD PTR [ebx+80]
001ef 56 push esi
001f0 55 push ebp
001f1 52 push edx
001f2 e8 00 00 00 00 call _crc32@12
; 1328 : pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
001f7 29 73 5c sub DWORD PTR [ebx+92], esi
; 1329 : pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
001fa 29 73 08 sub DWORD PTR [ebx+8], esi
; 1330 : pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
001fd 29 73 14 sub DWORD PTR [ebx+20], esi
; 1331 : pfile_in_zip_read_info->stream.next_out += uDoCopy;
; 1332 : pfile_in_zip_read_info->stream.next_in += uDoCopy;
00200 01 73 04 add DWORD PTR [ebx+4], esi
; 1333 : pfile_in_zip_read_info->stream.total_out += uDoCopy;
00203 01 73 18 add DWORD PTR [ebx+24], esi
00206 03 ee add ebp, esi
; 1334 : iRead += uDoCopy;
00208 01 74 24 10 add DWORD PTR _iRead$[esp+20], esi
0020c 89 43 50 mov DWORD PTR [ebx+80], eax
0020f 89 6b 10 mov DWORD PTR [ebx+16], ebp
$LN2@unzReadCur:
; 1262 :
; 1263 : while (pfile_in_zip_read_info->stream.avail_out>0)
00212 83 7b 14 00 cmp DWORD PTR [ebx+20], 0
00216 0f 87 74 fe ff
ff ja $LL24@unzReadCur
$LN44@unzReadCur:
; 1372 : break;
; 1373 : }
; 1374 : }
; 1375 :
; 1376 : if (err==Z_OK)
; 1377 : return iRead;
0021c 8b 44 24 10 mov eax, DWORD PTR _iRead$[esp+20]
00220 5e pop esi
00221 5d pop ebp
00222 5b pop ebx
00223 5f pop edi
; 1379 : }
00224 59 pop ecx
00225 c2 0c 00 ret 12 ; 0000000cH
$LN38@unzReadCur:
00228 5e pop esi
00229 5d pop ebp
0022a 5b pop ebx
; 1283 : return UNZ_ERRNO;
0022b 83 c8 ff or eax, -1
0022e 5f pop edi
; 1379 : }
0022f 59 pop ecx
00230 c2 0c 00 ret 12 ; 0000000cH
$LN1@unzReadCur:
00233 5e pop esi
; 1378 : return err;
00234 8b c5 mov eax, ebp
00236 5d pop ebp
00237 5b pop ebx
00238 5f pop edi
; 1379 : }
00239 59 pop ecx
0023a c2 0c 00 ret 12 ; 0000000cH
_unzReadCurrentFile@12 ENDP
; Function compile flags: /Ogtpy
_TEXT ENDS
; COMDAT _unzlocal_CheckCurrentFileCoherencyHeader
_TEXT SEGMENT
_uFlags$ = -4 ; size = 4
_size_extra_field$ = 8 ; size = 4
_size_filename$ = 8 ; size = 4
_uData$ = 8 ; size = 4
_uMagic$ = 8 ; size = 4
_piSizeVar$ = 8 ; size = 4
_poffset_local_extrafield$ = 12 ; size = 4
_psize_local_extrafield$ = 16 ; size = 4
_unzlocal_CheckCurrentFileCoherencyHeader PROC ; COMDAT
; _s$ = esi
; 964 : {
00000 51 push ecx
; 965 : uLong uMagic,uData,uFlags;
; 966 : uLong size_filename;
; 967 : uLong size_extra_field;
; 968 : int err=UNZ_OK;
; 969 :
; 970 : *piSizeVar = 0;
; 971 : *poffset_local_extrafield = 0;
; 972 : *psize_local_extrafield = 0;
; 973 :
; 974 : if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
; 975 : s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
00001 8b 56 2c mov edx, DWORD PTR [esi+44]
00004 03 96 98 00 00
00 add edx, DWORD PTR [esi+152]
0000a 8b 44 24 0c mov eax, DWORD PTR _poffset_local_extrafield$[esp]
0000e 8b 4c 24 10 mov ecx, DWORD PTR _psize_local_extrafield$[esp]
00012 55 push ebp
00013 8b 6c 24 0c mov ebp, DWORD PTR _piSizeVar$[esp+4]
00017 57 push edi
00018 33 ff xor edi, edi
0001a 57 push edi
0001b 52 push edx
0001c 8b 56 10 mov edx, DWORD PTR [esi+16]
0001f 89 38 mov DWORD PTR [eax], edi
00021 8b 46 20 mov eax, DWORD PTR [esi+32]
00024 89 39 mov DWORD PTR [ecx], edi
00026 8b 4e 1c mov ecx, DWORD PTR [esi+28]
00029 50 push eax
0002a 51 push ecx
0002b 89 7d 00 mov DWORD PTR [ebp], edi
0002e ff d2 call edx
00030 83 c4 10 add esp, 16 ; 00000010H
00033 85 c0 test eax, eax
00035 74 07 je SHORT $LN28@unzlocal_C
00037 5f pop edi
; 976 : return UNZ_ERRNO;
00038 83 c8 ff or eax, -1
0003b 5d pop ebp
; 1041 : }
0003c 59 pop ecx
0003d c3 ret 0
$LN28@unzlocal_C:
; 977 :
; 978 :
; 979 : if (err==UNZ_OK)
; 980 : if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
0003e 8d 44 24 10 lea eax, DWORD PTR _uMagic$[esp+8]
00042 50 push eax
00043 8b 46 20 mov eax, DWORD PTR [esi+32]
00046 8b ce mov ecx, esi
00048 e8 00 00 00 00 call _unzlocal_getLong
0004d 83 c4 04 add esp, 4
00050 85 c0 test eax, eax
00052 74 05 je SHORT $LN23@unzlocal_C
; 981 : err=UNZ_ERRNO;
00054 83 cf ff or edi, -1
00057 eb 0f jmp SHORT $LN30@unzlocal_C
$LN23@unzlocal_C:
; 982 : else if (uMagic!=0x04034b50)
00059 81 7c 24 10 50
4b 03 04 cmp DWORD PTR _uMagic$[esp+8], 67324752 ; 04034b50H
00061 74 05 je SHORT $LN30@unzlocal_C
; 983 : err=UNZ_BADZIPFILE;
00063 bf 99 ff ff ff mov edi, -103 ; ffffff99H
$LN30@unzlocal_C:
; 984 :
; 985 : if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
00068 8b 46 20 mov eax, DWORD PTR [esi+32]
0006b 8d 4c 24 10 lea ecx, DWORD PTR _uData$[esp+8]
0006f 51 push ecx
00070 8b ce mov ecx, esi
00072 e8 00 00 00 00 call _unzlocal_getShort
00077 83 c4 04 add esp, 4
0007a 85 c0 test eax, eax
0007c 74 03 je SHORT $LN31@unzlocal_C
; 986 : err=UNZ_ERRNO;
0007e 83 cf ff or edi, -1
$LN31@unzlocal_C:
; 987 : /*
; 988 : else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
; 989 : err=UNZ_BADZIPFILE;
; 990 : */
; 991 : if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
00081 8b 46 20 mov eax, DWORD PTR [esi+32]
00084 8d 54 24 08 lea edx, DWORD PTR _uFlags$[esp+12]
00088 52 push edx
00089 8b ce mov ecx, esi
0008b e8 00 00 00 00 call _unzlocal_getShort
00090 83 c4 04 add esp, 4
00093 85 c0 test eax, eax
00095 74 03 je SHORT $LN32@unzlocal_C
; 992 : err=UNZ_ERRNO;
00097 83 cf ff or edi, -1
$LN32@unzlocal_C:
; 993 :
; 994 : if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
0009a 8d 44 24 10 lea eax, DWORD PTR _uData$[esp+8]
0009e 50 push eax
0009f 8b 46 20 mov eax, DWORD PTR [esi+32]
000a2 8b ce mov ecx, esi
000a4 e8 00 00 00 00 call _unzlocal_getShort
000a9 83 c4 04 add esp, 4
000ac 85 c0 test eax, eax
000ae 74 05 je SHORT $LN18@unzlocal_C
; 995 : err=UNZ_ERRNO;
000b0 83 cf ff or edi, -1
000b3 eb 1b jmp SHORT $LN33@unzlocal_C
$LN18@unzlocal_C:
; 996 : else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compre
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -