Function at 0x40e800
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [edi]
mov eax, dword [eax]
cmp eax, 4
jne 0x40e5b1
push dword [ebp + 0xc]
mov ecx, esi
push edx
call fcn.0040e060
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
sub eax, 4
cmp eax, 0x28
ja case.0x40e5bd.5
jmp dword [eax*4 + 0x40e750]
push dword [ebp + 0xc]
push ecx
mov ecx, esi
call fcn.0040d6f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
mov ecx, esi
push edx
call fcn.0040d910
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 4]
mov ecx, esi
push eax
push edx
call fcn.0040ce1a
mov byte [esi + 0x144], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 1
lea eax, [ebp - 4]
mov ecx, esi
push eax
push edx
call fcn.0040d260
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [esi + 0x165], cl
jne 0x443d72
cmp byte [esi + 0x164], 0
jne 0x443d97
mov edi, dword [esi + 0x160]
mov ebx, dword [edi + 0x30]
test edi, edi
je 0x40e65e
lea ecx, [edi + 0x20]
call fcn.00409a20
lea ecx, [edi + 0x10]
call fcn.00409a20
push edi
call fcn.0042106c
add esp, 4
mov dword [esi + 0x160], ebx
mov byte [esi + 0x165], 0
dec dword [esi + 0x15c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
mov ecx, esi
push edx
call fcn.0040de2e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [esi + 0x165], 0
lea ecx, [esi + 0x15c]
jne 0x443d67
mov edx, dword [ecx + 4]
mov edx, dword [edx + 8]
mov eax, dword [ebp + 0xc]
inc edx
mov dword [eax], edx
call fcn.0041fdcf
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
mov ecx, esi
push edx
call fcn.0040dd2e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
mov ecx, esi
call fcn.0040df0c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
push ecx
mov ecx, esi
call fcn.0040dd90
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 4]
mov ecx, esi
push eax
push edx
call fcn.0040cdd4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
push edx
call fcn.0040d260
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
mov ecx, esi
push edx
call fcn.0040df6b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0
lea eax, [ebp - 4]
mov ecx, esi
push eax
push edx
call fcn.0040d260
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push ebp
mov ebp, esp
sub esp, 0x188
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], ecx
mov esi, dword [ebx + 4]
xor edx, edx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 1
mov ecx, dword [edx + esi]
movzx eax, word [ecx + 8]
cmp ax, 0x4e
je 0x40ea09
cmp ax, 0x4f
je 0x40ea00
cmp ax, 0x47
je 0x40ea09
cmp ax, 0x48
je 0x40ea00
movzx ecx, word [ecx + 8]
cmp cx, 0x41
je 0x40e89b
cmp cx, 0x52
je 0x40e89b
cmp cx, 0x53
je 0x40e89b
cmp cx, 0x54
je 0x40e89b
cmp cx, 0x55
je 0x40e89b
cmp cx, 0x56
je 0x40e89b
cmp ax, 0x7f
je 0x443ed3
add edx, 4
jmp 0x40e835
test edi, edi
jne 0x40e88c
mov eax, dword [esi]
mov ecx, 1
mov dword [ebp - 0xc], ecx
mov byte [ebp - 0x15], 0
mov dword [ebp - 0x78], 0
mov edi, dword [eax]
xor eax, eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], eax
cmp dword [0x4c7280], eax
je 0x40ebe4
cmp byte [0x4c7289], al
jne 0x443f0f
mov esi, dword [0x4c7284]
cmp dword [esi], 0
je 0x40ebe4
mov eax, dword [0x4c7440]
mov byte [ebp - 5], 0
test al, 1
je 0x443f1c
mov dword [0x4c7460], 0
mov dword [0x4c745c], 0
mov dword [ebp - 0x48], 0x4c7444
mov dword [ebp - 0x68], 0x4c7444
jmp 0x40e920
mov ebx, dword [esi]
mov edx, dword [edi + 4]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], edx
mov ecx, dword [ebx + 4]
test edx, edx
je 0x443f40
test ecx, ecx
je 0x443f48
cmp edx, ecx
jb 0x40f130
mov ecx, dword [ebx]
mov edi, edx
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
test edi, edi
je 0x40e964
mov ax, word [edx]
cmp ax, word [ecx]
jne 0x40e968
add edx, 2
add ecx, 2
dec edi
jne 0x40e953
xor eax, eax
jmp 0x40e974
movzx eax, word [edx]
cmp ax, word [ecx]
sbb eax, eax
and eax, 0xfffffffe
inc eax
test eax, eax
js 0x40ea0f
jle 0x40ea66
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x40effe
mov ebx, dword [ecx + 4]
cmp ebx, edx
ja 0x40f06d
mov edx, dword [edi]
mov edi, dword [ecx]
mov dword [ebp - 0x70], ebx
test ebx, ebx
je 0x40e9c3
lea esp, [esp]
mov ax, word [edi]
cmp ax, word [edx]
jne 0x40e9ca
add edi, 2
add edx, 2
dec dword [ebp - 0x70]
jne 0x40e9b0
cmp ebx, dword [ebp - 0x20]
jb 0x40e9cc
jmp 0x40e9e6
jae 0x40e9e6
mov edx, dword [ebp - 0x1c]
mov eax, dword [ecx + 0x18]
mov dword [edx + 0x1c], eax
mov eax, dword [esi]
mov dword [ecx + 0x18], eax
mov dword [esi], ecx
cmp dword [ecx + 0x1c], 0
je 0x40effe
mov ecx, dword [ebp - 0x68]
mov eax, dword [esi]
mov dword [ecx + 0x1c], eax
mov edi, dword [esi]
mov dword [ebp - 0x68], edi
mov eax, dword [edi + 0x1c]
mov edi, dword [ebp - 0x14]
mov dword [esi], eax
jmp 0x40e920
dec edi
add edx, 4
jmp 0x40e835
inc edi
jmp 0x40e896
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x40effe
mov eax, dword [ecx + 4]
cmp edx, eax
ja 0x40f074
cmp dword [ebp - 0x20], 0
mov ebx, edx
mov edx, dword [ecx]
mov edi, dword [edi]
add byte [ebx - 0x74ee7426], cl
aas
jbe 0x40ea58
jmp 0x40ea40
mov ax, word [edi]
cmp ax, word [edx]
jne 0x40ecd7
add edi, 2
add edx, 2
dec ebx
jne 0x40ea40
mov eax, dword [ecx + 4]
cmp dword [ebp - 0x20], eax
jb 0x40ecd9
jmp 0x40ecf3
mov dl, 1
mov eax, dword [esi]
mov ecx, dword [ebp - 0x68]
mov eax, dword [eax + 0x18]
mov dword [ecx + 0x1c], eax
mov eax, dword [esi]
mov ecx, dword [ebp - 0x48]
mov eax, dword [eax + 0x1c]
mov dword [ecx + 0x18], eax
mov ecx, dword [esi]
mov eax, dword [0x4c7460]
mov dword [ecx + 0x18], eax
mov ecx, dword [esi]
mov eax, dword [0x4c745c]
mov dword [ecx + 0x1c], eax
test dl, dl
je 0x40ebe1
mov esi, dword [esi]
test esi, esi
je 0x40ebe1
mov eax, dword [esi + 0x10]
mov esi, dword [esi + 0x14]
and eax, 0xff00
add byte [eax], al
mov dword [ebp - 0x54], eax
test esi, esi
je 0x40ebe1
mov edi, dword [ebp - 0x14]
mov ebx, dword [0x4c7270]
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x40f2ad
mov eax, dword [0x4c7440]
mov byte [ebp - 5], 0
test al, 1
je 0x443f55
mov dword [0x4c7460], 0
mov dword [0x4c745c], 0
mov dword [ebp - 0x68], 0x4c7444
mov dword [ebp - 0x48], 0x4c7444
mov edi, dword [edi + 4]
mov ecx, dword [ebx + 4]
test edi, edi
je 0x443f82
test ecx, ecx
je 0x443f8a
mov eax, dword [ebp - 0x14]
cmp edi, ecx
jb 0x40ed0d
jae 0x40ecf3
mov edx, dword [ebp - 0x1c]
mov eax, dword [ecx + 0x1c]
mov dword [edx + 0x18], eax
mov eax, dword [esi]
mov dword [ecx + 0x1c], eax
mov dword [esi], ecx
cmp dword [ecx + 0x18], 0
je 0x40effe
mov ecx, dword [ebp - 0x48]
mov eax, dword [esi]
mov edi, dword [ebp - 0x14]
mov dword [ecx + 0x18], eax
mov eax, dword [esi]
mov dword [ebp - 0x48], eax
mov eax, dword [eax + 0x18]
mov dword [esi], eax
jmp 0x40e920
mov edx, dword [ebx]
mov esi, dword [eax]
test ecx, ecx
je 0x40ec68
lea esp, [esp]
mov ax, word [esi]
cmp ax, word [edx]
je 0x40f1d2
cld
invalid