Тема: [FASM] aes256 (cbc, with/without tables)
Черговий ріп.
aes256 (without tables).asm
use32
AES_ENCRYPT = 0
AES_DECRYPT = 1
aes256_cbc:
push ebp
mov ebp, esp
mov eax, dword[ebp + 1Ch]
sub eax, 0h
je @02
sub eax, 1h
jne @03
push dword[ebp + 18h]
mov edx, dword[ebp + 0Ch]
push dword[ebp + 14h]
mov ecx, dword[ebp + 8h]
push dword[ebp + 10h]
call @48
jmp @03
@02:
push dword[ebp + 18h]
mov edx, dword[ebp + 0Ch]
push dword[ebp + 14h]
mov ecx, dword[ebp + 8h]
push dword[ebp + 10h]
call @42
@03:
pop ebp
ret 18h
@04:
mov dl, cl
shr dl, 1h
or dl, cl
shr dl, 1h
mov al, dl
shr al, 2h
or dl, al
movzx ecx, dl
mov eax, ecx
shr eax, 4h
or eax, ecx
inc eax
sar eax, 1h
ret
@05:
push ebp
mov ebp, esp
push ecx
mov al, cl
mov byte[ebp - 4h], 1Bh
push ebx
mov byte[ebp - 1h], al
call @04
mov cl, byte[ebp - 1h]
mov bl, al
mov byte[ebp - 3h], 0h
mov al, 1h
mov byte[ebp - 2h], al
mov bh, 80h
cmp cl, 2h
jae @06
mov al, cl
jmp @14
@06:
push esi
test bl, bl
je @13
@07:
cmp bh, bl
jb @09
movzx esi, bl
@08:
movzx eax, bh
cdq
idiv esi
mov bh, byte[ebp - 4h]
movzx ecx, cl
movzx edx, al
imul edx, ecx
movzx ecx, byte[ebp - 2h]
movzx eax, al
imul ecx, eax
xor bh, dl
mov byte[ebp - 4h], bh
xor byte[ebp - 3h], cl
mov cl, bh
call @04
mov cl, byte[ebp - 1h]
mov bh, al
cmp bh, bl
jae @08
@09:
test bh, bh
je @12
cmp bl, bh
jb @11
movzx esi, bh
@10:
movzx eax, bl
cdq
idiv esi
movzx ecx, byte[ebp - 4h]
mov bl, byte[ebp - 1h]
movzx edx, al
imul edx, ecx
movzx ecx, byte[ebp - 3h]
movzx eax, al
imul ecx, eax
xor bl, dl
mov byte[ebp - 1h], bl
xor byte[ebp - 2h], cl
mov cl, bl
call @04
mov bl, al
cmp bl, bh
jae @10
@11:
mov cl, byte[ebp - 1h]
test bl, bl
jne @07
mov al, byte[ebp - 2h]
jmp @13
@12:
mov al, byte[ebp - 3h]
@13:
pop esi
@14:
pop ebx
leave
ret
@15:
movzx ecx, cl
lea eax, [ecx + ecx]
xor eax, ecx
add eax, eax
xor eax, ecx
add eax, eax
xor eax, ecx
add eax, eax
xor ecx, eax
mov eax, ecx
xor eax, 00006300h
shr eax, 8h
xor eax, ecx
ret
@16:
movzx eax, cl
mov ecx, eax
shl ecx, 3h
xor ecx, eax
shl ecx, 2h
xor ecx, eax
add ecx, ecx
mov eax, ecx
xor eax, 00000500h
shr eax, 8h
xor eax, ecx
ret
@17:
push ebp
mov ebp, esp
push esi
mov esi, dword[ebp + 8h]
sub edx, esi
push edi
push 4h
sub ecx, esi
pop edi
@18:
mov eax, dword[esi + edx]
xor eax, dword[esi]
mov dword[esi + ecx], eax
lea esi, [esi + 4h]
sub edi, 1h
jne @18
pop edi
pop esi
pop ebp
ret 4h
@19:
push esi
push 4h
sub edx, ecx
pop esi
@20:
mov eax, dword[ecx + edx]
xor dword[ecx], eax
lea ecx, [ecx + 4h]
sub esi, 1h
jne @20
pop esi
ret
@21:
push ebx
push esi
mov esi, ecx
mov cl, byte[esi]
call @05
mov cl, al
call @15
mov cl, byte[esi + 4h]
mov byte[esi], al
call @05
mov cl, al
call @15
mov cl, byte[esi + 8h]
mov byte[esi + 4h], al
call @05
mov cl, al
call @15
mov cl, byte[esi + 0Ch]
mov byte[esi + 8h], al
call @05
mov cl, al
call @15
mov cl, byte[esi + 5h]
mov bl, byte[esi + 1h]
mov byte[esi + 0Ch], al
call @05
mov cl, al
call @15
mov cl, byte[esi + 9h]
mov byte[esi + 1h], al
call @05
mov cl, al
call @15
mov cl, byte[esi + 0Dh]
mov byte[esi + 5h], al
call @05
mov cl, al
call @15
mov cl, bl
mov byte[esi + 9h], al
call @05
mov cl, al
call @15
mov cl, byte[esi + 0Ah]
mov bl, byte[esi + 2h]
mov byte[esi + 0Dh], al
call @05
mov cl, al
call @15
mov cl, bl
mov byte[esi + 2h], al
call @05
mov cl, al
call @15
mov cl, byte[esi + 0Eh]
mov bl, byte[esi + 6h]
mov byte[esi + 0Ah], al
call @05
mov cl, al
call @15
mov cl, bl
mov byte[esi + 6h], al
call @05
mov cl, al
call @15
mov cl, byte[esi + 0Bh]
mov bl, byte[esi + 0Fh]
mov byte[esi + 0Eh], al
call @05
mov cl, al
call @15
mov cl, byte[esi + 7h]
mov byte[esi + 0Fh], al
call @05
mov cl, al
call @15
mov cl, byte[esi + 3h]
mov byte[esi + 0Bh], al
call @05
mov cl, al
call @15
mov cl, bl
mov byte[esi + 7h], al
call @05
mov cl, al
call @15
mov byte[esi + 3h], al
pop esi
pop ebx
ret
@22:
push ebx
push esi
mov esi, ecx
mov cl, byte[esi]
call @16
mov cl, al
call @05
mov cl, byte[esi + 4h]
mov byte[esi], al
call @16
mov cl, al
call @05
mov cl, byte[esi + 8h]
mov byte[esi + 4h], al
call @16
mov cl, al
call @05
mov cl, byte[esi + 0Ch]
mov byte[esi + 8h], al
call @16
mov cl, al
call @05
mov cl, byte[esi + 9h]
mov bl, byte[esi + 0Dh]
mov byte[esi + 0Ch], al
call @16
mov cl, al
call @05
mov cl, byte[esi + 5h]
mov byte[esi + 0Dh], al
call @16
mov cl, al
call @05
mov cl, byte[esi + 1h]
mov byte[esi + 9h], al
call @16
mov cl, al
call @05
mov cl, bl
mov byte[esi + 5h], al
call @16
mov cl, al
call @05
mov cl, byte[esi + 0Ah]
mov bl, byte[esi + 2h]
mov byte[esi + 1h], al
call @16
mov cl, al
call @05
mov cl, bl
mov byte[esi + 2h], al
call @16
mov cl, al
call @05
mov cl, byte[esi + 0Eh]
mov bl, byte[esi + 6h]
mov byte[esi + 0Ah], al
call @16
mov cl, al
call @05
mov cl, bl
mov byte[esi + 6h], al
call @16
mov cl, al
call @05
mov cl, byte[esi + 7h]
mov bl, byte[esi + 3h]
mov byte[esi + 0Eh], al
call @16
mov cl, al
call @05
mov cl, byte[esi + 0Bh]
mov byte[esi + 3h], al
call @16
mov cl, al
call @05
mov cl, byte[esi + 0Fh]
mov byte[esi + 7h], al
call @16
mov cl, al
call @05
mov cl, bl
mov byte[esi + 0Bh], al
call @16
mov cl, al
call @05
mov byte[esi + 0Fh], al
pop esi
pop ebx
ret
@23:
push ebp
mov ebp, esp
sub esp, 1Ch
push ebx
push esi
push edi
mov esi, ecx
mov dword[ebp - 0Ch], ecx
lea edi, [ebp - 1Ch]
movsd
movsd
movsd
movsd
mov cl, byte[ebp - 1Ch]
call @05
mov cl, al
call @15
mov cl, byte[ebp - 17h]
mov bl, al
mov byte[ebp - 3h], bl
call @05
mov cl, al
call @15
mov cl, bl
mov dl, al
shr cl, 7h
movzx ecx, cl
imul eax, ecx, 1Bh
mov cl, dl
shr cl, 7h
movzx ecx, cl
imul ebx, ecx, 1Bh
mov cl, byte[ebp - 12h]
mov byte[ebp - 2h], dl
mov dword[ebp - 8h], eax
call @05
mov cl, al
call @15
mov cl, byte[ebp - 0Dh]
mov byte[ebp - 1h], al
call @05
mov cl, al
call @15
mov cl, byte[ebp - 2h]
mov ch, al
xor cl, byte[ebp - 3h]
mov esi, dword[ebp - 0Ch]
add cl, cl
xor cl, ch
mov bh, byte[ebp - 3h]
xor cl, byte[ebp - 1h]
xor cl, bl
mov byte[ebp - 4h], ch
xor cl, byte[ebp - 8h]
xor cl, byte[ebp - 2h]
mov byte[esi], cl
mov cl, byte[ebp - 1h]
mov al, cl
shr al, 7h
movzx eax, al
imul edx, eax, 1Bh
mov al, cl
xor al, byte[ebp - 2h]
add al, al
xor al, dl
xor al, ch
xor al, cl
xor al, bl
mov bl, ch
xor al, bh
mov byte[esi + 1h], al
mov al, bl
shr al, 7h
movzx eax, al
imul ecx, eax, 1Bh
mov al, bl
xor al, byte[ebp - 1h]
add al, al
xor al, cl
xor al, dl
xor al, bl
xor al, byte[ebp - 2h]
xor al, bh
mov byte[esi + 2h], al
xor bl, bh
add bl, bl
xor bl, cl
mov cl, byte[ebp - 18h]
xor bl, byte[ebp - 1h]
xor bl, byte[ebp - 8h]
xor bl, byte[ebp - 2h]
xor bl, bh
mov byte[esi + 3h], bl
call @05
mov cl, al
call @15
mov cl, byte[ebp - 13h]
mov bl, al
mov byte[ebp - 3h], bl
call @05
mov cl, al
call @15
mov cl, bl
mov dl, al
shr cl, 7h
movzx ecx, cl
imul eax, ecx, 1Bh
mov cl, dl
shr cl, 7h
movzx ecx, cl
imul ebx, ecx, 1Bh
mov cl, byte[ebp - 19h]
mov byte[ebp - 1h], dl
mov dword[ebp - 8h], eax
call @05
mov cl, al
call @15
mov cl, byte[ebp - 0Eh]
mov byte[ebp - 2h], al
call @05
mov cl, al
call @15
mov ch, al
mov cl, byte[ebp - 1h]
xor cl, byte[ebp - 3h]
shr al, 7h
add cl, cl
movzx eax, al
xor cl, ch
xor cl, byte[ebp - 2h]
imul edx, eax, 1Bh
xor cl, bl
mov bh, byte[ebp - 2h]
mov al, ch
xor al, byte[ebp - 1h]
xor cl, byte[ebp - 8h]
add al, al
xor cl, byte[ebp - 1h]
xor al, dl
mov byte[ebp - 4h], ch
xor al, ch
mov byte[esi + 4h], cl
xor al, byte[ebp - 2h]
xor al, bl
xor al, byte[ebp - 3h]
mov byte[esi + 5h], al
mov al, bh
shr al, 7h
movzx eax, al
imul ecx, eax, 1Bh
mov al, byte[ebp - 4h]
mov ah, byte[ebp - 3h]
xor al, bh
add al, al
xor al, cl
xor al, dl
xor al, bh
xor bh, ah
xor al, byte[ebp - 1h]
add bh, bh
xor bh, cl
xor al, ah
xor bh, byte[ebp - 4h]
xor bh, byte[ebp - 8h]
mov byte[esi + 6h], al
xor bh, byte[ebp - 1h]
mov cl, byte[ebp - 14h]
xor bh, ah
mov byte[esi + 7h], bh
call @05
mov cl, al
call @15
mov cl, byte[ebp - 0Fh]
mov bl, al
mov byte[ebp - 1h], bl
call @05
mov cl, al
call @15
mov cl, bl
mov dl, al
shr cl, 7h
movzx ecx, cl
imul eax, ecx, 1Bh
mov cl, dl
shr cl, 7h
movzx ecx, cl
imul ebx, ecx, 1Bh
mov cl, byte[ebp - 1Ah]
mov byte[ebp - 2h], dl
mov dword[ebp - 8h], eax
call @05
mov cl, al
call @15
mov cl, byte[ebp - 15h]
mov byte[ebp - 3h], al
call @05
mov cl, al
call @15
mov cl, byte[ebp - 2h]
mov ch, al
xor cl, byte[ebp - 1h]
add cl, cl
mov bh, byte[ebp - 1h]
xor cl, ch
mov byte[ebp - 4h], ch
xor cl, byte[ebp - 3h]
xor cl, bl
xor cl, byte[ebp - 8h]
xor cl, byte[ebp - 2h]
mov byte[esi + 8h], cl
mov cl, byte[ebp - 3h]
mov al, cl
shr al, 7h
movzx eax, al
imul edx, eax, 1Bh
mov al, cl
xor al, byte[ebp - 2h]
add al, al
xor al, dl
xor al, ch
xor al, cl
xor al, bl
mov bl, ch
xor al, bh
mov byte[esi + 9h], al
mov al, bl
shr al, 7h
movzx eax, al
imul ecx, eax, 1Bh
mov al, bl
xor al, byte[ebp - 3h]
add al, al
xor al, cl
xor al, dl
xor al, bl
xor bl, bh
xor al, byte[ebp - 2h]
add bl, bl
xor bl, cl
xor al, bh
xor bl, byte[ebp - 3h]
xor bl, byte[ebp - 8h]
xor bl, byte[ebp - 2h]
xor bl, bh
mov byte[esi + 0Ah], al
mov byte[esi + 0Bh], bl
mov cl, byte[ebp - 1Bh]
call @05
mov cl, al
call @15
mov cl, byte[ebp - 10h]
mov bl, al
mov byte[ebp - 2h], bl
call @05
mov cl, al
call @15
mov cl, bl
mov byte[ebp - 1h], al
shr cl, 7h
movzx ecx, cl
imul ebx, ecx, 1Bh
mov cl, al
shr cl, 7h
movzx ecx, cl
imul eax, ecx, 1Bh
mov cl, byte[ebp - 16h]
mov dword[ebp - 8h], eax
call @05
mov cl, al
call @15
mov cl, byte[ebp - 11h]
mov byte[ebp - 3h], al
call @05
mov cl, al
call @15
mov cl, byte[ebp - 1h]
mov ch, al
xor cl, byte[ebp - 2h]
add cl, cl
mov bh, byte[ebp - 1h]
xor cl, ch
mov byte[ebp - 4h], ch
xor cl, byte[ebp - 3h]
xor cl, byte[ebp - 8h]
xor cl, bl
xor cl, byte[ebp - 2h]
mov byte[esi + 0Ch], cl
mov cl, byte[ebp - 3h]
mov al, cl
shr al, 7h
movzx eax, al
imul edx, eax, 1Bh
mov al, cl
xor al, byte[ebp - 2h]
add al, al
pop edi
xor al, dl
xor al, ch
xor al, cl
xor al, bl
mov bl, ch
xor al, bh
mov byte[esi + 0Dh], al
mov al, bl
shr al, 7h
movzx eax, al
imul ecx, eax, 1Bh
mov al, bl
xor al, byte[ebp - 3h]
add al, al
xor al, cl
xor al, dl
xor al, bl
xor bl, bh
add bl, bl
xor al, bh
xor al, byte[ebp - 2h]
xor bl, cl
xor bl, byte[ebp - 3h]
xor bl, byte[ebp - 8h]
xor bl, bh
mov byte[esi + 0Eh], al
xor bl, byte[ebp - 2h]
mov byte[esi + 0Fh], bl
pop esi
pop ebx
leave
ret
@24:
push ebp
mov ebp, esp
sub esp, 6Ch
push ebx
push esi
mov esi, ecx
mov dword[ebp - 50h], ecx
push edi
lea edi, [ebp - 6Ch]
movsd
movsd
movsd
movsd
mov dh, byte[ebp - 6Ch]
mov cl, byte[ebp - 69h]
mov dl, dh
mov bh, byte[ebp - 6Bh]
xor cl, dh
mov bl, byte[ebp - 6Ah]
xor cl, bh
xor cl, bl
shr dl, 5h
add cl, cl
mov ch, cl
mov byte[ebp - 1h], cl
mov cl, byte[ebp - 69h]
xor ch, dh
shr cl, 5h
xor ch, bl
mov al, cl
add ch, ch
and al, 04h
mov byte[ebp - 2h], ch
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 34h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 30h], eax
movzx eax, cl
mov cl, dh
imul eax, eax, 1Bh
shr cl, 6h
mov dword[ebp - 2Ch], eax
mov al, dl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 28h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 44h], eax
movzx eax, cl
mov cl, bh
imul eax, eax, 1Bh
shr cl, 5h
mov dword[ebp - 40h], eax
mov al, dl
and al, 02h
and dl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 24h], eax
movzx eax, dl
imul eax, eax, 1Bh
mov dword[ebp - 20h], eax
mov al, cl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 1Ch], eax
mov al, cl
and al, 02h
movzx eax, al
imul eax, eax, 1Bh
and cl, 01h
mov dword[ebp - 18h], eax
movzx eax, cl
imul eax, eax, 1Bh
mov dl, bl
shr dl, 5h
mov cl, bl
shr cl, 6h
mov dword[ebp - 14h], eax
mov al, dl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 10h], eax
mov al, cl
and cl, 01h
and al, 02h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 3Ch], eax
movzx eax, cl
mov cl, ch
imul eax, eax, 1Bh
xor cl, byte[ebp - 6Ch]
xor cl, byte[ebp - 6Bh]
add cl, cl
mov dword[ebp - 38h], eax
mov al, dl
and al, 02h
and dl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 0Ch], eax
movzx eax, dl
imul eax, eax, 1Bh
mov dword[ebp - 8h], eax
mov al, dh
shr al, 7h
movzx eax, al
imul edx, eax, 1Bh
mov al, bh
shr al, 7h
movzx eax, al
imul ebx, eax, 1Bh
mov dword[ebp - 5Ch], edx
xor cl, bl
xor cl, dl
xor cl, byte[ebp - 8h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 38h]
xor cl, byte[ebp - 3Ch]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 40h]
xor cl, byte[ebp - 44h]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 69h]
xor cl, byte[ebp - 6Bh]
xor cl, byte[ebp - 6Ah]
call @16
mov cl, al
call @05
mov esi, dword[ebp - 50h]
mov ch, byte[ebp - 69h]
mov cl, ch
shr cl, 6h
mov byte[esi], al
mov al, byte[ebp - 1h]
xor al, ch
xor al, byte[ebp - 6Bh]
add al, al
mov byte[ebp - 1h], al
mov al, cl
and al, 02h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 50h], eax
and cl, 01h
movzx eax, cl
mov cl, byte[ebp - 6Bh]
shr cl, 6h
imul eax, eax, 1Bh
mov dword[ebp - 4Ch], eax
mov al, cl
and cl, 01h
and al, 02h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 48h], eax
movzx eax, cl
mov cl, byte[ebp - 1h]
xor cl, byte[ebp - 6Bh]
xor cl, byte[ebp - 6Ah]
add cl, cl
imul edx, eax, 1Bh
mov al, byte[ebp - 6Ah]
shr al, 7h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 58h], edx
xor cl, al
mov dword[ebp - 54h], eax
xor cl, dl
xor cl, byte[ebp - 48h]
xor cl, byte[ebp - 4Ch]
xor cl, byte[ebp - 50h]
xor cl, bl
xor cl, byte[ebp - 8h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 34h]
xor cl, ch
xor cl, byte[ebp - 6Ch]
xor cl, byte[ebp - 6Ah]
call @16
mov cl, al
call @05
mov cl, byte[ebp - 69h]
mov byte[esi + 5h], al
mov al, cl
shr al, 7h
movzx eax, al
imul ebx, eax, 1Bh
mov al, byte[ebp - 2h]
xor al, cl
xor al, byte[ebp - 6Ah]
add al, al
xor al, bl
xor al, byte[ebp - 54h]
xor al, byte[ebp - 8h]
xor al, byte[ebp - 0Ch]
xor al, byte[ebp - 38h]
xor al, byte[ebp - 3Ch]
xor al, byte[ebp - 10h]
xor al, byte[ebp - 14h]
xor al, byte[ebp - 18h]
xor al, byte[ebp - 1Ch]
xor al, byte[ebp - 20h]
xor al, byte[ebp - 24h]
xor al, byte[ebp - 40h]
xor al, byte[ebp - 44h]
xor al, byte[ebp - 28h]
xor al, byte[ebp - 2Ch]
xor al, byte[ebp - 30h]
xor al, byte[ebp - 34h]
xor al, cl
xor al, byte[ebp - 6Ch]
xor al, byte[ebp - 6Bh]
mov cl, al
call @16
mov cl, al
call @05
mov cl, byte[ebp - 1h]
xor cl, byte[ebp - 69h]
xor cl, byte[ebp - 6Ch]
add cl, cl
mov byte[esi + 0Ah], al
xor cl, bl
xor cl, byte[ebp - 58h]
xor cl, byte[ebp - 48h]
xor cl, byte[ebp - 4Ch]
xor cl, byte[ebp - 50h]
xor cl, byte[ebp - 5Ch]
xor cl, byte[ebp - 8h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 6Ch]
xor cl, byte[ebp - 6Bh]
xor cl, byte[ebp - 6Ah]
call @16
mov cl, al
call @05
mov dh, byte[ebp - 68h]
mov cl, byte[ebp - 65h]
mov dl, dh
mov bh, byte[ebp - 67h]
xor cl, dh
mov bl, byte[ebp - 66h]
xor cl, bh
mov byte[esi + 0Fh], al
xor cl, bl
add cl, cl
shr dl, 5h
mov ch, cl
mov byte[ebp - 1h], cl
mov cl, byte[ebp - 65h]
xor ch, dh
shr cl, 5h
xor ch, bl
mov al, cl
add ch, ch
and al, 04h
mov byte[ebp - 2h], ch
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 8h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 0Ch], eax
movzx eax, cl
mov cl, dh
imul eax, eax, 1Bh
shr cl, 6h
mov dword[ebp - 10h], eax
mov al, dl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 14h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 44h], eax
movzx eax, cl
imul eax, eax, 1Bh
mov dword[ebp - 48h], eax
mov al, dl
and al, 02h
and dl, 01h
movzx eax, al
mov cl, bh
imul eax, eax, 1Bh
shr cl, 5h
mov dword[ebp - 18h], eax
movzx eax, dl
mov dl, bl
imul eax, eax, 1Bh
shr dl, 5h
mov dword[ebp - 1Ch], eax
mov al, cl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 20h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 24h], eax
movzx eax, cl
mov cl, bl
imul eax, eax, 1Bh
shr cl, 6h
mov dword[ebp - 28h], eax
mov al, dl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 2Ch], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 4Ch], eax
movzx eax, cl
mov cl, ch
imul eax, eax, 1Bh
xor cl, byte[ebp - 68h]
xor cl, byte[ebp - 67h]
add cl, cl
mov dword[ebp - 50h], eax
mov al, dl
and al, 02h
and dl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 30h], eax
movzx eax, dl
imul eax, eax, 1Bh
mov dword[ebp - 34h], eax
mov al, dh
shr al, 7h
movzx eax, al
imul edx, eax, 1Bh
mov al, bh
shr al, 7h
movzx eax, al
imul ebx, eax, 1Bh
mov dword[ebp - 54h], edx
xor cl, bl
xor cl, dl
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 50h]
xor cl, byte[ebp - 4Ch]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 48h]
xor cl, byte[ebp - 44h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 8h]
xor cl, byte[ebp - 65h]
xor cl, byte[ebp - 67h]
xor cl, byte[ebp - 66h]
call @16
mov cl, al
call @05
mov ch, byte[ebp - 65h]
mov byte[esi + 4h], al
mov cl, ch
mov al, byte[ebp - 1h]
shr cl, 6h
xor al, ch
xor al, byte[ebp - 67h]
add al, al
mov byte[ebp - 1h], al
mov al, cl
and cl, 01h
and al, 02h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 38h], eax
movzx eax, cl
mov cl, byte[ebp - 67h]
shr cl, 6h
imul eax, eax, 1Bh
mov dword[ebp - 3Ch], eax
mov al, cl
and cl, 01h
and al, 02h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 40h], eax
movzx eax, cl
mov cl, byte[ebp - 1h]
xor cl, byte[ebp - 67h]
xor cl, byte[ebp - 66h]
add cl, cl
imul edx, eax, 1Bh
mov al, byte[ebp - 66h]
shr al, 7h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 58h], edx
xor cl, al
mov dword[ebp - 5Ch], eax
xor cl, dl
xor cl, byte[ebp - 40h]
xor cl, byte[ebp - 3Ch]
xor cl, byte[ebp - 38h]
xor cl, bl
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 8h]
xor cl, ch
xor cl, byte[ebp - 68h]
xor cl, byte[ebp - 66h]
call @16
mov cl, al
call @05
mov cl, byte[ebp - 65h]
mov byte[esi + 9h], al
mov al, cl
shr al, 7h
movzx eax, al
imul ebx, eax, 1Bh
mov al, byte[ebp - 2h]
xor al, cl
xor al, byte[ebp - 66h]
add al, al
xor al, bl
xor al, byte[ebp - 5Ch]
xor al, byte[ebp - 34h]
xor al, byte[ebp - 30h]
xor al, byte[ebp - 50h]
xor al, byte[ebp - 4Ch]
xor al, byte[ebp - 2Ch]
xor al, byte[ebp - 28h]
xor al, byte[ebp - 24h]
xor al, byte[ebp - 20h]
xor al, byte[ebp - 1Ch]
xor al, byte[ebp - 18h]
xor al, byte[ebp - 48h]
xor al, byte[ebp - 44h]
xor al, byte[ebp - 14h]
xor al, byte[ebp - 10h]
xor al, byte[ebp - 0Ch]
xor al, byte[ebp - 8h]
xor al, cl
xor al, byte[ebp - 68h]
xor al, byte[ebp - 67h]
mov cl, al
call @16
mov cl, al
call @05
mov cl, byte[ebp - 1h]
xor cl, byte[ebp - 65h]
xor cl, byte[ebp - 68h]
add cl, cl
mov byte[esi + 0Eh], al
xor cl, bl
xor cl, byte[ebp - 58h]
xor cl, byte[ebp - 40h]
xor cl, byte[ebp - 3Ch]
xor cl, byte[ebp - 38h]
xor cl, byte[ebp - 54h]
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 8h]
xor cl, byte[ebp - 68h]
xor cl, byte[ebp - 67h]
xor cl, byte[ebp - 66h]
call @16
mov cl, al
call @05
mov bh, byte[ebp - 64h]
mov cl, byte[ebp - 61h]
mov bl, byte[ebp - 62h]
xor cl, bh
xor cl, byte[ebp - 63h]
xor cl, bl
mov byte[esi + 3h], al
add cl, cl
mov ch, cl
mov byte[ebp - 1h], cl
mov cl, byte[ebp - 61h]
xor ch, bh
shr cl, 5h
xor ch, bl
mov al, cl
add ch, ch
and al, 04h
mov byte[ebp - 2h], ch
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 0Ch], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 10h], eax
movzx eax, cl
imul eax, eax, 1Bh
mov dword[ebp - 14h], eax
mov dl, bh
shr dl, 5h
mov cl, bh
mov al, dl
shr cl, 6h
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 18h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 48h], eax
movzx eax, cl
imul eax, eax, 1Bh
mov cl, byte[ebp - 63h]
shr cl, 5h
mov dword[ebp - 4Ch], eax
mov al, dl
and al, 02h
and dl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 1Ch], eax
movzx eax, dl
mov dl, bl
imul eax, eax, 1Bh
shr dl, 5h
mov dword[ebp - 20h], eax
mov al, cl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 24h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 28h], eax
movzx eax, cl
mov cl, bl
imul eax, eax, 1Bh
shr cl, 6h
mov dword[ebp - 2Ch], eax
mov al, dl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 30h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 50h], eax
movzx eax, cl
imul ebx, eax, 1Bh
mov al, dl
and al, 02h
and dl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 58h], ebx
mov dword[ebp - 34h], eax
movzx eax, dl
imul eax, eax, 1Bh
mov dword[ebp - 8h], eax
mov al, byte[ebp - 64h]
shr al, 7h
movzx eax, al
imul edx, eax, 1Bh
mov al, byte[ebp - 63h]
shr al, 7h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 38h], edx
mov dword[ebp - 5Ch], eax
mov cl, ch
mov bh, byte[ebp - 63h]
xor cl, byte[ebp - 64h]
xor cl, byte[ebp - 63h]
add cl, cl
xor cl, al
xor cl, dl
xor cl, byte[ebp - 8h]
xor cl, byte[ebp - 34h]
xor cl, bl
mov bl, byte[ebp - 61h]
xor cl, byte[ebp - 50h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 4Ch]
xor cl, byte[ebp - 48h]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
xor cl, bl
xor cl, bh
xor cl, byte[ebp - 62h]
call @16
mov cl, al
call @05
mov byte[esi + 8h], al
mov cl, bl
mov al, byte[ebp - 1h]
xor al, bl
shr cl, 6h
xor al, bh
mov ch, byte[ebp - 62h]
add al, al
mov byte[ebp - 1h], al
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 3Ch], eax
movzx eax, cl
mov cl, bh
shr cl, 6h
imul eax, eax, 1Bh
mov dword[ebp - 40h], eax
mov al, cl
and cl, 01h
and al, 02h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 44h], eax
movzx eax, cl
mov cl, byte[ebp - 1h]
xor cl, byte[ebp - 63h]
imul edx, eax, 1Bh
xor cl, ch
add cl, cl
mov al, ch
shr al, 7h
movzx eax, al
imul ebx, eax, 1Bh
mov dword[ebp - 54h], edx
xor cl, bl
xor cl, dl
xor cl, byte[ebp - 44h]
xor cl, byte[ebp - 40h]
xor cl, byte[ebp - 3Ch]
xor cl, byte[ebp - 5Ch]
xor cl, byte[ebp - 8h]
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 61h]
xor cl, byte[ebp - 64h]
xor cl, ch
call @16
mov cl, al
call @05
mov dl, byte[ebp - 61h]
mov cl, byte[ebp - 2h]
xor cl, dl
mov byte[esi + 0Dh], al
xor cl, byte[ebp - 62h]
mov al, dl
add cl, cl
shr al, 7h
xor cl, bl
movzx eax, al
mov ebx, dword[ebp - 8h]
xor cl, bl
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 58h]
xor cl, byte[ebp - 50h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 4Ch]
xor cl, byte[ebp - 48h]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
imul eax, eax, 1Bh
xor cl, al
mov dword[ebp - 5Ch], eax
xor cl, dl
xor cl, byte[ebp - 64h]
xor cl, byte[ebp - 63h]
call @16
mov cl, al
call @05
mov cl, byte[ebp - 1h]
xor cl, byte[ebp - 61h]
xor cl, byte[ebp - 64h]
add cl, cl
mov byte[esi + 2h], al
xor cl, byte[ebp - 54h]
xor cl, byte[ebp - 44h]
xor cl, byte[ebp - 40h]
xor cl, byte[ebp - 3Ch]
xor cl, byte[ebp - 38h]
xor cl, bl
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 5Ch]
xor cl, byte[ebp - 64h]
xor cl, byte[ebp - 63h]
xor cl, byte[ebp - 62h]
call @16
mov cl, al
call @05
mov cl, byte[ebp - 5Dh]
mov dh, byte[ebp - 60h]
mov byte[esi + 7h], al
mov al, cl
mov byte[ebp - 1h], cl
xor al, dh
mov bh, byte[ebp - 5Fh]
mov ch, dh
xor al, bh
mov bl, byte[ebp - 5Eh]
xor al, bl
shr cl, 5h
add al, al
xor ch, bl
xor ch, al
mov byte[ebp - 2h], al
mov al, cl
mov dl, dh
and al, 04h
shr dl, 5h
movzx eax, al
add ch, ch
imul eax, eax, 1Bh
mov byte[ebp - 3h], ch
mov dword[ebp - 8h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 0Ch], eax
movzx eax, cl
mov cl, dh
imul eax, eax, 1Bh
shr cl, 6h
mov dword[ebp - 10h], eax
mov al, dl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 14h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 44h], eax
movzx eax, cl
mov cl, bh
imul eax, eax, 1Bh
shr cl, 5h
mov dword[ebp - 48h], eax
mov al, dl
and al, 02h
and dl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 18h], eax
movzx eax, dl
mov dl, bl
imul eax, eax, 1Bh
shr dl, 5h
mov dword[ebp - 1Ch], eax
mov al, cl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 20h], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 24h], eax
movzx eax, cl
mov cl, bl
imul eax, eax, 1Bh
shr cl, 6h
mov dword[ebp - 28h], eax
mov al, dl
and al, 04h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 2Ch], eax
mov al, cl
and al, 02h
movzx eax, al
and cl, 01h
imul eax, eax, 1Bh
mov dword[ebp - 4Ch], eax
movzx eax, cl
imul eax, eax, 1Bh
mov cl, byte[ebp - 60h]
xor cl, byte[ebp - 5Fh]
xor cl, ch
add cl, cl
xor cl, byte[ebp - 1h]
mov dword[ebp - 50h], eax
mov al, dl
xor cl, byte[ebp - 5Fh]
and al, 02h
xor cl, byte[ebp - 5Eh]
and dl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 30h], eax
movzx eax, dl
imul eax, eax, 1Bh
mov dword[ebp - 34h], eax
mov al, dh
shr al, 7h
movzx eax, al
imul edx, eax, 1Bh
mov al, bh
shr al, 7h
movzx eax, al
imul ebx, eax, 1Bh
mov dword[ebp - 54h], edx
xor cl, bl
xor cl, dl
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 50h]
xor cl, byte[ebp - 4Ch]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 48h]
xor cl, byte[ebp - 44h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 8h]
call @16
mov cl, al
call @05
mov cl, byte[ebp - 1h]
mov byte[esi + 0Ch], al
shr cl, 6h
mov al, cl
mov ch, byte[ebp - 1h]
and al, 02h
xor ch, byte[ebp - 5Fh]
movzx eax, al
and cl, 01h
imul eax, eax, 1Bh
xor ch, byte[ebp - 2h]
add ch, ch
mov byte[ebp - 2h], ch
mov dword[ebp - 38h], eax
movzx eax, cl
mov cl, byte[ebp - 5Fh]
imul eax, eax, 1Bh
shr cl, 6h
mov dword[ebp - 3Ch], eax
mov al, cl
and al, 02h
and cl, 01h
movzx eax, al
imul eax, eax, 1Bh
mov dword[ebp - 40h], eax
movzx eax, cl
imul edx, eax, 1Bh
mov al, byte[ebp - 5Eh]
mov dword[ebp - 58h], edx
mov cl, byte[ebp - 5Fh]
xor cl, byte[ebp - 5Eh]
xor cl, ch
shr al, 7h
add cl, cl
movzx eax, al
xor cl, byte[ebp - 1h]
xor cl, byte[ebp - 60h]
xor cl, byte[ebp - 5Eh]
imul eax, eax, 1Bh
xor cl, al
mov dword[ebp - 5Ch], eax
xor cl, dl
xor cl, byte[ebp - 40h]
xor cl, byte[ebp - 3Ch]
xor cl, byte[ebp - 38h]
xor cl, bl
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 8h]
call @16
mov cl, al
call @05
mov dl, byte[ebp - 1h]
mov byte[esi + 1h], al
mov cl, dl
xor cl, byte[ebp - 5Eh]
mov al, dl
xor cl, byte[ebp - 3h]
add cl, cl
shr al, 7h
xor cl, dl
movzx eax, al
xor cl, byte[ebp - 60h]
xor cl, byte[ebp - 5Fh]
imul ebx, eax, 1Bh
xor cl, bl
xor cl, byte[ebp - 5Ch]
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 50h]
xor cl, byte[ebp - 4Ch]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 48h]
xor cl, byte[ebp - 44h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 8h]
call @16
mov cl, al
call @05
mov cl, byte[ebp - 1h]
xor cl, byte[ebp - 60h]
xor cl, byte[ebp - 2h]
add cl, cl
mov byte[esi + 6h], al
xor cl, byte[ebp - 60h]
xor cl, byte[ebp - 5Fh]
xor cl, byte[ebp - 5Eh]
xor cl, bl
xor cl, byte[ebp - 58h]
xor cl, byte[ebp - 40h]
xor cl, byte[ebp - 3Ch]
xor cl, byte[ebp - 38h]
xor cl, byte[ebp - 54h]
xor cl, byte[ebp - 34h]
xor cl, byte[ebp - 30h]
xor cl, byte[ebp - 2Ch]
xor cl, byte[ebp - 28h]
xor cl, byte[ebp - 24h]
xor cl, byte[ebp - 20h]
xor cl, byte[ebp - 1Ch]
xor cl, byte[ebp - 18h]
xor cl, byte[ebp - 14h]
xor cl, byte[ebp - 10h]
xor cl, byte[ebp - 0Ch]
xor cl, byte[ebp - 8h]
call @16
mov cl, al
call @05
pop edi
mov byte[esi + 0Bh], al
pop esi
pop ebx
leave
ret
aes_set_key:
push ebp
mov ebp, esp
movzx eax, byte[ebp + 0Ch]
sub esp, 0Ch
push ebx
sub eax, 10h
je @28
sub eax, 8h
je @27
sub eax, 8h
je @26
sub eax, 60h
je @28
sub eax, 40h
je @27
sub eax, 40h
je @26
mov eax, dword[ebp + 10h]
mov byte[eax + 0F0h], 0h
or al, 0FFh
jmp @36
@26:
mov bh, 20h
jmp @29
@27:
mov bh, 18h
jmp @29
@28:
mov bh, 10h
@29:
mov ecx, dword[ebp + 8h]
mov dl, bh
push esi
mov esi, dword[ebp + 10h]
push edi
test bh, bh
je @31
mov edi, esi
sub edi, ecx
@30:
mov al, byte[ecx]
mov byte[ecx + edi], al
inc ecx
sub dl, 1h
jne @30
@31:
mov cl, bh
mov byte[ebp - 1h], 1h
add cl, 1Ch
shl cl, 2h
mov al, cl
mov byte[ebp - 5h], cl
shr al, 4h
dec al
mov byte[esi + 0F0h], al
mov al, bh
mov byte[ebp - 3h], al
cmp bh, cl
jae @35
movzx ecx, bh
xor bl, bl
mov dword[ebp - 0Ch], ecx
mov byte[ebp - 4h], bl
@32:
movzx edi, al
mov al, byte[esi + edi - 2h]
mov byte[ebp + 0Fh], al
mov al, byte[esi + edi - 1h]
mov byte[ebp + 13h], al
mov eax, edi
cdq
idiv dword[ebp - 0Ch]
mov cl, byte[esi + edi - 4h]
mov ch, byte[esi + edi - 3h]
mov byte[ebp - 2h], cl
mov byte[ebp + 0Bh], ch
test edx, edx
jne @33
mov bl, cl
mov cl, ch
call @05
mov cl, al
call @15
xor al, byte[ebp - 1h]
mov cl, byte[ebp + 0Fh]
mov byte[ebp - 2h], al
call @05
mov cl, al
call @15
mov cl, byte[ebp + 13h]
mov byte[ebp + 0Bh], al
call @05
mov cl, al
call @15
mov cl, bl
mov byte[ebp + 0Fh], al
call @05
mov cl, al
call @15
mov cl, byte[ebp - 1h]
mov bl, byte[ebp - 4h]
mov byte[ebp + 13h], al
mov al, cl
shr al, 7h
add cl, cl
movzx eax, al
imul eax, eax, 1Bh
xor cl, al
mov byte[ebp - 1h], cl
jmp @34
@33:
cmp bh, 18h
jbe @34
cmp edx, 10h
jne @34
call @05
mov cl, al
call @15
mov cl, byte[ebp + 0Bh]
mov byte[ebp - 2h], al
call @05
mov cl, al
call @15
mov cl, byte[ebp + 0Fh]
mov byte[ebp + 0Bh], al
call @05
mov cl, al
call @15
mov cl, byte[ebp + 13h]
mov byte[ebp + 0Fh], al
call @05
mov cl, al
call @15
mov byte[ebp + 13h], al
@34:
movzx ecx, bl
add bl, 4h
mov byte[ebp - 4h], bl
mov al, byte[esi + ecx]
xor al, byte[ebp - 2h]
mov byte[esi + edi], al
mov al, byte[esi + ecx + 1h]
xor al, byte[ebp + 0Bh]
mov byte[esi + edi + 1h], al
mov al, byte[esi + ecx + 2h]
xor al, byte[ebp + 0Fh]
mov byte[esi + edi + 2h], al
mov al, byte[esi + ecx + 3h]
xor al, byte[ebp + 13h]
mov byte[esi + edi + 3h], al
mov al, byte[ebp - 3h]
add al, 4h
mov byte[ebp - 3h], al
cmp al, byte[ebp - 5h]
jb @32
@35:
pop edi
xor al, al
pop esi
@36:
pop ebx
leave
ret 0Ch
@37:
push ebp
mov ebp, esp
sub esp, 14h
push ebx
push esi
mov esi, dword[ebp + 8h]
mov dword[ebp - 4h], edx
mov bl, byte[esi + 0F0h]
test bl, bl
je @40
mov edx, ecx
lea ecx, [ebp - 14h]
push esi
call @17
mov byte[ebp + 8h], 1h
cmp bl, 1h
jbe @39
dec bl
movzx eax, bl
mov ebx, eax
inc al
push edi
lea edi, [esi + 10h]
mov dword[ebp + 8h], eax
@38:
lea ecx, [ebp - 14h]
call @23
mov edx, edi
lea ecx, [ebp - 14h]
call @19
add edi, 10h
sub ebx, 1h
jne @38
pop edi
@39:
lea ecx, [ebp - 14h]
call @21
mov ecx, dword[ebp + 8h]
lea edx, [ebp - 14h]
movzx eax, cl
mov ecx, dword[ebp - 4h]
shl eax, 4h
add eax, esi
push eax
call @17
xor al, al
jmp @41
@40:
or al, 0FFh
@41:
pop esi
pop ebx
leave
ret 4h
@42:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword[ebp + 8h]
mov dword[ebp - 8h], edx
push ebx
push esi
push edi
mov edi, edx
test eax, eax
je @45
mov ebx, dword[ebp + 0Ch]
sub ecx, ebx
mov dword[ebp - 4h], ecx
@43:
dec eax
mov ecx, ebx
mov ebx, dword[ebp - 4h]
push 4h
mov dword[ebp + 8h], eax
pop edx
@44:
mov eax, dword[ecx + ebx]
xor dword[ecx], eax
lea ecx, [ecx + 4h]
sub edx, 1h
jne @44
mov ebx, dword[ebp + 0Ch]
mov edx, ebx
push dword[ebp + 10h]
mov ecx, ebx
call @37
test al, al
jne @47
add dword[ebp - 4h], 10h
mov esi, ebx
mov eax, dword[ebp + 8h]
movsd
movsd
movsd
movsd
mov edi, dword[ebp - 8h]
add edi, 10h
mov dword[ebp - 8h], edi
test eax, eax
jne @43
@45:
xor al, al
@46:
pop edi
pop esi
pop ebx
leave
ret 0Ch
@47:
mov al, 1h
jmp @46
@48:
push ebp
mov ebp, esp
sub esp, 30h
mov eax, dword[ebp + 8h]
mov dword[ebp - 0Ch], ecx
push ebx
mov ebx, edx
mov edx, ecx
mov dword[ebp - 8h], ebx
push esi
push edi
test eax, eax
je @53
mov ecx, dword[ebp + 0Ch]
sub ecx, ebx
mov dword[ebp - 10h], ecx
@49:
mov esi, edx
lea edi, [ebp - 30h]
dec eax
mov dword[ebp + 8h], eax
movsd
movsd
movsd
movsd
mov edi, dword[ebp + 10h]
mov al, byte[edi + 0F0h]
mov byte[ebp - 1h], al
test al, al
je @55
movzx eax, al
lea ecx, [ebp - 20h]
shl eax, 4h
add eax, edi
push eax
call @17
lea ecx, [ebp - 20h]
call @22
sub byte[ebp - 1h], 1h
je @51
mov bl, byte[ebp - 1h]
movzx esi, bl
shl esi, 4h
add esi, edi
@50:
mov edx, esi
lea ecx, [ebp - 20h]
call @19
lea ecx, [ebp - 20h]
call @24
sub esi, 10h
sub bl, 1h
jne @50
mov ebx, dword[ebp - 8h]
@51:
push edi
lea edx, [ebp - 20h]
mov ecx, ebx
call @17
mov ecx, dword[ebp - 10h]
push 4h
pop edx
@52:
mov eax, dword[ebx + ecx]
xor dword[ebx], eax
add ebx, 4h
sub edx, 1h
jne @52
mov edi, dword[ebp + 0Ch]
lea esi, [ebp - 30h]
mov edx, dword[ebp - 0Ch]
sub ecx, 10h
mov eax, dword[ebp + 8h]
add edx, 10h
mov dword[ebp - 8h], ebx
movsd
mov dword[ebp - 0Ch], edx
mov dword[ebp - 10h], ecx
movsd
movsd
movsd
test eax, eax
jne @49
@53:
xor al, al
@54:
pop edi
pop esi
pop ebx
leave
ret 0Ch
@55:
mov al, 1h
jmp @54