Function at 0x40e941
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 0x40e971
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 0x40e990
push dword [ebp + 0xc]
push dword [ebp + 8]
mov ecx, dword [ebp - 0x3c]
call fcn.0040e046
jmp 0x40ecc3
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 + 0x416cac]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
shl eax, 5
mov eax, dword [eax + 0x416cb4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
shl eax, 5
mov eax, dword [eax + 0x416cbc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x3c]
add eax, 0x454
mov dword [ebp - 4], eax
and dword [ebp - 0x1c], 0
jmp 0x40ea00
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
jge 0x40ea9d
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 + 0x1e8]
mov ecx, dword [ebp - 0x38]
mov dword [ecx], eax
jmp 0x40e9f9
mov dword [ebp - 8], 1
jmp 0x40eaad
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 0x40eba9
and dword [ebp - 0x1c], 0
jmp 0x40eacc
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
jge 0x40eb83
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 + 0x414c80]
xor ecx, dword [eax*4 + 0x415080]
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 + 0x415480]
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 + 0x415880]
mov eax, dword [ebp - 8]
shl eax, 5
mov edx, dword [ebp - 0x3c]
lea eax, [edx + eax + 0x1e8]
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 0x40eac5
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 0x40eaa6
and dword [ebp - 0x1c], 0
and dword [ebp - 0x20], 0
jmp 0x40ebba
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
jge 0x40ecc3
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x3d0]
shl eax, 5
mov ecx, dword [ebp - 0x3c]
lea eax, [ecx + eax + 0x1e8]
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 + 0x413b80]
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 + 0x413b80]
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 + 0x413b80]
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 + 0x413b80]
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 0x40ebb3
leave
ret 8