提交 88f17a5e 编写于 作者: B Bodo Möller

Remove Win32 assembler files. They are always rebuilt (with some

choice of parameters) when they are needed.
上级 863fe2ec
; Don't even think of reading this code
; It was automatically generated by bf-586.pl
; Which is a perl program used to generate the x86 assember for
; any of elf, a.out, BSDI,Win32, or Solaris
; eric <eay@cryptsoft.com>
;
TITLE bf-586.asm
.486
.model FLAT
_TEXT SEGMENT
PUBLIC _BF_encrypt
_BF_encrypt PROC NEAR
;
push ebp
push ebx
mov ebx, DWORD PTR 12[esp]
mov ebp, DWORD PTR 16[esp]
push esi
push edi
; Load the 2 words
mov edi, DWORD PTR [ebx]
mov esi, DWORD PTR 4[ebx]
xor eax, eax
mov ebx, DWORD PTR [ebp]
xor ecx, ecx
xor edi, ebx
;
; Round 0
mov edx, DWORD PTR 4[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 1
mov edx, DWORD PTR 8[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 2
mov edx, DWORD PTR 12[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 3
mov edx, DWORD PTR 16[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 4
mov edx, DWORD PTR 20[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 5
mov edx, DWORD PTR 24[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 6
mov edx, DWORD PTR 28[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 7
mov edx, DWORD PTR 32[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 8
mov edx, DWORD PTR 36[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 9
mov edx, DWORD PTR 40[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 10
mov edx, DWORD PTR 44[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 11
mov edx, DWORD PTR 48[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 12
mov edx, DWORD PTR 52[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 13
mov edx, DWORD PTR 56[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 14
mov edx, DWORD PTR 60[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 15
mov edx, DWORD PTR 64[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
; Load parameter 0 (16) enc=1
mov eax, DWORD PTR 20[esp]
xor edi, ebx
mov edx, DWORD PTR 68[ebp]
xor esi, edx
mov DWORD PTR 4[eax],edi
mov DWORD PTR [eax],esi
pop edi
pop esi
pop ebx
pop ebp
ret
_BF_encrypt ENDP
_TEXT ENDS
_TEXT SEGMENT
PUBLIC _BF_decrypt
_BF_decrypt PROC NEAR
;
push ebp
push ebx
mov ebx, DWORD PTR 12[esp]
mov ebp, DWORD PTR 16[esp]
push esi
push edi
; Load the 2 words
mov edi, DWORD PTR [ebx]
mov esi, DWORD PTR 4[ebx]
xor eax, eax
mov ebx, DWORD PTR 68[ebp]
xor ecx, ecx
xor edi, ebx
;
; Round 16
mov edx, DWORD PTR 64[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 15
mov edx, DWORD PTR 60[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 14
mov edx, DWORD PTR 56[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 13
mov edx, DWORD PTR 52[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 12
mov edx, DWORD PTR 48[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 11
mov edx, DWORD PTR 44[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 10
mov edx, DWORD PTR 40[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 9
mov edx, DWORD PTR 36[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 8
mov edx, DWORD PTR 32[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 7
mov edx, DWORD PTR 28[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 6
mov edx, DWORD PTR 24[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 5
mov edx, DWORD PTR 20[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 4
mov edx, DWORD PTR 16[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 3
mov edx, DWORD PTR 12[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor edi, ebx
;
; Round 2
mov edx, DWORD PTR 8[ebp]
mov ebx, edi
xor esi, edx
shr ebx, 16
mov edx, edi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
xor eax, eax
xor esi, ebx
;
; Round 1
mov edx, DWORD PTR 4[ebp]
mov ebx, esi
xor edi, edx
shr ebx, 16
mov edx, esi
mov al, bh
and ebx, 255
mov cl, dh
and edx, 255
mov eax, DWORD PTR 72[eax*4+ebp]
mov ebx, DWORD PTR 1096[ebx*4+ebp]
add ebx, eax
mov eax, DWORD PTR 2120[ecx*4+ebp]
xor ebx, eax
mov edx, DWORD PTR 3144[edx*4+ebp]
add ebx, edx
; Load parameter 0 (1) enc=0
mov eax, DWORD PTR 20[esp]
xor edi, ebx
mov edx, DWORD PTR [ebp]
xor esi, edx
mov DWORD PTR 4[eax],edi
mov DWORD PTR [eax],esi
pop edi
pop esi
pop ebx
pop ebp
ret
_BF_decrypt ENDP
_TEXT ENDS
_TEXT SEGMENT
PUBLIC _BF_cbc_encrypt
_BF_cbc_encrypt PROC NEAR
;
push ebp
push ebx
push esi
push edi
mov ebp, DWORD PTR 28[esp]
; getting iv ptr from parameter 4
mov ebx, DWORD PTR 36[esp]
mov esi, DWORD PTR [ebx]
mov edi, DWORD PTR 4[ebx]
push edi
push esi
push edi
push esi
mov ebx, esp
mov esi, DWORD PTR 36[esp]
mov edi, DWORD PTR 40[esp]
; getting encrypt flag from parameter 5
mov ecx, DWORD PTR 56[esp]
; get and push parameter 3
mov eax, DWORD PTR 48[esp]
push eax
push ebx
cmp ecx, 0
jz $L000decrypt
and ebp, 4294967288
mov eax, DWORD PTR 8[esp]
mov ebx, DWORD PTR 12[esp]
jz $L001encrypt_finish
L002encrypt_loop:
mov ecx, DWORD PTR [esi]
mov edx, DWORD PTR 4[esi]
xor eax, ecx
xor ebx, edx
bswap eax
bswap ebx
mov DWORD PTR 8[esp],eax
mov DWORD PTR 12[esp],ebx
call _BF_encrypt
mov eax, DWORD PTR 8[esp]
mov ebx, DWORD PTR 12[esp]
bswap eax
bswap ebx
mov DWORD PTR [edi],eax
mov DWORD PTR 4[edi],ebx
add esi, 8
add edi, 8
sub ebp, 8
jnz L002encrypt_loop
$L001encrypt_finish:
mov ebp, DWORD PTR 52[esp]
and ebp, 7
jz $L003finish
xor ecx, ecx
xor edx, edx
mov ebp, DWORD PTR $L004cbc_enc_jmp_table[ebp*4]
jmp ebp
L005ej7:
mov dh, BYTE PTR 6[esi]
shl edx, 8
L006ej6:
mov dh, BYTE PTR 5[esi]
L007ej5:
mov dl, BYTE PTR 4[esi]
L008ej4:
mov ecx, DWORD PTR [esi]
jmp $L009ejend
L010ej3:
mov ch, BYTE PTR 2[esi]
shl ecx, 8
L011ej2:
mov ch, BYTE PTR 1[esi]
L012ej1:
mov cl, BYTE PTR [esi]
$L009ejend:
xor eax, ecx
xor ebx, edx
bswap eax
bswap ebx
mov DWORD PTR 8[esp],eax
mov DWORD PTR 12[esp],ebx
call _BF_encrypt
mov eax, DWORD PTR 8[esp]
mov ebx, DWORD PTR 12[esp]
bswap eax
bswap ebx
mov DWORD PTR [edi],eax
mov DWORD PTR 4[edi],ebx
jmp $L003finish
$L000decrypt:
and ebp, 4294967288
mov eax, DWORD PTR 16[esp]
mov ebx, DWORD PTR 20[esp]
jz $L013decrypt_finish
L014decrypt_loop:
mov eax, DWORD PTR [esi]
mov ebx, DWORD PTR 4[esi]
bswap eax
bswap ebx
mov DWORD PTR 8[esp],eax
mov DWORD PTR 12[esp],ebx
call _BF_decrypt
mov eax, DWORD PTR 8[esp]
mov ebx, DWORD PTR 12[esp]
bswap eax
bswap ebx
mov ecx, DWORD PTR 16[esp]
mov edx, DWORD PTR 20[esp]
xor ecx, eax
xor edx, ebx
mov eax, DWORD PTR [esi]
mov ebx, DWORD PTR 4[esi]
mov DWORD PTR [edi],ecx
mov DWORD PTR 4[edi],edx
mov DWORD PTR 16[esp],eax
mov DWORD PTR 20[esp],ebx
add esi, 8
add edi, 8
sub ebp, 8
jnz L014decrypt_loop
$L013decrypt_finish:
mov ebp, DWORD PTR 52[esp]
and ebp, 7
jz $L003finish
mov eax, DWORD PTR [esi]
mov ebx, DWORD PTR 4[esi]
bswap eax
bswap ebx
mov DWORD PTR 8[esp],eax
mov DWORD PTR 12[esp],ebx
call _BF_decrypt
mov eax, DWORD PTR 8[esp]
mov ebx, DWORD PTR 12[esp]
bswap eax
bswap ebx
mov ecx, DWORD PTR 16[esp]
mov edx, DWORD PTR 20[esp]
xor ecx, eax
xor edx, ebx
mov eax, DWORD PTR [esi]
mov ebx, DWORD PTR 4[esi]
L015dj7:
ror edx, 16
mov BYTE PTR 6[edi],dl
shr edx, 16
L016dj6:
mov BYTE PTR 5[edi],dh
L017dj5:
mov BYTE PTR 4[edi],dl
L018dj4:
mov DWORD PTR [edi],ecx
jmp $L019djend
L020dj3:
ror ecx, 16
mov BYTE PTR 2[edi],cl
shl ecx, 16
L021dj2:
mov BYTE PTR 1[esi],ch
L022dj1:
mov BYTE PTR [esi], cl
$L019djend:
jmp $L003finish
$L003finish:
mov ecx, DWORD PTR 60[esp]
add esp, 24
mov DWORD PTR [ecx],eax
mov DWORD PTR 4[ecx],ebx
pop edi
pop esi
pop ebx
pop ebp
ret
$L004cbc_enc_jmp_table:
DD 0
DD L012ej1
DD L011ej2
DD L010ej3
DD L008ej4
DD L007ej5
DD L006ej6
DD L005ej7
L023cbc_dec_jmp_table:
DD 0
DD L022dj1
DD L021dj2
DD L020dj3
DD L018dj4
DD L017dj5
DD L016dj6
DD L015dj7
_BF_cbc_encrypt ENDP
_TEXT ENDS
END
此差异已折叠。
; Static Name Aliases
;
TITLE bn_mulw.c
.8087
F_TEXT SEGMENT WORD PUBLIC 'CODE'
F_TEXT ENDS
_DATA SEGMENT WORD PUBLIC 'DATA'
_DATA ENDS
_CONST SEGMENT WORD PUBLIC 'CONST'
_CONST ENDS
_BSS SEGMENT WORD PUBLIC 'BSS'
_BSS ENDS
DGROUP GROUP _CONST, _BSS, _DATA
ASSUME DS: DGROUP, SS: DGROUP
F_TEXT SEGMENT
ASSUME CS: F_TEXT
PUBLIC _bn_mul_add_words
_bn_mul_add_words PROC FAR
; Line 58
push bp
push bx
push si
push di
push ds
push es
mov bp,sp
; w = 26
; num = 24
; ap = 20
; rp = 16
xor si,si ;c=0;
mov di,WORD PTR [bp+16] ; load r
mov ds,WORD PTR [bp+18] ; load r
mov bx,WORD PTR [bp+20] ; load a
mov es,WORD PTR [bp+22] ; load a
mov cx,WORD PTR [bp+26] ; load w
mov bp,WORD PTR [bp+24] ; load num
shr bp,1 ; div count by 4 and do groups of 4
shr bp,1
je $L555
$L546:
mov ax,cx
mul WORD PTR es:[bx] ; w* *a
add ax,WORD PTR ds:[di] ; + *r
adc dx,0
adc ax,si
adc dx,0
mov WORD PTR ds:[di],ax
mov si,dx
;
mov ax,cx
mul WORD PTR es:[bx+2] ; w* *a
add ax,WORD PTR ds:[di+2] ; + *r
adc dx,0
adc ax,si
adc dx,0
mov WORD PTR ds:[di+2],ax
mov si,dx
;
mov ax,cx
mul WORD PTR es:[bx+4] ; w* *a
add ax,WORD PTR ds:[di+4] ; + *r
adc dx,0
adc ax,si
adc dx,0
mov WORD PTR ds:[di+4],ax
mov si,dx
;
mov ax,cx
mul WORD PTR es:[bx+6] ; w* *a
add ax,WORD PTR ds:[di+6] ; + *r
adc dx,0
adc ax,si
adc dx,0
mov WORD PTR ds:[di+6],ax
mov si,dx
;
add bx,8
add di,8
;
dec bp
je $L555
jmp $L546
;
;
$L555:
mov bp,sp
mov bp,WORD PTR [bp+24] ; load num
and bp,3
dec bp
js $L547
mov ax,cx
mul WORD PTR es:[bx] ; w* *a
add ax,WORD PTR ds:[di] ; + *r
adc dx,0
adc ax,si
adc dx,0
mov WORD PTR ds:[di],ax
mov si,dx
dec bp
js $L547 ; Note that we are now testing for -1
;
mov ax,cx
mul WORD PTR es:[bx+2] ; w* *a
add ax,WORD PTR ds:[di+2] ; + *r
adc dx,0
adc ax,si
adc dx,0
mov WORD PTR ds:[di+2],ax
mov si,dx
dec bp
js $L547
;
mov ax,cx
mul WORD PTR es:[bx+4] ; w* *a
add ax,WORD PTR ds:[di+4] ; + *r
adc dx,0
adc ax,si
adc dx,0
mov WORD PTR ds:[di+4],ax
mov si,dx
$L547:
mov ax,si
pop es
pop ds
pop di
pop si
pop bx
pop bp
ret
nop
_bn_mul_add_words ENDP
PUBLIC _bn_mul_words
_bn_mul_words PROC FAR
; Line 76
push bp
push bx
push si
push di
push ds
push es
xor si,si
mov bp,sp
mov di,WORD PTR [bp+16] ; r
mov ds,WORD PTR [bp+18]
mov bx,WORD PTR [bp+20] ; a
mov es,WORD PTR [bp+22]
mov cx,WORD PTR [bp+26] ; w
mov bp,WORD PTR [bp+24] ; num
$FC743:
mov ax,cx
mul WORD PTR es:[bx]
add ax,si
adc dx,0
mov WORD PTR ds:[di],ax
mov si,dx
dec bp
je $L764
;
mov ax,cx
mul WORD PTR es:[bx+2]
add ax,si
adc dx,0
mov WORD PTR ds:[di+2],ax
mov si,dx
dec bp
je $L764
;
mov ax,cx
mul WORD PTR es:[bx+4]
add ax,si
adc dx,0
mov WORD PTR ds:[di+4],ax
mov si,dx
dec bp
je $L764
;
mov ax,cx
mul WORD PTR es:[bx+6]
add ax,si
adc dx,0
mov WORD PTR ds:[di+6],ax
mov si,dx
dec bp
je $L764
;
add bx,8
add di,8
jmp $FC743
nop
$L764:
mov ax,si
pop es
pop ds
pop di
pop si
pop bx
pop bp
ret
nop
_bn_mul_words ENDP
PUBLIC _bn_sqr_words
_bn_sqr_words PROC FAR
; Line 92
push bp
push bx
push si
push di
push ds
push es
mov bp,sp
mov si,WORD PTR [bp+16]
mov ds,WORD PTR [bp+18]
mov di,WORD PTR [bp+20]
mov es,WORD PTR [bp+22]
mov bx,WORD PTR [bp+24]
mov bp,bx ; save a memory lookup later
shr bx,1 ; div count by 4 and do groups of 4
shr bx,1
je $L666
$L765:
mov ax,WORD PTR es:[di]
mul ax
mov WORD PTR ds:[si],ax
mov WORD PTR ds:[si+2],dx
;
mov ax,WORD PTR es:[di+2]
mul ax
mov WORD PTR ds:[si+4],ax
mov WORD PTR ds:[si+6],dx
;
mov ax,WORD PTR es:[di+4]
mul ax
mov WORD PTR ds:[si+8],ax
mov WORD PTR ds:[si+10],dx
;
mov ax,WORD PTR es:[di+6]
mul ax
mov WORD PTR ds:[si+12],ax
mov WORD PTR ds:[si+14],dx
;
add di,8
add si,16
dec bx
je $L666
jmp $L765
$L666:
and bp,3
dec bp ; The copied value of bx (num)
js $L645
;
mov ax,WORD PTR es:[di]
mul ax
mov WORD PTR ds:[si],ax
mov WORD PTR ds:[si+2],dx
dec bp
js $L645
;
mov ax,WORD PTR es:[di+2]
mul ax
mov WORD PTR ds:[si+4],ax
mov WORD PTR ds:[si+6],dx
dec bp
js $L645
;
mov ax,WORD PTR es:[di+4]
mul ax
mov WORD PTR ds:[si+8],ax
mov WORD PTR ds:[si+10],dx
$L645:
pop es
pop ds
pop di
pop si
pop bx
pop bp
ret
_bn_sqr_words ENDP
PUBLIC _bn_div64
_bn_div64 PROC FAR
push bp
mov bp,sp
mov dx, WORD PTR [bp+6]
mov ax, WORD PTR [bp+8]
div WORD PTR [bp+10]
pop bp
ret
_bn_div64 ENDP
F_TEXT ENDS
END
; Static Name Aliases
;
TITLE bn_mulw.c
.386
F_TEXT SEGMENT WORD USE16 PUBLIC 'CODE'
F_TEXT ENDS
_DATA SEGMENT WORD USE16 PUBLIC 'DATA'
_DATA ENDS
_CONST SEGMENT WORD USE16 PUBLIC 'CONST'
_CONST ENDS
_BSS SEGMENT WORD USE16 PUBLIC 'BSS'
_BSS ENDS
DGROUP GROUP _CONST, _BSS, _DATA
ASSUME DS: DGROUP, SS: DGROUP
F_TEXT SEGMENT
ASSUME CS: F_TEXT
PUBLIC _bn_mul_add_words
_bn_mul_add_words PROC FAR
; Line 58
push bp
push bx
push esi
push di
push ds
push es
mov bp,sp
; w = 28
; num = 26
; ap = 22
; rp = 18
xor esi,esi ;c=0;
mov di,WORD PTR [bp+18] ; load r
mov ds,WORD PTR [bp+20] ; load r
mov bx,WORD PTR [bp+22] ; load a
mov es,WORD PTR [bp+24] ; load a
mov ecx,DWORD PTR [bp+28] ; load w
mov bp,WORD PTR [bp+26] ; load num
shr bp,1 ; div count by 4 and do groups of 4
shr bp,1
je $L555
$L546:
mov eax,ecx
mul DWORD PTR es:[bx] ; w* *a
add eax,DWORD PTR ds:[di] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di],eax
mov esi,edx
;
mov eax,ecx
mul DWORD PTR es:[bx+4] ; w* *a
add eax,DWORD PTR ds:[di+4] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di+4],eax
mov esi,edx
;
mov eax,ecx
mul DWORD PTR es:[bx+8] ; w* *a
add eax,DWORD PTR ds:[di+8] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di+8],eax
mov esi,edx
;
mov eax,ecx
mul DWORD PTR es:[bx+12] ; w* *a
add eax,DWORD PTR ds:[di+12] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di+12],eax
mov esi,edx
;
add bx,16
add di,16
;
dec bp
je $L555
jmp $L546
;
;
$L555:
mov bp,sp
mov bp,WORD PTR [bp+26] ; load num
and bp,3
dec bp
js $L547m
mov eax,ecx
mul DWORD PTR es:[bx] ; w* *a
add eax,DWORD PTR ds:[di] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di],eax
mov esi,edx
dec bp
js $L547m ; Note that we are now testing for -1
;
mov eax,ecx
mul DWORD PTR es:[bx+4] ; w* *a
add eax,DWORD PTR ds:[di+4] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di+4],eax
mov esi,edx
dec bp
js $L547m
;
mov eax,ecx
mul DWORD PTR es:[bx+8] ; w* *a
add eax,DWORD PTR ds:[di+8] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di+8],eax
mov esi,edx
$L547m:
mov eax,esi
mov edx,esi
shr edx,16
pop es
pop ds
pop di
pop esi
pop bx
pop bp
ret
nop
_bn_mul_add_words ENDP
PUBLIC _bn_mul_words
_bn_mul_words PROC FAR
; Line 76
push bp
push bx
push esi
push di
push ds
push es
xor esi,esi
mov bp,sp
mov di,WORD PTR [bp+18] ; r
mov ds,WORD PTR [bp+20]
mov bx,WORD PTR [bp+22] ; a
mov es,WORD PTR [bp+24]
mov ecx,DWORD PTR [bp+28] ; w
mov bp,WORD PTR [bp+26] ; num
$FC743:
mov eax,ecx
mul DWORD PTR es:[bx]
add eax,esi
adc edx,0
mov DWORD PTR ds:[di],eax
mov esi,edx
dec bp
je $L764
;
mov eax,ecx
mul DWORD PTR es:[bx+4]
add eax,esi
adc edx,0
mov DWORD PTR ds:[di+4],eax
mov esi,edx
dec bp
je $L764
;
mov eax,ecx
mul DWORD PTR es:[bx+8]
add eax,esi
adc edx,0
mov DWORD PTR ds:[di+8],eax
mov esi,edx
dec bp
je $L764
;
mov eax,ecx
mul DWORD PTR es:[bx+12]
add eax,esi
adc edx,0
mov DWORD PTR ds:[di+12],eax
mov esi,edx
dec bp
je $L764
;
add bx,16
add di,16
jmp $FC743
nop
$L764:
mov eax,esi
mov edx,esi
shr edx,16
pop es
pop ds
pop di
pop esi
pop bx
pop bp
ret
nop
_bn_mul_words ENDP
PUBLIC _bn_sqr_words
_bn_sqr_words PROC FAR
; Line 92
push bp
push bx
push si
push di
push ds
push es
mov bp,sp
mov si,WORD PTR [bp+16]
mov ds,WORD PTR [bp+18]
mov di,WORD PTR [bp+20]
mov es,WORD PTR [bp+22]
mov bx,WORD PTR [bp+24]
mov bp,bx ; save a memory lookup later
shr bx,1 ; div count by 4 and do groups of 4
shr bx,1
je $L666
$L765:
mov eax,DWORD PTR es:[di]
mul eax
mov DWORD PTR ds:[si],eax
mov DWORD PTR ds:[si+4],edx
;
mov eax,DWORD PTR es:[di+4]
mul eax
mov DWORD PTR ds:[si+8],eax
mov DWORD PTR ds:[si+12],edx
;
mov eax,DWORD PTR es:[di+8]
mul eax
mov DWORD PTR ds:[si+16],eax
mov DWORD PTR ds:[si+20],edx
;
mov eax,DWORD PTR es:[di+12]
mul eax
mov DWORD PTR ds:[si+24],eax
mov DWORD PTR ds:[si+28],edx
;
add di,16
add si,32
dec bx
je $L666
jmp $L765
$L666:
and bp,3
dec bp ; The copied value of bx (num)
js $L645
;
mov eax,DWORD PTR es:[di]
mul eax
mov DWORD PTR ds:[si],eax
mov DWORD PTR ds:[si+4],edx
dec bp
js $L645
;
mov eax,DWORD PTR es:[di+4]
mul eax
mov DWORD PTR ds:[si+8],eax
mov DWORD PTR ds:[si+12],edx
dec bp
js $L645
;
mov eax,DWORD PTR es:[di+8]
mul eax
mov DWORD PTR ds:[si+16],eax
mov DWORD PTR ds:[si+20],edx
$L645:
pop es
pop ds
pop di
pop si
pop bx
pop bp
ret
_bn_sqr_words ENDP
PUBLIC _bn_div64
_bn_div64 PROC FAR
push bp
mov bp,sp
mov edx, DWORD PTR [bp+6]
mov eax, DWORD PTR [bp+10]
div DWORD PTR [bp+14]
mov edx,eax
shr edx,16
pop bp
ret
_bn_div64 ENDP
PUBLIC _bn_add_words
_bn_add_words PROC FAR
; Line 58
push bp
push bx
push esi
push di
push ds
push es
mov bp,sp
; w = 28
; num = 26
; ap = 22
; rp = 18
xor esi,esi ;c=0;
mov bx,WORD PTR [bp+18] ; load low r
mov si,WORD PTR [bp+22] ; load a
mov es,WORD PTR [bp+24] ; load a
mov di,WORD PTR [bp+26] ; load b
mov ds,WORD PTR [bp+28] ; load b
mov dx,WORD PTR [bp+30] ; load num
xor ecx,ecx
dec dx
js $L547a
$L5477:
mov eax,DWORD PTR es:[si] ; *a
add eax,ecx
mov ecx,0
adc ecx,0
add si,4 ; a++
add eax,DWORD PTR ds:[di] ; + *b
adc ecx,0
mov ds,WORD PTR [bp+20]
add di,4
mov DWORD PTR ds:[bx],eax
mov ds,WORD PTR [bp+28]
add bx,4
dec dx
js $L547a ; Note that we are now testing for -1
jmp $L5477
;
$L547a:
mov eax,ecx
mov edx,ecx
shr edx,16
pop es
pop ds
pop di
pop esi
pop bx
pop bp
ret
nop
_bn_add_words ENDP
F_TEXT ENDS
END
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
; Don't even think of reading this code
; It was automatically generated by rc4-586.pl
; Which is a perl program used to generate the x86 assember for
; any of elf, a.out, BSDI,Win32, or Solaris
; eric <eay@cryptsoft.com>
;
TITLE rc4-586.asm
.386
.model FLAT
_TEXT SEGMENT
PUBLIC _RC4
_RC4 PROC NEAR
;
push ebp
push ebx
mov ebp, DWORD PTR 12[esp]
mov ebx, DWORD PTR 16[esp]
push esi
push edi
mov ecx, DWORD PTR [ebp]
mov edx, DWORD PTR 4[ebp]
mov esi, DWORD PTR 28[esp]
inc ecx
sub esp, 12
add ebp, 8
and ecx, 255
lea ebx, DWORD PTR [esi+ebx-8]
mov edi, DWORD PTR 44[esp]
mov DWORD PTR 8[esp],ebx
mov eax, DWORD PTR [ecx*4+ebp]
cmp ebx, esi
jl $L000end
L001start:
add esi, 8
; Round 0
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov BYTE PTR [esp], bl
; Round 1
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov BYTE PTR 1[esp],bl
; Round 2
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov BYTE PTR 2[esp],bl
; Round 3
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov BYTE PTR 3[esp],bl
; Round 4
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov BYTE PTR 4[esp],bl
; Round 5
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov BYTE PTR 5[esp],bl
; Round 6
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov BYTE PTR 6[esp],bl
; Round 7
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
add edi, 8
mov BYTE PTR 7[esp],bl
; apply the cipher text
mov eax, DWORD PTR [esp]
mov ebx, DWORD PTR [esi-8]
xor eax, ebx
mov ebx, DWORD PTR [esi-4]
mov DWORD PTR [edi-8],eax
mov eax, DWORD PTR 4[esp]
xor eax, ebx
mov ebx, DWORD PTR 8[esp]
mov DWORD PTR [edi-4],eax
mov eax, DWORD PTR [ecx*4+ebp]
cmp esi, ebx
jle L001start
$L000end:
; Round 0
add ebx, 8
inc esi
cmp ebx, esi
jl $L002finished
mov DWORD PTR 8[esp],ebx
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov bh, BYTE PTR [esi-1]
xor bl, bh
mov BYTE PTR [edi], bl
; Round 1
mov ebx, DWORD PTR 8[esp]
cmp ebx, esi
jle $L002finished
inc esi
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov bh, BYTE PTR [esi-1]
xor bl, bh
mov BYTE PTR 1[edi],bl
; Round 2
mov ebx, DWORD PTR 8[esp]
cmp ebx, esi
jle $L002finished
inc esi
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov bh, BYTE PTR [esi-1]
xor bl, bh
mov BYTE PTR 2[edi],bl
; Round 3
mov ebx, DWORD PTR 8[esp]
cmp ebx, esi
jle $L002finished
inc esi
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov bh, BYTE PTR [esi-1]
xor bl, bh
mov BYTE PTR 3[edi],bl
; Round 4
mov ebx, DWORD PTR 8[esp]
cmp ebx, esi
jle $L002finished
inc esi
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov bh, BYTE PTR [esi-1]
xor bl, bh
mov BYTE PTR 4[edi],bl
; Round 5
mov ebx, DWORD PTR 8[esp]
cmp ebx, esi
jle $L002finished
inc esi
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov eax, DWORD PTR [ecx*4+ebp]
mov bh, BYTE PTR [esi-1]
xor bl, bh
mov BYTE PTR 5[edi],bl
; Round 6
mov ebx, DWORD PTR 8[esp]
cmp ebx, esi
jle $L002finished
inc esi
add edx, eax
and edx, 255
inc ecx
mov ebx, DWORD PTR [edx*4+ebp]
mov DWORD PTR [ecx*4+ebp-4],ebx
add ebx, eax
and ecx, 255
and ebx, 255
mov DWORD PTR [edx*4+ebp],eax
nop
mov ebx, DWORD PTR [ebx*4+ebp]
mov bh, BYTE PTR [esi-1]
xor bl, bh
mov BYTE PTR 6[edi],bl
$L002finished:
dec ecx
add esp, 12
mov DWORD PTR [ebp-4],edx
mov BYTE PTR [ebp-8],cl
pop edi
pop esi
pop ebx
pop ebp
ret
_RC4 ENDP
_TEXT ENDS
END
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册