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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x592a80]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax + 0x1c]
sub ecx, 6
mov dword [ebp - 4], ecx
mov dword [ebp - 0x38], 0
jmp 0x40d578
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 4]
jge 0x40d592
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp + 8]
mov edx, dword [eax + edx*4]
mov dword [ebp + ecx*4 - 0x2c], edx
jmp 0x40d56f
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 4]
jge 0x40d610
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x30]
cmp edx, dword [ecx + 0x1c]
ja 0x40d610
jmp 0x40d5ce
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x38]
cmp edx, dword [ebp - 4]
jge 0x40d5f8
cmp dword [ebp - 0x34], 4
jge 0x40d5f8
mov eax, dword [ebp - 0x30]
shl eax, 4
mov ecx, dword [ebp - 0x3c]
lea edx, [ecx + eax + 0x20]
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
mov ecx, dword [ebp + ecx*4 - 0x2c]
mov dword [edx + eax*4], ecx
jmp 0x40d5bc
cmp dword [ebp - 0x34], 4
jne 0x40d60e
mov edx, dword [ebp - 0x30]
add edx, 1
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x34], 0
jmp 0x40d5a7
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x30]
cmp ecx, dword [eax + 0x1c]
ja 0x40d87c
mov edx, dword [ebp - 4]
movzx eax, byte [ebp + edx*4 - 0x2f]
movzx ecx, byte [eax + str.cw]
movzx edx, byte [ebp - 0x2c]
xor edx, ecx
mov byte [ebp - 0x2c], dl
mov eax, dword [ebp - 4]
movzx ecx, byte [ebp + eax*4 - 0x2e]
movzx edx, byte [ecx + str.cw]
movzx eax, byte [ebp - 0x2b]
xor eax, edx
mov byte [ebp - 0x2b], al
mov ecx, dword [ebp - 4]
movzx edx, byte [ebp + ecx*4 - 0x2d]
movzx eax, byte [edx + str.cw]
movzx ecx, byte [ebp - 0x2a]
xor ecx, eax
mov byte [ebp - 0x2a], cl
mov edx, dword [ebp - 4]
movzx eax, byte [ebp + edx*4 - 0x30]
movzx ecx, byte [eax + str.cw]
movzx edx, byte [ebp - 0x29]
xor edx, ecx
mov byte [ebp - 0x29], dl
movzx eax, byte [ebp - 0x2c]
mov ecx, dword [ebp - 8]
xor eax, dword [ecx*4 + 0x58e4e0]
mov byte [ebp - 0x2c], al
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
cmp dword [ebp - 4], 8
je 0x40d6d5
mov dword [ebp - 0x38], 1
jmp 0x40d6b1
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
cmp ecx, dword [ebp - 4]
jge 0x40d6d0
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp + edx*4 - 0x2c]
xor ecx, dword [ebp + eax*4 - 0x30]
mov edx, dword [ebp - 0x38]
mov dword [ebp + edx*4 - 0x2c], ecx
jmp 0x40d6a8
jmp 0x40d807
mov dword [ebp - 0x38], 1
jmp 0x40d6e7
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp - 0x38], eax
jge 0x40d70b
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp + ecx*4 - 0x2c]
xor eax, dword [ebp + edx*4 - 0x30]
mov ecx, dword [ebp - 0x38]
mov dword [ebp + ecx*4 - 0x2c], eax
jmp 0x40d6de
mov eax, dword [ebp - 4]
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
movzx edx, byte [ebp + eax*4 - 0x30]
movzx eax, byte [edx + str.cw]
movzx ecx, byte [ebp + ecx*4 - 0x2c]
xor ecx, eax
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
mov byte [ebp + eax*4 - 0x2c], cl
mov eax, dword [ebp - 4]
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
movzx edx, byte [ebp + eax*4 - 0x2f]
movzx eax, byte [edx + str.cw]
movzx ecx, byte [ebp + ecx*4 - 0x2b]
xor ecx, eax
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
mov byte [ebp + eax*4 - 0x2b], cl
mov eax, dword [ebp - 4]
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
movzx edx, byte [ebp + eax*4 - 0x2e]
movzx eax, byte [edx + str.cw]
movzx ecx, byte [ebp + ecx*4 - 0x2a]
xor ecx, eax
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
mov byte [ebp + eax*4 - 0x2a], cl
mov eax, dword [ebp - 4]
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
movzx edx, byte [ebp + eax*4 - 0x2d]
movzx eax, byte [edx + str.cw]
movzx ecx, byte [ebp + ecx*4 - 0x29]
xor ecx, eax
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
mov byte [ebp + eax*4 - 0x29], cl
mov eax, dword [ebp - 4]
cdq
sub eax, edx
sar eax, 1
add eax, 1
mov dword [ebp - 0x38], eax
jmp 0x40d7e8
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 4]
jge 0x40d807
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp + ecx*4 - 0x2c]
xor eax, dword [ebp + edx*4 - 0x30]
mov ecx, dword [ebp - 0x38]
mov dword [ebp + ecx*4 - 0x2c], eax
jmp 0x40d7df
mov dword [ebp - 0x38], 0
mov edx, dword [ebp - 0x38]
cmp edx, dword [ebp - 4]
jge 0x40d877
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x30]
cmp ecx, dword [eax + 0x1c]
ja 0x40d877
jmp 0x40d835
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x38]
cmp ecx, dword [ebp - 4]
jge 0x40d85f
cmp dword [ebp - 0x34], 4
jge 0x40d85f
mov edx, dword [ebp - 0x30]
shl edx, 4
mov eax, dword [ebp - 0x3c]
lea ecx, [eax + edx + 0x20]
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
mov eax, dword [ebp + eax*4 - 0x2c]
mov dword [ecx + edx*4], eax
jmp 0x40d823
cmp dword [ebp - 0x34], 4
jne 0x40d875
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], 0
jmp 0x40d80e
jmp 0x40d610
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.0050876f
mov esp, ebp
pop ebp
ret 4