Function at 0x40dd50
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x4bf070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
test esi, esi
je 0x40e14e
mov dword [ebx + 0x3cc], 0x10
mov dword [ebx + 0x3c8], 0x20
movups xmm0, xmmword [eax]
movups xmmword [ebx + 0x3d4], xmm0
push dword [ebx + 0x3cc]
push eax
lea eax, [ebx + 0x3f4]
push eax
call fcn.00417b30
mov eax, dword [ebx + 0x3c8]
add esp, 0xc
cmp eax, 0x10
je 0x40ddd1
cmp eax, 0x18
je 0x40ddc3
mov dword [ebx + 0x3d0], 0xe
jmp 0x40ddf6
xor eax, eax
cmp dword [ebx + 0x3cc], 0x20
sete al
jmp 0x40dde9
mov ecx, dword [ebx + 0x3cc]
cmp ecx, 0x10
jne 0x40dde1
lea eax, [ecx - 6]
jmp 0x40ddf0
xor eax, eax
cmp ecx, 0x18
setne al
lea eax, [eax*2 + 0xc]
mov dword [ebx + 0x3d0], eax
mov eax, dword [ebx + 0x3cc]
cdq
and edx, 3
add eax, edx
xor edx, edx
sar eax, 2
mov dword [ebp - 0x14], eax
cmp dword [ebx + 0x3d0], edx
jl 0x40de3f
lea edi, [ebx + 8]
mov esi, eax
mov dword [ebp - 0x10], edi
nop word [eax + eax]
test esi, esi
jle 0x40de2d
mov ecx, esi
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x10]
inc edx
add edi, 0x20
mov dword [ebp - 0x10], edi
cmp edx, dword [ebx + 0x3d0]
jle 0x40de20
mov esi, dword [ebp + 8]
xor edx, edx
cmp dword [ebx + 0x3d0], edx
jl 0x40de74
mov esi, dword [ebp - 0x14]
lea edi, [ebx + 0x1e8]
mov dword [ebp - 0x10], edi
test esi, esi
jle 0x40de62
mov ecx, esi
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x10]
inc edx
add edi, 0x20
mov dword [ebp - 0x10], edi
cmp edx, dword [ebx + 0x3d0]
jle 0x40de55
mov esi, dword [ebp + 8]
mov eax, dword [ebx + 0x3d0]
inc eax
imul eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x3c8]
cdq
and edx, 3
add eax, edx
lea edx, [ebx + 0x414]
sar eax, 2
mov ecx, edx
mov dword [ebp - 0x10], eax
test eax, eax
jle 0x40ded7
mov edx, eax
movzx eax, byte [esi]
lea esi, [esi + 4]
shl eax, 0x18
lea ecx, [ecx + 4]
mov dword [ecx - 4], eax
movzx eax, byte [esi - 3]
shl eax, 0x10
or dword [ecx - 4], eax
movzx eax, byte [esi - 2]
shl eax, 8
or dword [ecx - 4], eax
movzx eax, byte [esi - 1]
or dword [ecx - 4], eax
sub edx, 1
jne 0x40dea2
lea edx, [ebx + 0x414]
mov esi, dword [ebp - 0x10]
xor edi, edi
test esi, esi
jle 0x40df25
mov ecx, edx
mov dword [ebp - 0x18], edx
cmp edi, dword [ebp - 0x1c]
jge 0x40e0b0
mov eax, edi
mov ecx, dword [ecx]
cdq
inc edi
idiv dword [ebp - 0x14]
lea esi, [edx + eax*8]
mov dword [ebx + esi*4 + 8], ecx
mov ecx, dword [ebx + 0x3d0]
mov esi, dword [ebp - 0x10]
sub ecx, eax
mov eax, dword [ebp - 0x18]
lea ecx, [edx + ecx*8]
mov eax, dword [eax]
mov dword [ebx + ecx*4 + 0x1e8], eax
mov ecx, dword [ebp - 0x18]
add ecx, 4
mov dword [ebp - 0x18], ecx
cmp edi, esi
jl 0x40dee5
cmp edi, dword [ebp - 0x1c]
jge 0x40e0b0
mov dword [ebp - 0x18], 0x4b2080
nop word [eax + eax]
mov edx, dword [ebx + esi*4 + 0x410]
mov eax, edx
sar eax, 0x10
movzx eax, al
movsx ecx, byte [eax + 0x4b51a0]
mov eax, dword [ebp - 0x18]
inc dword [ebp - 0x18]
movsx eax, byte [eax]
xor ecx, eax
mov eax, edx
sar eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x4b51a0]
xor ecx, eax
movzx eax, dl
shl ecx, 8
sar edx, 0x18
movzx eax, byte [eax + 0x4b51a0]
xor ecx, eax
movzx eax, dl
shl ecx, 8
movzx eax, byte [eax + 0x4b51a0]
xor ecx, eax
lea eax, [ebx + 0x414]
xor dword [eax], ecx
cmp esi, 8
je 0x40dfc8
cmp esi, 1
jle 0x40e054
lea ecx, [ebx + 0x418]
lea edx, [esi - 1]
mov eax, dword [ecx - 4]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
sub edx, 1
jne 0x40dfb5
jmp 0x40e04e
lea eax, [ebx + 0x418]
mov edx, 3
mov ecx, dword [eax - 4]
lea eax, [eax + 4]
xor dword [eax - 4], ecx
sub edx, 1
jne 0x40dfd3
mov edx, dword [ebx + 0x420]
mov eax, edx
sar eax, 0x18
movzx eax, al
movsx ecx, byte [eax + 0x4b51a0]
mov eax, edx
sar eax, 0x10
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x4b51a0]
xor ecx, eax
mov eax, edx
sar eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x4b51a0]
xor ecx, eax
movzx eax, dl
shl ecx, 8
mov edx, 3
movzx eax, byte [eax + 0x4b51a0]
xor ecx, eax
xor dword [ebx + 0x424], ecx
lea ecx, [ebx + 0x428]
nop
mov eax, dword [ecx - 4]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
sub edx, 1
jne 0x40e040
lea eax, [ebx + 0x414]
mov dword [ebp - 8], 0
test esi, esi
jle 0x40e0a7
mov ecx, eax
mov dword [ebp - 0x20], eax
cmp edi, dword [ebp - 0x1c]
jge 0x40e0b0
mov eax, edi
mov ecx, dword [ecx]
cdq
inc edi
idiv dword [ebp - 0x14]
lea esi, [edx + eax*8]
mov dword [ebx + esi*4 + 8], ecx
mov ecx, dword [ebx + 0x3d0]
mov esi, dword [ebp - 0x10]
sub ecx, eax
mov eax, dword [ebp - 0x20]
lea ecx, [edx + ecx*8]
mov eax, dword [eax]
mov dword [ebx + ecx*4 + 0x1e8], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x20]
inc eax
add ecx, 4
mov dword [ebp - 8], eax
mov dword [ebp - 0x20], ecx
cmp eax, esi
jl 0x40e064
cmp edi, dword [ebp - 0x1c]
jl 0x40df40
mov ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebx + 0x3d0], ecx
jle 0x40e137
mov eax, dword [ebp - 0x14]
lea edx, [ebx + 0x208]
mov dword [ebp - 0x10], edx
nop dword [eax]
test eax, eax
jle 0x40e125
mov esi, edx
mov edi, eax
mov edx, dword [esi]
lea esi, [esi + 4]
mov eax, edx
sar eax, 0x18
movzx ecx, al
mov eax, edx
sar eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x4b2ca0]
xor ecx, dword [eax*4 + 0x4b28a0]
mov eax, edx
sar eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4b24a0]
movzx eax, dl
xor ecx, dword [eax*4 + 0x4b20a0]
mov dword [esi - 4], ecx
sub edi, 1
jne 0x40e0d8
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
inc ecx
add edx, 0x20
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], edx
cmp ecx, dword [ebx + 0x3d0]
jl 0x40e0d0
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov byte [ebx + 4], 1
xor ecx, ebp
pop ebx
call fcn.0041553e
mov esp, ebp
pop ebp
ret 0x10
lea eax, [ebp - 0x28]
mov dword [ebp - 0x2c], vtable.std::exception.0
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], str.Empty_key
xorps xmm0, xmm0
mov byte [ebp - 8], 1
push eax
movq qword [ebp - 0x28], xmm0
call fcn.0041789e
add esp, 8
lea eax, [ebp - 0x2c]
push 0x4bd3a0
push eax
call fcn.00419d03
int3