Function at 0x40e6d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x148
mov word [esp + 0x40], 0xe103
mov dword [esp + 0x42], 0
mov byte [esp + 0x46], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 6
ja 0x40e744
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x40]
add eax, 0x21f0eea8
xor eax, ecx
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0xb4]
add al, 0xb8
mov ecx, dword [esp]
mov byte [esp + ecx + 0x40], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 7
jb 0x40e710
lea ebx, [esp + 0x40]
push ebx
push dword [ebp + 8]
call fcn.00402f00
add esp, 8
mov esi, eax
xor ecx, ecx
test eax, eax
sete cl
xor eax, eax
jmp dword [ecx*4 + 0x43e1c4]
xor edi, edi
mov dword [esp + 0x128], esi
jmp 0x40e78f
mov edi, dword [esp + 0x12c]
inc edi
mov esi, dword [esp + 0x128]
push esi
call fcn.00403440
add esp, 4
xor ecx, ecx
cmp edi, eax
setb cl
jmp dword [ecx*4 + 0x43e1cc]
mov dword [esp + 0x12c], edi
push edi
push esi
call fcn.00403450
add esp, 8
mov edi, eax
mov dword [esp + 0x40], 0x41d4
mov byte [esp + 0x44], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 4
ja 0x40e814
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x40]
add eax, 0xf0312370
xor eax, ecx
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0xb4]
add al, 0xd0
mov ecx, dword [esp]
mov byte [esp + ecx + 0x40], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 5
jb 0x40e7e0
push 3
push ebx
push edi
call fcn.00403320
add esp, 0xc
xor ecx, ecx
test eax, eax
sete cl
jmp dword [ecx*4 + 0x43e1e4]
mov dword [esp], 0x1f88
mov dword [esp + 0xb4], 0
mov eax, dword [esp + 0xb4]
cmp eax, 3
ja 0x40e890
nop
nop
nop
nop
mov eax, dword [esp + 0xb4]
mov ecx, dword [esp + 0xb4]
movzx ecx, byte [esp + ecx]
add eax, 0xba26b7c5
xor eax, ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x40]
add al, 0x27
mov ecx, dword [esp + 0xb4]
mov byte [esp + ecx], al
inc dword [esp + 0xb4]
mov eax, dword [esp + 0xb4]
cmp eax, 4
jb 0x40e850
mov eax, esp
push eax
push edi
call fcn.00402dd0
add esp, 8
fnstcw word [esp + 0x112]
movzx eax, word [esp + 0x112]
or eax, 0xc00
mov word [esp + 0x122], ax
fldcw word [esp + 0x122]
fistp dword [esp + 0x140]
fldcw word [esp + 0x112]
mov eax, dword [esp + 0x140]
xor ecx, ecx
cmp eax, 2
setl cl
jmp dword [ecx*4 + 0x43e1ec]
xor ecx, ecx
cmp eax, 3
setl cl
jmp dword [ecx*4 + 0x43e1f4]
sete al
movzx eax, al
jmp dword [eax*4 + 0x43e1fc]
xor ecx, ecx
test eax, eax
setle cl
jmp dword [ecx*4 + 0x43e204]
mov word [esp + 0x40], 0xcf7c
lea eax, [esp + 0x44]
mov byte [eax + 2], 0
mov dword [eax - 2], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 6
ja 0x40edaf
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x40]
mov edx, eax
and edx, 0xe36322ad
xor eax, 0xe36322ad
lea eax, [eax + edx*2]
xor eax, ecx
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0xb4]
add al, 0x9f
mov ecx, dword [esp]
mov byte [esp + ecx + 0x40], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 7
jb 0x40ed70
push ebx
push edi
call fcn.00402ca0
add esp, 8
mov dword [esp + 0x20], eax
mov word [esp + 0x40], 0x911a
lea eax, [esp + 0x44]
mov byte [eax], 0
mov word [eax - 2], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 4
ja 0x40ee14
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x40]
add eax, 0x46291f1c
xor eax, ecx
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0xb4]
add al, 0x74
mov ecx, dword [esp]
mov byte [esp + ecx + 0x40], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 5
jb case.default.0x40ee33
push ebx
push edi
call fcn.00402ca0
add esp, 8
mov esi, eax
mov edx, dword [esp + 0x20]
test edx, edx
sete al
test esi, esi
sete cl
or cl, al
movzx eax, cl
jmp dword [eax*4 + 0x43e434]
mov ecx, edx
nop
nop
nop
nop
mov eax, ecx
inc ecx
cmp byte [eax], 0
jne 0x40ee40
mov ecx, edx
not ecx
and ecx, eax
add ecx, ecx
xor eax, edx
sub ecx, eax
mov eax, edx
add eax, ecx
mov dword [esp + 0x14], eax
xor edi, edi
mov dword [esp + 0x2c], ecx
test ecx, ecx
jle 0x40eeab
cmp byte [edx], 0
mov edx, dword [esp + 0x14]
je 0x40eeab
xor edi, edi
mov ebx, dword [esp + 0x20]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + 0x40], 0
lea eax, [esp + 0x40]
push eax
push edx
push ebx
call fcn.0040d1b0
mov edx, dword [esp + 0x20]
add esp, 0xc
lea ecx, [ebx + eax]
inc edi
cmp ecx, edx
jae 0x40eeab
cmp byte [ebx + eax], 0
mov ebx, ecx
jne 0x40ee80
mov eax, edi
inc eax
lea eax, [edi + edi + 2]
jns 0x40eeb9
mov eax, 0xffffffff
push eax
call fcn.004097d0
add esp, 4
mov dword [esp + 0x40], 0
lea ecx, [eax + edi*2]
mov edi, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], ecx
cmp eax, ecx
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
jae 0x40fa68
mov edi, dword [esp + 0x24]
cmp dword [esp + 0x2c], 0
jle 0x40fa68
mov edi, dword [esp + 0x24]
mov dword [esp + 0x1c], esi
nop
nop
cmp byte [ebx], 0
je 0x40fa68
lea edx, [esp + 0x40]
push edx
push ecx
push ebx
mov esi, ecx
call fcn.0040d1b0
add esp, 0xc
movzx ecx, word [esp + 0x40]
mov word [edi], cx
add edi, 2
cmp edi, dword [esp + 0x18]
jae 0x40fa64
add ebx, eax
cmp ebx, esi
mov ecx, esi
mov esi, dword [esp + 0x1c]
jb 0x40ef00
jmp 0x40fa68
mov esi, dword [esp + 0x1c]
mov word [edi], 0
xor eax, eax
nop
cmp byte [esi + eax], 0
lea eax, [eax + 1]
jne 0x40fa70
add eax, esi
dec eax
mov ebx, esi
not ebx
and ebx, eax
add ebx, ebx
xor eax, esi
sub ebx, eax
mov eax, ebx
inc eax
lea eax, [ebx + ebx + 2]
jns 0x40fa96
mov eax, 0xffffffff
push eax
call fcn.004097d0
add esp, 4
mov dword [esp + 0x28], eax
lea ecx, [eax + ebx*2]
add ecx, 2
test esi, esi
jne 0x40facb
mov eax, 0xffffffff
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
lea ebx, [eax + 1]
cmp byte [eax + 1], 0
mov eax, ebx
jne 0x40fac0
mov dword [esp + 0x40], 0
add ecx, 0xfffffffe
mov eax, dword [esp + 0x28]
mov edi, eax
mov dword [esp + 0x14], ecx
cmp eax, ecx
jae 0x40fb2b
mov edi, dword [esp + 0x28]
test ebx, ebx
jle 0x40fb2b
mov eax, esi
add eax, ebx
mov ebx, eax
mov edi, dword [esp + 0x28]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp byte [esi], 0
je 0x40fb2b
lea eax, [esp + 0x40]
push eax
push ebx
push esi
call fcn.0040d1b0
add esp, 0xc
movzx ecx, word [esp + 0x40]
mov word [edi], cx
add edi, 2
cmp edi, dword [esp + 0x14]
jae 0x40fb2b
add esi, eax
cmp esi, ebx
jb 0x40fb00
mov word [edi], 0
mov word [esp + 0x40], 0x3f33
mov byte [esp + 0x42], 0x86
lea eax, [esp + 0x44]
mov byte [eax + 1], 0
mov word [eax - 1], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 5
ja 0x40fb9f
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x40]
lea edx, [eax + ecx]
add eax, 0x21
and eax, ecx
add eax, eax
sub edx, eax
add edx, 0xbd16e21
mov dword [esp + 0xb4], edx
mov eax, dword [esp + 0xb4]
add al, 0x5b
mov ecx, dword [esp]
mov byte [esp + ecx + 0x40], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 6
jb 0x40fb60
lea ebx, [esp + 0x40]
push ebx
push dword [ebp + 8]
call fcn.00402f00
add esp, 8
xor ecx, ecx
mov dword [esp + 0x2c], eax
test eax, eax
setne cl
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
jmp dword [ecx*4 + 0x43e43c]
mov ecx, ebx
push 3
call fcn.00409ea0
push dword [esp + 0x20]
mov esi, dword [esp + 0x20]
push esi
push dword [esp + 0x30]
push dword [esp + 0x30]
push ebx
call fcn.00415fd0
add esp, 0x14
mov ecx, ebx
call fcn.0040a770
xor eax, eax
test esi, esi
sete al
jmp dword [eax*4 + 0x43e45c]
push dword [esp + 0x2c]
call fcn.00403440
add esp, 4
mov ecx, eax
mov dword [esp + 0x20], eax
mov ecx, 0xc
mul ecx
seto dl
mov ecx, 0xffffffff
mov esi, 0xffffffff
add eax, 4
jb 0x40fc94
mov esi, eax
test dl, dl
jne 0x40fc9a
mov ecx, esi
push ecx
call fcn.004097d0
add esp, 4
mov ecx, dword [esp + 0x20]
mov dword [eax], ecx
add eax, 4
mov dword [esp + 0x1c], eax
xor eax, eax
test ecx, ecx
sete al
jmp dword [eax*4 + 0x43e444]
mov eax, dword [esp + 0x20]
lea eax, [eax + eax*2]
mov ecx, dword [esp + 0x1c]
lea eax, [ecx + eax*4]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
add ecx, 0xc
xor edx, edx
cmp ecx, eax
sete dl
jmp dword [edx*4 + 0x43e44c]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
add ecx, 0xc
xor edx, edx
cmp ecx, eax
sete dl
jmp dword [edx*4 + 0x43e44c]
xor edi, edi
xor eax, eax
cmp edi, dword [esp + 0x20]
setb al
jmp dword [eax*4 + 0x43e454]
mov al, 1
jmp dword [0x43e1dc]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret