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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 0x3c], ecx
mov eax, dword [ebp - 0x3c]
movzx eax, byte [eax + 4]
test eax, eax
jne 0x40e5f4
push 0x43a200
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
push 0x418f58
lea eax, [ebp - 0x34]
push eax
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 0x3cc], 0x10
jne 0x40e613
push dword [ebp + 0xc]
push dword [ebp + 8]
mov ecx, dword [ebp - 0x3c]
call fcn.0040dad0
jmp 0x40e93d
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x3cc]
cdq
push 4
pop ecx
idiv ecx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
sub eax, 4
xor ecx, ecx
cmp dword [ebp - 0x28], 6
setne cl
inc ecx
neg eax
sbb eax, eax
and eax, ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
shl eax, 5
mov eax, dword [eax + 0x416ca8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
shl eax, 5
mov eax, dword [eax + 0x416cb0]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
shl eax, 5
mov eax, dword [eax + 0x416cb8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x3c]
add eax, 0x454
mov dword [ebp - 4], eax
and dword [ebp - 0x1c], 0
jmp 0x40e683
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
jge 0x40e71d
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
shl eax, 0x18
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
shl eax, 0x10
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx]
or ecx, eax
mov eax, dword [ebp - 4]
mov dword [eax], ecx
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
shl eax, 8
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx]
or ecx, eax
mov eax, dword [ebp - 4]
mov dword [eax], ecx
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp + 8], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
mov ecx, dword [ebp - 0x38]
mov ecx, dword [ecx]
or ecx, eax
mov eax, dword [ebp - 0x38]
mov dword [eax], ecx
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp + 8], eax
mov eax, dword [ebp - 4]
add eax, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x3c]
mov eax, dword [eax]
xor eax, dword [edx + ecx*4 + 8]
mov ecx, dword [ebp - 0x38]
mov dword [ecx], eax
jmp 0x40e67c
mov dword [ebp - 8], 1
jmp 0x40e72d
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax + 0x3d0]
jge 0x40e826
and dword [ebp - 0x1c], 0
jmp 0x40e74c
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
jge 0x40e800
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x3c]
mov ecx, dword [ecx + eax*4 + 0x454]
sar ecx, 0x18
and ecx, 0xff
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + edx*4 + 0x454]
sar eax, 0x10
and eax, 0xff
mov ecx, dword [ecx*4 + 0x413c80]
xor ecx, dword [eax*4 + 0x414080]
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + edx*4 + 0x454]
sar eax, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x414480]
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
cdq
idiv dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + edx*4 + 0x454]
and eax, 0xff
xor ecx, dword [eax*4 + 0x414880]
mov eax, dword [ebp - 8]
shl eax, 5
mov edx, dword [ebp - 0x3c]
lea eax, [edx + eax + 8]
mov edx, dword [ebp - 0x1c]
xor ecx, dword [eax + edx*4]
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x3c]
mov dword [edx + eax*4 + 0x434], ecx
jmp 0x40e745
mov eax, dword [ebp - 0x28]
shl eax, 2
push eax
mov eax, dword [ebp - 0x3c]
add eax, 0x434
push eax
mov eax, dword [ebp - 0x3c]
add eax, 0x454
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
jmp 0x40e726
and dword [ebp - 0x1c], 0
and dword [ebp - 0x20], 0
jmp 0x40e837
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
jge 0x40e93d
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x3d0]
shl eax, 5
mov ecx, dword [ebp - 0x3c]
lea eax, [ecx + eax + 8]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx + eax*4 + 0x454]
sar eax, 0x18
and eax, 0xff
movsx eax, byte [eax + str.cw]
mov ecx, dword [ebp - 0x24]
sar ecx, 0x18
xor eax, ecx
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x20]
mov byte [ecx], al
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + edx*4 + 0x454]
sar eax, 0x10
and eax, 0xff
movsx eax, byte [eax + str.cw]
mov ecx, dword [ebp - 0x24]
sar ecx, 0x10
xor eax, ecx
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x20]
mov byte [ecx], al
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + edx*4 + 0x454]
sar eax, 8
and eax, 0xff
movsx eax, byte [eax + str.cw]
mov ecx, dword [ebp - 0x24]
sar ecx, 8
xor eax, ecx
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x20]
mov byte [ecx], al
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
cdq
idiv dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + edx*4 + 0x454]
and eax, 0xff
movsx eax, byte [eax + str.cw]
xor eax, dword [ebp - 0x24]
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x20]
mov byte [ecx], al
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
jmp 0x40e830
leave
ret 8