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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
movzx eax, byte [edx]
push ebx
mov ebx, ecx
push esi
lea esi, [ebx + 1]
lea ecx, [ebx + 2]
mov byte [ebx], al
movzx eax, byte [edx + 1]
mov byte [esi], al
movzx eax, byte [edx + 2]
mov byte [ecx], al
movzx eax, byte [edx + 3]
mov byte [ebx + 3], al
movzx eax, byte [edx + 4]
mov byte [ebx + 4], al
movzx eax, byte [edx + 5]
mov byte [ebx + 5], al
movzx eax, byte [edx + 6]
mov byte [ebx + 6], al
movzx eax, byte [edx + 7]
mov byte [ebx + 7], al
movzx eax, byte [edx + 8]
mov byte [ebx + 8], al
movzx eax, byte [edx + 9]
mov byte [ebx + 9], al
movzx eax, byte [edx + 0xa]
mov dword [ebp - 8], ecx
lea ecx, [ebx + 3]
mov byte [ebx + 0xa], al
movzx eax, byte [edx + 0xb]
mov byte [ebx + 0xb], al
movzx eax, byte [edx + 0xc]
mov byte [ebx + 0xc], al
movzx eax, byte [edx + 0xd]
mov byte [ebx + 0xd], al
movzx eax, byte [edx + 0xe]
mov byte [ebx + 0xe], al
movzx eax, byte [edx + 0xf]
mov byte [ebx + 0xf], al
movzx eax, byte [edx + 0x10]
mov byte [ebx + 0x10], al
movzx eax, byte [edx + 0x11]
mov byte [ebx + 0x11], al
movzx eax, byte [edx + 0x12]
mov byte [ebx + 0x12], al
movzx eax, byte [edx + 0x13]
mov byte [ebx + 0x13], al
movzx eax, byte [edx + 0x14]
mov byte [ebx + 0x14], al
movzx eax, byte [edx + 0x15]
mov byte [ebx + 0x15], al
movzx eax, byte [edx + 0x16]
mov byte [ebx + 0x16], al
movzx eax, byte [edx + 0x17]
mov byte [ebx + 0x17], al
movzx eax, byte [edx + 0x18]
mov byte [ebx + 0x18], al
movzx eax, byte [edx + 0x19]
mov byte [ebx + 0x19], al
movzx eax, byte [edx + 0x1a]
mov byte [ebx + 0x1a], al
movzx eax, byte [edx + 0x1b]
mov byte [ebx + 0x1b], al
movzx eax, byte [edx + 0x1c]
mov byte [ebx + 0x1c], al
movzx eax, byte [edx + 0x1d]
mov byte [ebx + 0x1d], al
movzx eax, byte [edx + 0x1e]
mov byte [ebx + 0x1e], al
movzx eax, byte [edx + 0x1f]
mov edx, dword [ebp - 8]
push edi
mov byte [ebx + 0x1f], al
lea edi, [ebx + 0x21]
sub ebx, esi
mov dword [ebp - 0x10], ecx
sub edx, esi
mov dword [ebp - 0x18], ebx
lea eax, [esi + 0x1c]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0xc], ecx
sub dword [ebp - 0xc], esi
mov esi, 8
sub dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
mov dl, byte [edx + eax]
mov bl, byte [ebx + eax]
mov bh, byte [eax]
mov dh, byte [ecx + eax]
mov ecx, esi
and ecx, 7
mov byte [ebp - 1], dl
mov byte [ebp - 2], dh
mov dword [ebp - 0x14], ecx
jne 0x40a4bf
movzx ecx, bh
movzx edx, bl
mov bl, byte [ecx + str.cw]
movzx ecx, byte [ebp - 1]
mov dh, byte [edx + str.cw]
mov bh, byte [ecx + str.cw]
movzx ecx, byte [ebp - 2]
mov cl, byte [ecx + str.cw]
mov byte [ebp - 1], cl
mov ecx, esi
mov dl, byte [ebp - 1]
shr ecx, 3
xor bl, byte [ecx + 0x4ffa80]
mov ecx, dword [ebp - 0x14]
cmp ecx, 4
jne 0x40a4e8
movzx ecx, bl
mov bl, byte [ecx + str.cw]
movzx ecx, bh
mov bh, byte [ecx + str.cw]
movzx ecx, dl
mov dl, byte [ecx + str.cw]
movzx ecx, dh
mov dh, byte [ecx + str.cw]
movzx ecx, byte [edi - 0x21]
inc esi
xor cl, bl
mov byte [edi - 1], cl
movzx ecx, byte [eax - 0x1c]
add eax, 4
xor cl, bh
mov ebx, dword [ebp - 0x10]
mov byte [edi], cl
mov ecx, dword [ebp - 8]
movzx ecx, byte [ecx + ebx]
xor cl, dl
mov byte [edi + 1], cl
movzx ecx, byte [ebx]
add ebx, 4
xor cl, dh
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov byte [edi + 2], cl
add edi, 4
cmp esi, 0x3c
jb 0x40a467
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret