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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov al, byte [edx]
mov byte [ecx], al
movzx ebx, byte [edx + 1]
mov byte [ecx + 1], bl
movzx ebx, byte [edx + 2]
mov byte [ecx + 2], bl
movzx ebx, byte [edx + 3]
lea eax, [ecx + 1]
mov byte [ecx + 3], bl
movzx ebx, byte [edx + 4]
mov byte [ecx + 4], bl
movzx ebx, byte [edx + 5]
mov byte [ecx + 5], bl
movzx ebx, byte [edx + 6]
mov byte [ecx + 6], bl
movzx ebx, byte [edx + 7]
mov byte [ecx + 7], bl
movzx ebx, byte [edx + 8]
mov byte [ecx + 8], bl
movzx ebx, byte [edx + 9]
mov byte [ecx + 9], bl
movzx ebx, byte [edx + 0xa]
mov byte [ecx + 0xa], bl
movzx ebx, byte [edx + 0xb]
mov byte [ecx + 0xb], bl
movzx ebx, byte [edx + 0xc]
mov byte [ecx + 0xc], bl
movzx ebx, byte [edx + 0xd]
mov byte [ecx + 0xd], bl
movzx ebx, byte [edx + 0xe]
mov byte [ecx + 0xe], bl
mov dl, byte [edx + 0xf]
mov byte [ecx + 0xf], dl
lea edx, [ecx + 0xf]
mov dword [ebp + 0xc], edx
mov edx, ecx
sub edx, eax
mov dword [ebp - 0xc], edx
lea edx, [ecx + 2]
sub edx, eax
mov dword [ebp - 0x10], edx
lea edx, [ecx + 3]
sub edx, eax
mov dword [ebp - 0x14], edx
lea edx, [ecx + 2]
mov ebx, ecx
sub ebx, edx
mov dword [ebp - 0x18], ebx
lea ebx, [ecx + 3]
sub ebx, edx
lea edx, [ecx + 3]
sub edx, ecx
lea edi, [ecx + 0x14]
lea esi, [ecx + 6]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], 5
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], edx
movzx ebx, byte [eax + 0xc]
mov dl, byte [edi - 8]
mov byte [ebp + 9], bl
movzx ebx, byte [esi + 8]
mov byte [ebp + 0xa], bl
movzx ebx, byte [ecx]
mov byte [ebp + 0xb], bl
mov ebx, dword [ebp - 4]
dec ebx
mov dword [ebp - 8], ebx
and ebx, 3
mov dword [ebp - 0x24], ebx
jne 0x40946e
movzx ebx, byte [ebp + 0xa]
movzx ebx, byte [ebx + str.cw]
mov byte [ebp + 0xf], dl
movzx edx, byte [ebp + 9]
mov dl, byte [edx + str.cw]
mov byte [ebp + 9], bl
movzx ebx, byte [ebp + 0xb]
movzx ebx, byte [ebx + str.cw]
mov byte [ebp + 0xa], bl
movzx ebx, byte [ebp + 0xf]
movzx ebx, byte [ebx + str.cw]
mov byte [ebp + 0xb], bl
mov ebx, dword [ebp - 8]
shr ebx, 2
xor dl, byte [ebx + 0x53eb54]
mov ebx, dword [ebp - 0xc]
movzx ebx, byte [eax + ebx]
xor bl, dl
mov byte [edi - 4], bl
movzx edx, byte [eax]
xor dl, byte [ebp + 9]
mov byte [eax + 0x10], dl
mov edx, dword [ebp - 0x10]
movzx edx, byte [eax + edx]
xor dl, byte [ebp + 0xa]
mov byte [esi + 0xc], dl
mov edx, dword [ebp - 0x14]
movzx edx, byte [eax + edx]
xor dl, byte [ebp + 0xb]
test byte [ebp - 4], 3
mov byte [ecx + 4], dl
mov dl, bl
movzx ebx, byte [eax + 0x10]
mov byte [ebp + 9], bl
movzx ebx, byte [esi + 0xc]
mov byte [ebp + 0xa], bl
movzx ebx, byte [ecx + 4]
mov byte [ebp + 0xb], bl
jne 0x4094fd
movzx ebx, byte [ebp + 0xa]
movzx ebx, byte [ebx + str.cw]
mov byte [ebp + 0xf], dl
movzx edx, byte [ebp + 9]
mov dl, byte [edx + str.cw]
mov byte [ebp + 9], bl
movzx ebx, byte [ebp + 0xb]
movzx ebx, byte [ebx + str.cw]
mov byte [ebp + 0xa], bl
movzx ebx, byte [ebp + 0xf]
movzx ebx, byte [ebx + str.cw]
mov byte [ebp + 0xb], bl
mov ebx, dword [ebp - 4]
shr ebx, 2
xor dl, byte [ebx + 0x53eb54]
mov ebx, dword [ebp - 0x18]
movzx ebx, byte [esi + ebx]
xor bl, dl
mov byte [edi], bl
movzx edx, byte [eax + 4]
xor dl, byte [ebp + 9]
mov ebx, dword [ebp - 0x20]
mov byte [eax + 0x14], dl
movzx edx, byte [esi]
xor dl, byte [ebp + 0xa]
mov byte [esi + 0x10], dl
mov edx, dword [ebp - 0x1c]
mov dl, byte [esi + edx]
xor dl, byte [ebp + 0xb]
mov byte [edi + ebx], dl
movzx ebx, byte [edi]
mov byte [ebp + 8], bl
movzx ebx, byte [eax + 0x14]
mov byte [ebp + 0xb], dl
mov edx, dword [ebp - 4]
mov byte [ebp + 9], bl
movzx ebx, byte [esi + 0x10]
inc edx
mov byte [ebp + 0xa], bl
test dl, 3
jne 0x409594
movzx edx, byte [ebp + 8]
mov byte [ebp + 0xf], dl
movzx edx, byte [ebp + 9]
mov bl, byte [edx + str.cw]
movzx edx, byte [ebp + 0xa]
movzx edx, byte [edx + str.cw]
mov byte [ebp + 9], dl
movzx edx, byte [ebp + 0xb]
movzx edx, byte [edx + str.cw]
mov byte [ebp + 0xa], dl
movzx edx, byte [ebp + 0xf]
movzx edx, byte [edx + str.cw]
mov byte [ebp + 0xb], dl
mov edx, dword [ebp - 4]
inc edx
shr edx, 2
xor bl, byte [edx + 0x53eb54]
jmp 0x409597
mov bl, byte [ebp + 8]
movzx edx, byte [edi - 0xc]
xor dl, bl
mov byte [edi + 4], dl
movzx edx, byte [eax + 8]
xor dl, byte [ebp + 9]
mov byte [eax + 0x18], dl
movzx edx, byte [esi + 4]
xor dl, byte [ebp + 0xa]
mov byte [esi + 0x14], dl
mov dl, byte [ecx - 4]
xor dl, byte [ebp + 0xb]
mov byte [ecx + 0xc], dl
movzx ebx, byte [edi + 4]
mov byte [ebp + 8], bl
movzx ebx, byte [eax + 0x18]
mov byte [ebp + 0xb], dl
mov edx, dword [ebp - 4]
mov byte [ebp + 9], bl
movzx ebx, byte [esi + 0x14]
add edx, 0xfffffffe
mov byte [ebp + 0xa], bl
test dl, 3
jne 0x40962c
movzx edx, byte [ebp + 8]
mov byte [ebp + 0xf], dl
movzx edx, byte [ebp + 9]
mov bl, byte [edx + str.cw]
movzx edx, byte [ebp + 0xa]
movzx edx, byte [edx + str.cw]
mov byte [ebp + 9], dl
movzx edx, byte [ebp + 0xb]
movzx edx, byte [edx + str.cw]
mov byte [ebp + 0xa], dl
movzx edx, byte [ebp + 0xf]
movzx edx, byte [edx + str.cw]
mov byte [ebp + 0xb], dl
mov edx, dword [ebp - 4]
add edx, 2
shr edx, 2
xor bl, byte [edx + 0x53eb54]
jmp 0x40962f
mov bl, byte [ebp + 8]
movzx edx, byte [edi - 8]
xor dl, bl
mov byte [edi + 8], dl
movzx edx, byte [eax + 0xc]
xor dl, byte [ebp + 9]
mov byte [eax + 0x1c], dl
movzx edx, byte [esi + 8]
xor dl, byte [ebp + 0xa]
mov byte [esi + 0x18], dl
mov dl, byte [ecx]
xor dl, byte [ebp + 0xb]
cmp dword [ebp - 0x24], 0
mov byte [ecx + 0x10], dl
movzx ebx, byte [edi + 8]
mov byte [ebp + 8], bl
movzx ebx, byte [eax + 0x1c]
mov byte [ebp + 9], bl
movzx ebx, byte [esi + 0x18]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], dl
jne 0x4096be
movzx edx, byte [ebp + 8]
mov byte [ebp + 0xf], dl
movzx edx, byte [ebp + 9]
mov bl, byte [edx + str.cw]
movzx edx, byte [ebp + 0xa]
movzx edx, byte [edx + str.cw]
mov byte [ebp + 9], dl
movzx edx, byte [ebp + 0xb]
movzx edx, byte [edx + str.cw]
mov byte [ebp + 0xa], dl
movzx edx, byte [ebp + 0xf]
movzx edx, byte [edx + str.cw]
mov byte [ebp + 0xb], dl
mov edx, dword [ebp - 4]
add edx, 3
shr edx, 2
xor bl, byte [edx + 0x53eb54]
jmp 0x4096c1
mov bl, byte [ebp + 8]
movzx edx, byte [edi - 4]
xor dl, bl
mov byte [edi + 0xc], dl
movzx edx, byte [eax + 0x10]
xor dl, byte [ebp + 9]
add eax, 0x14
mov byte [eax + 0xc], dl
movzx edx, byte [esi + 0xc]
xor dl, byte [ebp + 0xa]
add esi, 0x14
mov byte [esi + 8], dl
movzx edx, byte [ecx + 4]
xor dl, byte [ebp + 0xb]
add edi, 0x14
mov byte [ecx + 0x14], dl
mov edx, dword [ebp - 4]
add edx, 5
mov dword [ebp - 4], edx
dec edx
add ecx, 0x14
cmp edx, 0x2c
jb 0x409405
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8