Function at 0x40e61f
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
mov edi, ecx
mov dword [ebp - 0x1c], edi
cmp dword [edi + 0x3bd10], 0
je 0x40e641
push dword [edi + 0x18]
call dword [edi]
and dword [edi + 0x3bd10], 0
pop ecx
cmp dword [edi + 0x3bcfc], 0
je 0x40e655
mov eax, dword [edi + 0x3bd04]
jmp 0x40eb91
mov ecx, edi
call fcn.0040e162
test eax, eax
jne 0x40eb91
push ebx
mov ebx, dword [edi + 0x3bcf0]
mov eax, ebx
or eax, dword [edi + 0x3bcf4]
push esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
jne 0x40e6f5
push dword [edi + 0x18]
call dword [edi + 8]
pop ecx
mov ecx, edi
test eax, eax
je 0x40eb88
lea edx, [ebp - 0x18]
call fcn.0040caf8
mov eax, dword [edi + 0x3194c]
lea esi, [edi + 0x3bcb0]
shl eax, 5
lea edx, [edi + 0x325b0]
push 0
add edx, eax
mov ecx, esi
call fcn.0040c67c
mov eax, dword [edi + 0x3194c]
mov eax, dword [eax*4 + 0x406b30]
mov dword [edi + 0x3194c], eax
mov eax, dword [edi + 0x31938]
neg eax
push eax
push dword [edi + 0x18]
call dword [edi + 4]
mov edx, dword [edi + 0x325ac]
mov ecx, esi
movzx eax, al
push eax
call fcn.0040c6d5
add esp, 0x10
dec dword [edi + 0x31938]
inc ebx
mov dword [ebp - 0x10], ebx
push dword [edi + 0x18]
call dword [edi + 8]
pop ecx
test eax, eax
je 0x40eb74
cmp dword [edi + 0x3bca8], 0
mov ecx, edi
je 0x40e719
lea edx, [ebp - 4]
call fcn.0040ddb6
jmp 0x40e725
lea eax, [ebp - 4]
mov edx, ebx
push eax
call fcn.0040cd32
pop ecx
mov ecx, ebx
mov dword [ebp - 8], eax
and ecx, dword [edi + 0x325a8]
mov dword [ebp - 0xc], ecx
cmp eax, 1
jne 0x40e829
cmp dword [ebp - 4], 0xffffffff
jne 0x40e829
mov eax, dword [edi + 0x3194c]
lea esi, [edi + 0x3bcb0]
add ecx, 0x192d8
shl eax, 4
add eax, ecx
mov dword [ebp - 0xc], esi
push 0
mov ecx, esi
lea edx, [edi + eax*2]
call fcn.0040c67c
push dword [edi + 0x18]
call dword [edi + 0xc]
sub eax, dword [edi + 0x31938]
mov edx, dword [edi + 0x325a4]
pop ecx
pop ecx
movzx esi, byte [eax - 1]
and edx, ebx
push 8
pop ecx
sub cl, byte [edi + 0x32598]
shr esi, cl
mov ecx, dword [edi + 0x32598]
shl edx, cl
add esi, edx
imul edx, esi, 0x600
movzx esi, byte [eax]
add edx, dword [edi + 0x325ac]
cmp dword [edi + 0x3194c], 7
mov dword [ebp - 0x18], edx
jae 0x40e7c5
push esi
lea ecx, [edi + 0x3bcb0]
call fcn.0040c6d5
pop ecx
jmp 0x40e817
sub eax, dword [edi + 0x3193c]
movzx edi, byte [eax - 1]
mov eax, 0x100
mov ebx, eax
or esi, eax
mov eax, esi
add edi, edi
shr eax, 7
mov ecx, ebx
and eax, 1
and ecx, edi
push eax
mov eax, esi
add ecx, ebx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xc]
lea edx, [edx + eax*2]
call fcn.0040c67c
mov edx, dword [ebp - 0x18]
add esi, esi
mov eax, esi
xor eax, edi
not eax
and ebx, eax
pop ecx
cmp esi, 0x10000
jb 0x40e7d8
mov edi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x10]
mov eax, dword [edi + 0x3194c]
mov eax, dword [eax*4 + 0x406b30]
jmp 0x40e9a0
mov eax, dword [edi + 0x3194c]
lea esi, [edi + 0x3bcb0]
add ecx, 0x192d8
shl eax, 4
add eax, ecx
mov ecx, esi
push 1
lea edx, [edi + eax*2]
call fcn.0040c67c
mov edx, dword [edi + 0x3194c]
add edx, 0x19398
cmp dword [ebp - 4], 4
pop ecx
mov ecx, esi
lea edx, [edi + edx*2]
jae 0x40e9ab
push 1
call fcn.0040c67c
mov eax, dword [ebp - 4]
pop ecx
mov ecx, esi
test eax, eax
jne 0x40e8b9
push eax
mov eax, dword [edi + 0x3194c]
add eax, 0x193a4
lea edx, [edi + eax*2]
call fcn.0040c67c
xor eax, eax
mov ecx, esi
cmp dword [ebp - 8], 1
setne al
push eax
mov eax, dword [edi + 0x3194c]
shl eax, 4
add eax, 0x193c8
add eax, dword [ebp - 0xc]
lea edx, [edi + eax*2]
call fcn.0040c67c
pop ecx
pop ecx
jmp 0x40e952
mov eax, dword [edi + eax*4 + 0x3193c]
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0x3194c]
add eax, 0x193a4
push 1
lea edx, [edi + eax*2]
call fcn.0040c67c
mov edx, dword [edi + 0x3194c]
add edx, 0x193b0
cmp dword [ebp - 4], 1
pop ecx
mov ecx, esi
lea edx, [edi + edx*2]
jne 0x40e8fa
push 0
call fcn.0040c67c
pop ecx
jmp 0x40e93d
push 1
call fcn.0040c67c
mov eax, dword [ebp - 4]
mov ecx, esi
add eax, 0xfffffffe
push eax
mov eax, dword [edi + 0x3194c]
add eax, 0x193bc
lea edx, [edi + eax*2]
call fcn.0040c67c
cmp dword [ebp - 4], 3
pop ecx
pop ecx
jne 0x40e931
mov eax, dword [edi + 0x31944]
mov dword [edi + 0x31948], eax
mov eax, dword [edi + 0x31940]
mov dword [edi + 0x31944], eax
mov eax, dword [edi + 0x3193c]
mov dword [edi + 0x31940], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x3193c], eax
mov ecx, dword [ebp - 8]
cmp ecx, 1
jne 0x40e969
mov eax, dword [edi + 0x3194c]
mov eax, dword [eax*4 + 0x406b90]
jmp 0x40e9a0
lea eax, [edi + 0x30ea0]
mov edx, esi
push eax
xor eax, eax
cmp dword [edi + 0x3bca8], eax
sete al
push eax
push dword [ebp - 0xc]
lea eax, [ecx - 2]
push eax
lea ecx, [edi + 0x3745c]
call fcn.0040caaf
mov eax, dword [edi + 0x3194c]
add esp, 0x10
mov eax, dword [eax*4 + 0x406bc0]
mov dword [edi + 0x3194c], eax
jmp 0x40eafc
push 0
call fcn.0040c67c
mov eax, dword [edi + 0x3194c]
mov edx, esi
mov ecx, dword [ebp - 8]
add ecx, 0xfffffffe
mov dword [ebp - 0x18], ecx
mov eax, dword [eax*4 + 0x406b60]
mov dword [edi + 0x3194c], eax
lea eax, [edi + 0x30ea0]
push eax
xor eax, eax
cmp dword [edi + 0x3bca8], eax
sete al
push eax
push dword [ebp - 0xc]
push ecx
lea ecx, [edi + 0x32c14]
call fcn.0040caaf
mov eax, dword [ebp - 4]
add esp, 0x14
add eax, 0xfffffffc
mov dword [ebp - 4], eax
cmp eax, 0x80
jae 0x40ea0f
movzx eax, byte [eax + edi + 0x306a0]
jmp 0x40ea2e
mov ecx, 0x1ffff
sub ecx, eax
shr ecx, 0x1f
neg ecx
and ecx, 0xa
add ecx, 6
shr eax, cl
movzx eax, byte [eax + edi + 0x306a0]
lea eax, [eax + ecx*2]
cmp dword [ebp - 8], 5
mov dword [ebp - 0x10], eax
jae 0x40ea3c
mov ecx, dword [ebp - 0x18]
jmp 0x40ea3f
push 3
pop ecx
shl ecx, 7
push eax
push 6
lea edx, [ecx + 0x32910]
mov ecx, esi
add edx, edi
call fcn.0040c7b7
mov edx, dword [ebp - 0x10]
pop ecx
pop ecx
cmp edx, 4
jb 0x40eac9
mov esi, dword [ebp - 4]
mov ecx, edx
mov eax, edx
shr ecx, 1
and eax, 1
dec ecx
or eax, 2
shl eax, cl
sub esi, eax
mov dword [ebp - 0xc], esi
lea esi, [edi + 0x3bcb0]
cmp edx, 0xe
jae 0x40ea99
push dword [ebp - 0xc]
sub eax, edx
add eax, 0x19587
push ecx
mov ecx, esi
lea edx, [edi + eax*2]
call fcn.0040c7f9
pop ecx
pop ecx
jmp 0x40eac9
mov edx, dword [ebp - 0xc]
lea eax, [ecx - 4]
push eax
shr edx, 4
mov ecx, esi
call fcn.0040c634
mov eax, dword [ebp - 0xc]
lea edx, [edi + 0x32bf4]
and eax, 0xf
mov ecx, esi
push eax
push 4
call fcn.0040c7f9
add esp, 0xc
inc dword [edi + 0x32590]
mov eax, dword [edi + 0x31944]
mov dword [edi + 0x31948], eax
mov eax, dword [edi + 0x31940]
mov dword [edi + 0x31944], eax
mov eax, dword [edi + 0x3193c]
mov dword [edi + 0x31940], eax
mov eax, dword [ebp - 4]
mov dword [edi + 0x3193c], eax
inc dword [edi + 0x3bcf8]
mov eax, dword [ebp - 8]
add ebx, eax
sub dword [edi + 0x31938], eax
cmp dword [edi + 0x31938], 0
mov dword [ebp - 0x10], ebx
jne 0x40e704
cmp dword [edi + 0x3bca8], 0
jne 0x40eb43
cmp dword [edi + 0x3bcf8], 0x80
jb 0x40eb33
mov ecx, edi
call fcn.0040e243
cmp dword [edi + 0x32590], 0x10
jb 0x40eb43
mov ecx, edi
call fcn.0040e1ed
push dword [edi + 0x18]
call dword [edi + 8]
pop ecx
test eax, eax
je 0x40eb74
mov eax, ebx
sub eax, dword [ebp - 0x14]
cmp eax, 0x8000
jb 0x40e704
add dword [edi + 0x3bcf0], eax
mov ecx, edi
adc dword [edi + 0x3bcf4], 0
call fcn.0040e162
jmp 0x40eb8f
mov eax, ebx
mov ecx, edi
sub eax, dword [ebp - 0x14]
add dword [edi + 0x3bcf0], eax
adc dword [edi + 0x3bcf4], 0
mov edx, ebx
call fcn.0040e1a0
pop esi
pop ebx
pop edi
leave
ret