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 dword [ebp - 0x48], esi
test esi, esi
je 0x40f2b7
test eax, 0x100
jne 0x443f97
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 4]
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + edx*4]
cmp word [eax + 8], 0x4e
je 0x40ed40
mov eax, dword [edi + 4]
mov eax, dword [eax + edx*4]
movzx edi, word [eax + 8]
cmp di, 0x35
je 0x4441f3
mov eax, dword [esi + 0xc]
cmp eax, 8
je 0x44420a
cmp eax, 0xc
je 0x44420a
cmp eax, 0xf
je 0x44420a
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 4]
mov eax, dword [eax + edx*4]
movzx ecx, word [eax + 8]
movsx edi, word [eax + 8]
cmp cx, 0x41
jne 0x40f17d
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x64]
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0xc]
inc edx
push eax
push ebx
mov dword [ebp - 0xc], edx
call fcn.0040a000
test eax, eax
js case.default.0x40f198
cmp byte [ebp - 0x15], 0
jne 0x40eeb7
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov eax, dword [ebp - 0xc]
mov eax, dword [ecx + eax*4]
cmp word [eax + 8], 0x7f
jne 0x444540
test esi, esi
je 0x40f2bf
cmp edi, 0x41
jne 0x40f18c
lea eax, [ebp - 0x64]
cmp esi, eax
je case.default.0x40f198
cmp dword [esi + 0xc], 4
je 0x40f1af
mov edi, dword [esi + 8]
test edi, edi
jne 0x40f1e4
mov eax, dword [esi + 0xc]
cmp eax, 5
jge 0x40f285
lea eax, [ebp - 0x64]
mov dword [esi + 0xc], 1
push eax
mov ecx, esi
mov dword [esi], 0
call fcn.00409ac0
mov esi, dword [ebp - 0x5c]
test esi, esi
jne 0x40f157
mov eax, dword [ebp - 0x58]
cmp eax, 5
jge 0x40f258
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
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
mov ecx, dword [ebx]
mov esi, edi
mov edx, dword [eax]
test esi, esi
je 0x40ec68
mov ax, word [edx]
cmp ax, word [ecx]
jne 0x40ed2c
add edx, 2
add ecx, 2
dec esi
jne 0x40ec53
xor eax, eax
test eax, eax
js 0x40f006
jg 0x40f0a3
mov byte [ebp - 5], 1
cmp byte [ebp - 5], 0
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebx + 0x18]
mov dword [ecx + 0x1c], eax
mov eax, dword [0x4c7270]
mov ecx, dword [ebp - 0x68]
mov eax, dword [eax + 0x1c]
mov dword [ecx + 0x18], eax
mov ecx, dword [0x4c7270]
mov eax, dword [0x4c7460]
mov dword [ecx + 0x18], eax
mov ecx, dword [0x4c7270]
mov eax, dword [0x4c745c]
mov dword [ecx + 0x1c], eax
je 0x40f2ad
mov esi, dword [0x4c7270]
test esi, esi
je 0x40f2ad
mov eax, dword [esi + 0x10]
mov esi, dword [esi + 0x14]
and eax, 0xff00
jmp 0x40eaba
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
sbb eax, eax
and eax, 0xfffffffe
inc eax
jmp 0x40ec6a
mov eax, dword [esi + 0xc]
cmp eax, 5
jne 0x4441c0
mov eax, edx
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0
xor ebx, ebx
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x50], eax
mov eax, dword [ecx + edx*4 - 4]
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x48], ebx
movsx eax, word [eax + 0xa]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + edx*4]
cmp word [eax + 8], 0x4e
jne 0x40ee12
mov eax, dword [ecx + edx*4 + 4]
inc edx
mov ecx, dword [ebp - 0x10]
push 0xffffffffffffffff
mov dword [ebp - 0xc], edx
movsx eax, word [eax + 0xa]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.0040a000
test eax, eax
js 0x40f310
mov edi, dword [ebp - 0x28]
cmp edi, 1
jne 0x443fb6
mov ebx, dword [ebp - 0x34]
mov eax, ebx
test eax, eax
js 0x40f2fc
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + 4]
mov eax, dword [eax + edx*4]
cmp word [eax + 8], 0x4f
jne 0x444239
inc edx
mov dword [ebp - 0xc], edx
cmp edi, 1
jne 0x444054
mov eax, dword [ebp - 0x48]
mov edi, dword [ebp + 8]
mov dword [ebp + eax*4 - 0x184], ebx
mov ebx, eax
mov ecx, dword [edi + 4]
inc ebx
mov dword [ebp - 0x48], ebx
mov eax, dword [ecx + edx*4]
cmp word [eax + 8], 0x4e
je 0x40ed87
cmp dword [esi + 0xc], 5
jne 0x40f2f5
mov edx, dword [esi]
mov eax, dword [edx]
xor ecx, ecx
mov dword [eax + 0x210], 0
test ebx, ebx
jle 0x40ee58
mov esi, dword [edx]
mov edi, dword [esi + 0x210]
cmp edi, 0x40
jge 0x40ee53
mov eax, dword [ebp + ecx*4 - 0x184]
mov dword [esi + edi*4 + 0x110], eax
mov eax, dword [edx]
inc dword [eax + 0x210]
inc ecx
cmp ecx, ebx
jl 0x40ee30
push 0
push 1
push edx
call fcn.00408ea0
mov esi, eax
add esp, 0xc
mov dword [ebp - 0x48], esi
test esi, esi
je 0x40f306
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
jne 0x4440ff
mov eax, dword [ebp - 0x28]
cmp eax, 5
jge 0x444111
mov edi, dword [ebp + 8]
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x15], 1
mov ecx, dword [edi + 4]
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + edx*4]
cmp word [eax + 8], 0x4e
jne 0x40eae7
cld
invalid
invalid