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

Disassembly:
mov ecx, dword [esp + 8]
movzx eax, byte [ecx]
movzx edx, byte [ecx + 1]
push esi
shl eax, 8
add eax, edx
movzx edx, byte [ecx + 2]
shl eax, 8
add eax, edx
movzx edx, byte [ecx + 3]
push edi
shl eax, 8
add eax, edx
mov edx, dword [esp + 0xc]
mov dword [edx], eax
movzx esi, byte [ecx + 4]
movzx edi, byte [ecx + 5]
shl esi, 8
add esi, edi
movzx edi, byte [ecx + 6]
shl esi, 8
add esi, edi
movzx edi, byte [ecx + 7]
shl esi, 8
add esi, edi
mov dword [edx + 4], esi
movzx esi, byte [ecx + 8]
movzx edi, byte [ecx + 9]
shl esi, 8
add esi, edi
movzx edi, byte [ecx + 0xa]
lea eax, [edx + 4]
shl esi, 8
add esi, edi
movzx edi, byte [ecx + 0xb]
shl esi, 8
add esi, edi
mov dword [edx + 8], esi
movzx esi, byte [ecx + 0xc]
movzx edi, byte [ecx + 0xd]
shl esi, 8
add esi, edi
movzx edi, byte [ecx + 0xe]
movzx ecx, byte [ecx + 0xf]
shl esi, 8
add esi, edi
shl esi, 8
add esi, ecx
push ebx
mov dword [edx + 0xc], esi
mov ecx, 5
push ebp
lea ebx, [ebx]
mov esi, dword [eax + 8]
lea ebx, [ecx - 1]
and ebx, 3
mov edx, esi
jne 0x40cf2b
rol edx, 8
mov edi, edx
shr edi, 0x10
mov ebp, edx
shr ebp, 0x18
movzx ebp, byte [ebp + 0x5839c8]
and edi, 0xff
movzx edi, byte [edi + 0x5839c8]
shl ebp, 8
or edi, ebp
mov ebp, edx
shr ebp, 8
and ebp, 0xff
movzx ebp, byte [ebp + 0x5839c8]
and edx, 0xff
movzx edx, byte [edx + 0x5839c8]
shl edi, 8
or edi, ebp
shl edi, 8
or edi, edx
lea edx, [ecx - 1]
shr edx, 2
xor edi, dword [edx*4 + 0x583bc8]
mov edx, edi
mov edi, dword [eax - 4]
xor edi, edx
mov dword [eax + 0xc], edi
mov edx, edi
test cl, 3
jne 0x40cf97
rol edx, 8
mov edi, edx
shr edi, 0x10
mov ebp, edx
shr ebp, 0x18
movzx ebp, byte [ebp + 0x5839c8]
and edi, 0xff
movzx edi, byte [edi + 0x5839c8]
shl ebp, 8
or edi, ebp
mov ebp, edx
shr ebp, 8
and ebp, 0xff
movzx ebp, byte [ebp + 0x5839c8]
and edx, 0xff
movzx edx, byte [edx + 0x5839c8]
shl edi, 8
or edi, ebp
shl edi, 8
or edi, edx
mov edx, ecx
shr edx, 2
xor edi, dword [edx*4 + 0x583bc8]
mov edx, edi
mov edi, dword [eax]
xor edi, edx
lea edx, [ecx + 1]
mov dword [eax + 0x10], edi
mov ebp, edi
test dl, 3
jne 0x40d006
mov edx, ebp
rol edx, 8
mov edi, edx
shr edi, 0x10
and edi, 0xff
movzx ebp, byte [edi + 0x5839c8]
mov edi, edx
shr edi, 0x18
movzx edi, byte [edi + 0x5839c8]
shl edi, 8
or ebp, edi
mov edi, edx
shr edi, 8
and edi, 0xff
movzx edi, byte [edi + 0x5839c8]
shl ebp, 8
and edx, 0xff
movzx edx, byte [edx + 0x5839c8]
or ebp, edi
shl ebp, 8
or ebp, edx
lea edx, [ecx + 1]
shr edx, 2
xor ebp, dword [edx*4 + 0x583bc8]
mov edi, dword [eax + 4]
xor edi, ebp
lea edx, [ecx - 2]
mov dword [eax + 0x14], edi
test dl, 3
jne 0x40d074
mov edx, edi
rol edx, 8
mov edi, edx
shr edi, 0x10
mov ebp, edx
shr ebp, 0x18
movzx ebp, byte [ebp + 0x5839c8]
and edi, 0xff
movzx edi, byte [edi + 0x5839c8]
shl ebp, 8
or edi, ebp
mov ebp, edx
shr ebp, 8
and ebp, 0xff
movzx ebp, byte [ebp + 0x5839c8]
shl edi, 8
and edx, 0xff
movzx edx, byte [edx + 0x5839c8]
or edi, ebp
shl edi, 8
or edi, edx
lea edx, [ecx + 2]
shr edx, 2
xor edi, dword [edx*4 + 0x583bc8]
xor esi, edi
mov dword [eax + 0x18], esi
mov edx, esi
test ebx, ebx
jne 0x40d0dd
rol edx, 8
mov esi, edx
shr esi, 0x10
mov edi, edx
shr edi, 0x18
movzx edi, byte [edi + 0x5839c8]
and esi, 0xff
movzx esi, byte [esi + 0x5839c8]
shl edi, 8
or esi, edi
mov edi, edx
shr edi, 8
and edi, 0xff
movzx edi, byte [edi + 0x5839c8]
and edx, 0xff
movzx edx, byte [edx + 0x5839c8]
shl esi, 8
or esi, edi
shl esi, 8
or esi, edx
lea edx, [ecx + 3]
shr edx, 2
xor esi, dword [edx*4 + 0x583bc8]
mov edx, esi
mov esi, dword [eax + 0xc]
xor esi, edx
add ecx, 5
mov dword [eax + 0x1c], esi
lea edx, [ecx - 1]
add eax, 0x14
cmp edx, 0x2c
jl 0x40cec0
cmp dword [esp + 0x20], 0
pop ebp
pop ebx
je 0x40d11f
mov esi, dword [esp + 0xc]
add esi, 0x10
mov edi, 9
lea esp, [esp]
push esi
call fcn.0040c9c0
add esp, 4
add esi, 0x10
dec edi
jne 0x40d110
pop edi
pop esi
ret