Function at 0x420670
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x14]
cdq
and edx, 3
push ebx
push esi
mov esi, dword [ebp + 8]
lea ecx, [edx + eax]
mov eax, dword [ebp + 0xc]
cdq
and edx, 3
sar ecx, 2
add eax, edx
mov dword [ebp - 4], ecx
sar eax, 2
cmp eax, ecx
mov dword [esi + 0x3e8], eax
mov edx, eax
cmovle edx, ecx
add edx, 6
mov dword [esi + 0x3ec], edx
push edi
cmp eax, 8
jne 0x4206c9
mov dword [esi + 0x3c0], 0x41ffe0
mov dword [esi + 0x3c4], 0x41f150
jmp 0x4206fd
cmp eax, 6
jne 0x4206e4
mov dword [esi + 0x3c0], 0x41fb90
mov dword [esi + 0x3c4], 0x41ece0
jmp 0x4206fd
cmp eax, 4
jne 0x4206fd
mov dword [esi + 0x3c0], 0x41f8b0
mov dword [esi + 0x3c4], 0x41e9e0
lea ecx, [edx + 1]
mov dword [ebp + 0xc], 1
imul ecx, eax
xor edi, edi
test ecx, ecx
jle 0x420856
mov ecx, dword [ebp - 4]
mov ebx, esi
mov edx, dword [ebp + 0x10]
lea eax, [ecx*4]
sub ebx, eax
add edx, 2
mov dword [ebp + 0x14], ebx
mov dword [ebp + 8], edx
nop
cmp edi, ecx
jge 0x420757
movzx ecx, byte [edx - 2]
movzx eax, byte [edx - 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
jmp 0x42081e
mov eax, edi
mov ebx, dword [esi + edi*4 - 4]
cdq
idiv ecx
test edx, edx
jne 0x4207c4
mov edx, dword [ebp + 0xc]
mov eax, ebx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + str.cw]
mov eax, ebx
shr eax, 8
xor ecx, edx
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
movzx eax, bl
shl ecx, 8
shr ebx, 0x18
movzx eax, byte [eax + str.cw]
or ecx, eax
mov eax, edx
movzx ebx, byte [ebx + str.cw]
and al, 0x80
shl ecx, 8
movzx eax, al
or ebx, ecx
neg eax
sbb eax, eax
and edx, 0x7f
and eax, 0x1b
add edx, edx
xor edx, eax
mov dword [ebp + 0xc], edx
jmp 0x420811
cmp edx, 4
jne 0x420811
cmp ecx, 6
jle 0x420811
mov eax, ebx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + str.cw]
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax + str.cw]
shl eax, 8
or ecx, eax
mov eax, ebx
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
movzx eax, bl
shl ecx, 8
movzx ebx, byte [eax + str.cw]
or ebx, ecx
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
mov ecx, dword [ecx]
xor ecx, ebx
mov ebx, dword [ebp + 0x14]
lea eax, [edi*4]
add edx, 4
mov dword [eax + esi], ecx
inc edi
mov ecx, dword [esi + 0x3ec]
add ebx, 4
mov eax, dword [esi + 0x3e8]
mov dword [ebp - 8], ecx
inc ecx
imul ecx, eax
mov dword [ebp + 8], edx
mov dword [ebp + 0x14], ebx
cmp edi, ecx
mov ecx, dword [ebp - 4]
jl 0x420730
mov edx, dword [ebp - 8]
xor ebx, ebx
test edx, edx
js 0x42090a
xor edi, edi
test eax, eax
jle 0x4208fd
nop word [eax + eax]
mov edx, dword [esi + 0x3ec]
mov ecx, edx
sub ecx, ebx
imul ecx, eax
add ecx, edi
mov ecx, dword [esi + ecx*4]
mov dword [ebp + 0x14], ecx
test ebx, ebx
je 0x4208e2
cmp ebx, edx
je 0x4208e2
shr ecx, 0x10
movzx ecx, cl
movzx edx, byte [ecx + str.cw]
mov ecx, dword [ebp + 0x14]
shr ecx, 8
movzx ecx, cl
mov edx, dword [edx*4 + 0x4b2368]
movzx ecx, byte [ecx + str.cw]
xor edx, dword [ecx*4 + 0x4b2768]
mov ecx, dword [ebp + 0x14]
shr ecx, 0x18
movzx ecx, byte [ecx + str.cw]
xor edx, dword [ecx*4 + 0x4b1f68]
mov ecx, dword [ebp + 0x14]
movzx ecx, cl
movzx ecx, byte [ecx + str.cw]
xor edx, dword [ecx*4 + 0x4b2b68]
mov ecx, edx
imul eax, ebx
add eax, edi
inc edi
mov dword [esi + eax*4 + 0x1e0], ecx
mov eax, dword [esi + 0x3e8]
cmp edi, eax
jl 0x420870
inc ebx
cmp ebx, dword [esi + 0x3ec]
jle 0x420860
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret