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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x4bf070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x24], ebx
cmp byte [ebx + 4], 0
je 0x40e855
mov edx, dword [ebx + 0x3cc]
cmp edx, 0x10
jne 0x40e5de
push eax
push ecx
mov ecx, ebx
call fcn.0040e190
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041553e
mov esp, ebp
pop ebp
ret 8
mov eax, edx
cdq
and edx, 3
push edi
lea edi, [edx + eax]
xor eax, eax
sar edi, 2
mov dword [ebp - 0x28], edi
cmp edi, 4
je 0x40e5fc
cmp edi, 6
setne al
inc eax
shl eax, 5
push esi
mov esi, dword [eax + 0x4b201c]
mov edx, dword [eax + 0x4b2014]
mov eax, dword [eax + 0x4b2024]
mov dword [ebp - 0x20], eax
lea eax, [ebx + 0x454]
mov dword [ebp - 0x14], esi
mov esi, eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x2c], eax
test edi, edi
jle 0x40e66b
add ebx, 0x1e8
movzx eax, byte [ecx]
lea ecx, [ecx + 4]
shl eax, 0x18
lea ebx, [ebx + 4]
mov dword [esi], eax
mov edx, esi
movzx eax, byte [ecx - 3]
shl eax, 0x10
or dword [esi], eax
movzx eax, byte [ecx - 2]
shl eax, 8
or dword [esi], eax
movzx eax, byte [ecx - 1]
or dword [esi], eax
add esi, 4
mov eax, dword [ebx - 4]
xor dword [edx], eax
sub edi, 1
jne 0x40e630
mov edi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x28], 1
cmp dword [esi + 0x3d0], 1
jle 0x40e769
lea ecx, [esi + 0x208]
lea eax, [esi + 0x434]
mov dword [ebp - 0x18], ecx
test edi, edi
jle 0x40e72c
mov dword [ebp - 0x34], eax
mov ebx, edx
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x30], ecx
sub eax, edx
mov ecx, dword [ebp - 0x20]
sub ecx, edx
mov dword [ebp - 8], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x24], edi
add eax, ebx
cdq
idiv edi
mov eax, dword [esi + edx*4 + 0x454]
sar eax, 8
movzx ecx, al
mov eax, dword [ebp - 0x38]
add eax, ebx
cdq
idiv edi
mov ecx, dword [ecx*4 + 0x4b34a0]
movzx eax, byte [esi + edx*4 + 0x454]
xor ecx, dword [eax*4 + 0x4b30a0]
mov eax, ebx
cdq
inc ebx
idiv edi
movsx eax, word [esi + edx*4 + 0x456]
mov edx, dword [ebp - 0x34]
movzx eax, al
xor ecx, dword [eax*4 + 0x4b38a0]
movzx eax, byte [edx + 0x23]
xor ecx, dword [eax*4 + 0x4b3ca0]
mov eax, dword [ebp - 0x30]
xor ecx, dword [eax]
add eax, 4
mov dword [edx], ecx
add edx, 4
sub dword [ebp - 0x24], 1
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], edx
jne 0x40e6b4
lea eax, [esi + 0x434]
lea ecx, [edi*4]
push ecx
push eax
lea eax, [esi + 0x454]
push eax
call fcn.00417b30
mov eax, dword [ebp - 0x28]
add esp, 0xc
mov ecx, dword [ebp - 0x18]
inc eax
mov edx, dword [ebp - 0x1c]
add ecx, 0x20
cmp eax, dword [esi + 0x3d0]
mov dword [ebp - 0x28], eax
lea eax, [esi + 0x434]
mov dword [ebp - 0x18], ecx
jl 0x40e691
xor ecx, ecx
mov dword [ebp - 0x18], ecx
test edi, edi
jle 0x40e842
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
sub edx, eax
sub dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [esi + 0x3d0]
lea eax, [ecx + eax*8]
mov ebx, dword [esi + eax*4 + 0x1e8]
mov ecx, ebx
mov eax, dword [ebp - 0x2c]
sar ecx, 0x18
add dword [ebp - 0x2c], 4
movzx eax, byte [eax + 3]
xor cl, byte [eax + 0x4b50a0]
mov eax, dword [ebp - 0x10]
mov byte [eax], cl
inc eax
mov dword [ebp - 0x10], eax
mov ecx, ebx
mov eax, dword [ebp - 0x14]
add eax, edx
sar ecx, 0x10
cdq
idiv edi
movsx eax, word [esi + edx*4 + 0x456]
movzx eax, al
xor cl, byte [eax + 0x4b50a0]
mov eax, dword [ebp - 0x10]
mov byte [eax], cl
inc eax
mov dword [ebp - 0x10], eax
mov ecx, ebx
mov eax, dword [ebp - 0x14]
cdq
idiv edi
sar ecx, 8
mov eax, dword [esi + edx*4 + 0x454]
sar eax, 8
movzx eax, al
xor cl, byte [eax + 0x4b50a0]
mov eax, dword [ebp - 0x10]
mov byte [eax], cl
mov ecx, eax
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x20]
cdq
idiv edi
inc dword [ebp - 0x14]
movzx eax, byte [esi + edx*4 + 0x454]
mov edx, dword [ebp - 0x1c]
mov al, byte [eax + 0x4b50a0]
xor al, bl
mov byte [ecx + 1], al
add ecx, 2
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x18]
inc ecx
mov dword [ebp - 0x18], ecx
cmp ecx, edi
jl 0x40e790
mov ecx, dword [ebp - 4]
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.0041553e
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x40]
mov dword [ebp - 0x44], vtable.std::exception.0
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], str.Object_not_Initialized
xorps xmm0, xmm0
mov byte [ebp - 8], 1
push eax
movq qword [ebp - 0x40], xmm0
call fcn.0041789e
add esp, 8
lea eax, [ebp - 0x44]
push 0x4bd3a0
push eax
call fcn.00419d03
int3