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

Disassembly:
sub esp, 0x10
mov edx, dword [esp + 0x14]
push ebx
push ebp
mov ebp, dword [esp + 0x24]
mov ebx, dword [ebp + 0xa4]
mov ecx, dword [ebp + 0xa8]
mov eax, dword [ebp + 0xac]
xor ebx, dword [edx + 4]
xor ecx, dword [edx + 8]
xor eax, dword [edx + 0xc]
add ebp, 0xa0
push esi
mov esi, dword [ebp]
xor esi, dword [edx]
sub ebp, 0x20
push edi
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], 9
jmp 0x40127a
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
movzx ecx, ch
movzx ecx, byte [ecx + 0x454100]
mov edx, eax
shr edx, 0x10
and edx, 0xff
movzx edx, byte [edx + 0x454100]
mov edi, esi
shr edi, 0x18
mov dh, byte [edi + 0x454100]
shr esi, 0x10
and esi, 0xff
shl edx, 8
or edx, ecx
mov ecx, ebx
and ecx, 0xff
movzx ecx, byte [ecx + 0x454100]
shr ebx, 0x18
shl edx, 8
or edx, ecx
movzx ecx, byte [esi + 0x454100]
mov ch, byte [ebx + 0x454100]
movzx esi, ah
movzx esi, byte [esi + 0x454100]
shl ecx, 8
or ecx, esi
mov esi, dword [esp + 0x2c]
shl ecx, 8
and esi, 0xff
movzx esi, byte [esi + 0x454100]
or ecx, esi
xor ecx, dword [ebp + 0x14]
xor edx, dword [ebp + 0x10]
mov esi, ecx
mov ecx, dword [esp + 0x10]
shr ecx, 0x10
and ecx, 0xff
movzx ebx, byte [ecx + 0x454100]
mov ecx, dword [esp + 0x2c]
shr ecx, 0x18
mov bh, byte [ecx + 0x454100]
mov ecx, dword [esp + 0x24]
movzx edi, ch
movzx edi, byte [edi + 0x454100]
shl ebx, 8
or ebx, edi
mov edi, eax
shl ebx, 8
and edi, 0xff
movzx edi, byte [edi + 0x454100]
or ebx, edi
xor ebx, dword [ebp + 0x18]
shr eax, 0x18
mov edi, ebx
mov ebx, dword [esp + 0x2c]
shr ebx, 0x10
and ebx, 0xff
movzx ebx, byte [ebx + 0x454100]
mov bh, byte [eax + 0x454100]
movzx eax, byte [esp + 0x11]
movzx eax, byte [eax + 0x454100]
shl ebx, 8
or ebx, eax
and ecx, 0xff
movzx ecx, byte [ecx + 0x454100]
mov eax, edx
shr eax, 7
and eax, 0x1010101
shl ebx, 8
imul eax, eax, 0x1b
or ebx, ecx
xor ebx, dword [ebp + 0x1c]
mov ecx, edx
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ecx, eax
shr ecx, 7
and ecx, 0x1010101
mov dword [esp + 0x1c], ebx
imul ecx, ecx, 0x1b
mov ebx, eax
and ebx, 0xff7f7f7f
add ebx, ebx
xor ecx, ebx
mov ebx, ecx
shr ebx, 7
and ebx, 0x1010101
imul ebx, ebx, 0x1b
mov ebp, ecx
and ebp, 0xff7f7f7f
add ebp, ebp
xor ebx, ebp
xor edx, ebx
mov dword [esp + 0x2c], ebx
mov ebx, ecx
xor ebx, edx
rol ebx, 0x10
mov ebp, eax
xor ebp, edx
rol ebp, 8
xor ebx, ebp
ror edx, 8
xor ebx, edx
xor ebx, dword [esp + 0x2c]
mov edx, esi
xor ebx, ecx
xor ebx, eax
and edx, 0xff7f7f7f
mov eax, esi
shr eax, 7
and eax, 0x1010101
imul eax, eax, 0x1b
add edx, edx
xor eax, edx
mov ecx, eax
shr ecx, 7
and ecx, 0x1010101
imul ecx, ecx, 0x1b
mov edx, eax
and edx, 0xff7f7f7f
add edx, edx
xor ecx, edx
mov edx, ecx
shr edx, 7
and edx, 0x1010101
imul edx, edx, 0x1b
mov dword [esp + 0x24], ebx
mov ebx, ecx
and ebx, 0xff7f7f7f
add ebx, ebx
xor edx, ebx
xor esi, edx
mov ebx, ecx
xor ebx, esi
mov ebp, eax
rol ebx, 0x10
xor ebp, esi
rol ebp, 8
xor ebx, ebp
ror esi, 8
xor ebx, esi
xor ebx, edx
xor ebx, ecx
xor ebx, eax
mov eax, edi
shr eax, 7
and eax, 0x1010101
imul eax, eax, 0x1b
mov ecx, edi
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ecx, eax
shr ecx, 7
and ecx, 0x1010101
imul ecx, ecx, 0x1b
mov edx, eax
and edx, 0xff7f7f7f
add edx, edx
xor ecx, edx
mov dword [esp + 0x10], ebx
mov edx, ecx
shr edx, 7
and edx, 0x1010101
imul edx, edx, 0x1b
mov esi, ecx
and esi, 0xff7f7f7f
add esi, esi
xor edx, esi
xor edi, edx
mov esi, ecx
xor esi, edi
rol esi, 0x10
mov ebp, eax
xor ebp, edi
rol ebp, 8
xor esi, ebp
ror edi, 8
xor esi, edi
xor esi, edx
xor esi, ecx
xor esi, eax
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x1c]
mov eax, esi
shr eax, 7
and eax, 0x1010101
imul eax, eax, 0x1b
mov ecx, esi
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ecx, eax
shr ecx, 7
and ecx, 0x1010101
imul ecx, ecx, 0x1b
mov edx, eax
and edx, 0xff7f7f7f
add edx, edx
xor ecx, edx
mov edx, ecx
shr edx, 7
and edx, 0x1010101
imul edx, edx, 0x1b
mov edi, ecx
and edi, 0xff7f7f7f
add edi, edi
xor edx, edi
xor esi, edx
mov edi, ecx
xor edi, esi
rol edi, 0x10
mov ebp, eax
xor ebp, esi
rol ebp, 8
xor edi, ebp
mov ebp, dword [esp + 0x14]
ror esi, 8
xor edi, esi
xor edi, edx
xor edi, ecx
sub ebp, 0x10
xor eax, edi
sub dword [esp + 0x18], 1
mov dword [esp + 0x14], ebp
jne 0x401272
mov ecx, dword [esp + 0x24]
shr ecx, 0x10
and ecx, 0xff
movzx edx, byte [ecx + 0x454100]
mov ecx, ebx
shr ecx, 0x18
mov dh, byte [ecx + 0x454100]
movzx ecx, ah
movzx ecx, byte [ecx + 0x454100]
shl edx, 8
or edx, ecx
mov ecx, dword [esp + 0x2c]
shl edx, 8
and ecx, 0xff
movzx ecx, byte [ecx + 0x454100]
or edx, ecx
xor edx, dword [ebp + 0x14]
mov ecx, dword [esp + 0x2c]
mov esi, edx
mov edx, ebx
shr edx, 0x10
and edx, 0xff
movzx edx, byte [edx + 0x454100]
shr ecx, 0x18
mov dh, byte [ecx + 0x454100]
mov ecx, dword [esp + 0x24]
movzx edi, ch
movzx edi, byte [edi + 0x454100]
shl edx, 8
or edx, edi
shl edx, 8
mov edi, eax
and edi, 0xff
movzx edi, byte [edi + 0x454100]
or edx, edi
xor edx, dword [ebp + 0x18]
mov edi, eax
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x2c]
shr edx, 0x10
and edx, 0xff
movzx edx, byte [edx + 0x454100]
shr edi, 0x18
mov dh, byte [edi + 0x454100]
movzx edi, bh
movzx edi, byte [edi + 0x454100]
shl edx, 8
or edx, edi
shl edx, 8
and ecx, 0xff
movzx ecx, byte [ecx + 0x454100]
or edx, ecx
xor edx, dword [ebp + 0x1c]
shr eax, 0x10
mov edi, edx
and eax, 0xff
movzx edx, byte [eax + 0x454100]
mov eax, dword [esp + 0x24]
shr eax, 0x18
mov dh, byte [eax + 0x454100]
movzx eax, byte [esp + 0x2d]
movzx ecx, byte [eax + 0x454100]
shl edx, 8
and ebx, 0xff
movzx eax, byte [ebx + 0x454100]
or edx, ecx
mov ecx, dword [esp + 0x1c]
shl edx, 8
or edx, eax
xor edx, dword [ebp + 0x10]
mov eax, dword [esp + 0x28]
mov dword [eax + 0xc], edi
pop edi
mov dword [eax + 4], esi
pop esi
pop ebp
mov dword [eax], edx
mov dword [eax + 8], ecx
pop ebx
add esp, 0x10
ret