Function at 0x40dfd0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
push ebx
mov ebx, dword [ebp + 8]
xor edx, edx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x24], 0
mov esi, dword [ebx + 4]
mov ecx, esi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 1
jmp 0x40e010
mov eax, dword [ecx]
movzx eax, word [eax + 8]
cmp ax, 0x41
je 0x40e071
cmp ax, 0x4e
je 0x40e203
cmp ax, 0x4f
je 0x40e1fa
cmp ax, 0x52
je 0x40e071
cmp ax, 0x47
je 0x40e203
cmp ax, 0x48
je 0x40e1fa
cmp ax, 0x53
je 0x40e071
cmp ax, 0x54
je 0x40e071
cmp ax, 0x55
je 0x40e071
cmp ax, 0x56
je 0x40e071
cmp ax, 0x7f
je 0x452f7a
add ecx, 4
jmp 0x40e010
test edx, edx
jne 0x40e062
mov eax, dword [esi]
mov edx, 1
mov dword [ebp - 0x24], edx
mov byte [ebp - 0x25], 0
mov dword [ebp - 0x78], 0
mov edi, dword [eax]
xor eax, eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x80], eax
cmp dword [0x4d2380], eax
je 0x40e3ed
cmp byte [0x4d2389], al
jne 0x452fb3
mov esi, dword [0x4d2384]
cmp dword [esi], 0
je 0x40e3ed
mov ecx, dword fs:[0x2c]
mov eax, dword [0x4d2540]
mov byte [ebp - 0x15], 0
mov ecx, dword [ecx]
cmp eax, dword [ecx + 4]
jg 0x452fc0
mov dword [0x4d2560], 0
mov dword [0x4d255c], 0
mov edx, dword [esi]
mov dword [ebp - 0x50], 0x4d2544
mov dword [ebp - 0x4c], 0x4d2544
mov ebx, dword [edi + 4]
mov ecx, dword [edx + 4]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x48], ebx
test ebx, ebx
je 0x453003
test ecx, ecx
je 0x40e162
mov eax, dword [edx]
cmp ebx, ecx
jb 0x40e968
test ebx, ebx
je 0x40e144
mov edi, dword [edi]
sub edi, eax
lea ebx, [ebx]
movzx ecx, word [eax + edi]
movzx edx, word [eax]
cmp cx, dx
jne 0x40e148
add eax, 2
sub ebx, 1
jne 0x40e130
xor eax, eax
jmp 0x40e14e
sbb eax, eax
and eax, 0xfffffffe
inc eax
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x48]
test eax, eax
js 0x40e209
jle 0x40e26f
mov edi, dword [edx + 0x1c]
mov dword [ebp - 0x30], edi
test edi, edi
je 0x40e813
mov ebx, dword [edi + 4]
mov eax, dword [ebp - 0x48]
cmp ebx, eax
ja 0x40e8b8
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x40], ebx
mov edx, dword [eax]
mov eax, dword [edi]
test ebx, ebx
je 0x40e1b6
sub eax, edx
mov dword [ebp - 0x68], eax
movzx ecx, word [edx + eax]
mov eax, ecx
mov dword [ebp - 0x34], eax
movzx eax, word [edx]
mov edi, eax
mov dword [ebp - 0x70], edi
mov edi, dword [ebp - 0x30]
cmp cx, ax
jne 0x40e1bd
mov eax, dword [ebp - 0x68]
add edx, 2
sub dword [ebp - 0x40], 1
jne 0x40e191
cmp ebx, dword [ebp - 0x48]
jb 0x40e1c6
jmp 0x40e1e0
mov eax, dword [ebp - 0x70]
cmp word [ebp - 0x34], ax
jae 0x40e1e0
mov ecx, dword [ebp - 0x20]
mov eax, dword [edi + 0x18]
mov dword [ecx + 0x1c], eax
mov eax, dword [esi]
mov dword [edi + 0x18], eax
mov dword [esi], edi
cmp dword [edi + 0x1c], 0
je 0x40e813
mov ecx, dword [ebp - 0x4c]
mov eax, dword [esi]
mov edi, dword [ebp - 0x2c]
mov dword [ecx + 0x1c], eax
mov eax, dword [esi]
mov dword [ebp - 0x4c], eax
mov edx, dword [eax + 0x1c]
mov dword [esi], edx
jmp 0x40e100
dec edx
add ecx, 4
jmp 0x40e010
inc edx
jmp 0x40e06c
mov edi, dword [edx + 0x18]
test edi, edi
je 0x40e813
mov eax, dword [edi + 4]
cmp ebx, eax
ja 0x40e8bf
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x2c]
mov ebx, dword [edi]
mov dword [ebp - 0x40], eax
mov ecx, dword [ecx]
test eax, eax
je 0x40e261
sub ecx, ebx
mov dword [ebp - 0x70], ecx
movzx ecx, word [ebx + ecx]
mov eax, ecx
mov dword [ebp - 0x30], eax
movzx eax, word [ebx]
mov edx, eax
mov dword [ebp - 0x68], edx
mov edx, dword [ebp - 0x20]
cmp cx, ax
jne 0x40e4fa
mov ecx, dword [ebp - 0x70]
add ebx, 2
sub dword [ebp - 0x40], 1
jne 0x40e235
mov eax, dword [ebp - 0x48]
cmp eax, dword [edi + 4]
jb 0x40e503
jmp 0x40e51a
mov dl, 1
mov eax, dword [esi]
mov ecx, dword [ebp - 0x4c]
mov eax, dword [eax + 0x18]
mov dword [ecx + 0x1c], eax
mov eax, dword [esi]
mov ecx, dword [ebp - 0x50]
mov eax, dword [eax + 0x1c]
mov dword [ecx + 0x18], eax
mov ecx, dword [esi]
mov eax, dword [0x4d2560]
mov dword [ecx + 0x18], eax
mov ecx, dword [esi]
mov eax, dword [0x4d255c]
mov dword [ecx + 0x1c], eax
test dl, dl
je 0x40e3ea
mov esi, dword [esi]
test esi, esi
je 0x40e3ea
mov eax, dword [esi + 0x10]
mov esi, dword [esi + 0x14]
and eax, 0xff00
mov dword [ebp - 0x80], eax
test esi, esi
je 0x40e3ea
mov dword [ebp - 0x50], esi
test esi, esi
je 0x40eb3c
test eax, 0x100
jne 0x453070
mov edi, dword [ebp + 8]
lea esp, [esp]
mov ecx, dword [edi + 4]
mov edx, ecx
mov ebx, dword [ebp - 0x24]
mov eax, dword [ecx + ebx*4]
cmp word [eax + 8], 0x4e
je 0x40e540
mov eax, dword [ecx + ebx*4]
cmp word [eax + 8], 0x35
je 0x4532a1
mov eax, dword [esi + 0xc]
cmp eax, 8
je 0x4532ec
cmp eax, 0xc
je 0x4532ec
cmp eax, 0xf
je 0x4532ec
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov ecx, dword [eax + ebx*4]
movzx eax, word [ecx + 8]
movsx edi, ax
cmp ax, 0x41
jne 0x40e9ca
push 0xffffffffffffffff
lea eax, [ebp - 0x64]
inc ebx
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], ebx
mov ebx, dword [ebp - 0x1c]
mov ecx, ebx
push eax
push edx
call fcn.0040ec40
test eax, eax
js case.default.0x40e9e5
cmp byte [ebp - 0x25], 0
jne 0x40e6c9
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov eax, dword [ebp - 0x24]
mov eax, dword [ecx + eax*4]
cmp word [eax + 8], 0x7f
jne 0x4539e9
test esi, esi
je 0x40eb44
cmp edi, 0x41
jne 0x40e9d9
lea eax, [ebp - 0x64]
cmp esi, eax
je case.default.0x40e9e5
mov eax, dword [esi + 0xc]
cmp eax, 4
je 0x40ea31
mov edi, dword [esi + 8]
test edi, edi
jne 0x40ea61
cmp eax, 5
jge 0x40eb0a
lea eax, [ebp - 0x64]
mov dword [esi + 0xc], 1
push eax
mov ecx, esi
mov dword [esi], 0
call fcn.004100e0
mov esi, dword [ebp - 0x5c]
test esi, esi
jne 0x40e9a2
mov eax, dword [ebp - 0x58]
cmp eax, 5
jge 0x40eadd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
mov ebx, dword [0x4d2370]
test ebx, ebx
je 0x40eb32
mov eax, dword fs:[0x2c]
mov byte [ebp - 0x15], 0
mov ecx, dword [eax]
mov eax, dword [0x4d2540]
cmp eax, dword [ecx + 4]
jg 0x453017
mov dword [0x4d2560], 0
mov dword [0x4d255c], 0
mov dword [ebp - 0x20], 0x4d2544
mov dword [ebp - 0x4c], 0x4d2544
lea ebx, [ebx]
dec ebp
add bh, al
inc ebp
mov ah, 0x44
and eax, 0x9b8d004d
add byte [eax], al
add byte [eax], al
mov esi, dword [edi + 4]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x50], esi
test esi, esi
je 0x45305c
test ecx, ecx
je 0x40e8c7
mov eax, dword [ebx]
cmp esi, ecx
jb 0x40e9fc
mov ecx, esi
test ecx, ecx
je 0x40e488
mov edi, dword [edi]
sub edi, eax
lea ecx, [ecx]
movzx edx, word [eax + edi]
movzx esi, word [eax]
cmp dx, si
jne 0x40e534
add eax, 2
sub ecx, 1
jne 0x40e470
xor eax, eax
mov esi, dword [ebp - 0x50]
test eax, eax
js 0x40e81b
jg 0x40e8c7
mov byte [ebp - 0x15], 1
cmp byte [ebp - 0x15], 0
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebx + 0x18]
mov dword [ecx + 0x1c], eax
mov eax, dword [0x4d2370]
mov ecx, dword [ebp - 0x20]
mov eax, dword [eax + 0x1c]
mov dword [ecx + 0x18], eax
mov ecx, dword [0x4d2370]
mov eax, dword [0x4d2560]
mov dword [ecx + 0x18], eax
mov ecx, dword [0x4d2370]
mov eax, dword [0x4d255c]
mov dword [ecx + 0x1c], eax
je 0x40eb32
mov esi, dword [0x4d2370]
test esi, esi
je 0x40eb32
mov eax, dword [esi + 0x10]
mov esi, dword [esi + 0x14]
and eax, 0xff00
jmp 0x40e2c3
mov eax, dword [ebp - 0x68]
cmp word [ebp - 0x30], ax
jae 0x40e51a
mov eax, dword [edi + 0x1c]
mov dword [edx + 0x18], eax
mov eax, dword [esi]
mov dword [edi + 0x1c], eax
mov dword [esi], edi
cmp dword [edi + 0x18], 0
je 0x40e813
mov ecx, dword [ebp - 0x50]
mov eax, dword [esi]
mov edi, dword [ebp - 0x2c]
mov dword [ecx + 0x18], eax
mov eax, dword [esi]
mov dword [ebp - 0x50], eax
mov edx, dword [eax + 0x18]
mov dword [esi], edx
jmp 0x40e100
sbb eax, eax
and eax, 0xfffffffe
inc eax
jmp 0x40e48a
mov eax, dword [esi + 0xc]
cmp eax, 5
jne 0x40eb6f
mov eax, ebx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
xor edi, edi
mov dword [ebp - 8], 1
mov dword [ebp - 0x38], eax
mov eax, dword [ecx + ebx*4 - 4]
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x20], edi
movsx eax, word [eax + 0xa]
mov dword [ebp - 0x30], eax
mov eax, dword [ecx + ebx*4]
cmp word [eax + 8], 0x4e
jne 0x40e616
mov eax, dword [ecx + ebx*4 + 4]
inc ebx
mov ecx, dword [ebp - 0x1c]
push 0xffffffffffffffff
mov dword [ebp - 0x24], ebx
movsx eax, word [eax + 0xa]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.0040ec40
test eax, eax
js 0x4534ac
mov edi, dword [ebp - 8]
cmp edi, 1
jne 0x45308f
mov ebx, dword [ebp - 0x14]
mov eax, ebx
test eax, eax
js 0x453443
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x24]
mov ecx, dword [eax + 4]
mov eax, dword [ecx + edx*4]
cmp word [eax + 8], 0x4f
jne 0x45331f
inc edx
mov dword [ebp - 0x24], edx
cmp edi, 1
jne 0x45312d
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp + 8]
mov dword [ebp + edi*4 - 0x184], ebx
inc edi
mov ecx, dword [eax + 4]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x20], edi
mov eax, dword [ecx + ebx*4]
cmp word [eax + 8], 0x4e
je 0x40e587
cmp dword [esi + 0xc], 5
jne 0x4531c9
mov edx, dword [esi]
mov eax, dword [edx]
xor ecx, ecx
mov dword [eax + 0x210], 0
test edi, edi
jle 0x40e66b
mov eax, dword [ebp - 0x20]
jmp 0x40e640
mov esi, dword [edx]
mov edi, dword [esi + 0x210]
cmp edi, 0x40
jge 0x40e666
mov eax, dword [ebp + ecx*4 - 0x184]
mov dword [esi + edi*4 + 0x110], eax
mov eax, dword [edx]
inc dword [eax + 0x210]
mov eax, dword [ebp - 0x20]
inc ecx
cmp ecx, eax
jl 0x40e640
push 0
push 1
push edx
call fcn.004104f0
mov esi, eax
add esp, 0xc
mov dword [ebp - 0x50], esi
test esi, esi
je 0x453508
mov ecx, dword [ebp - 0xc]
test ecx, ecx
jne 0x4531d0
mov eax, dword [ebp - 8]
cmp eax, 5
jge 0x4531e2
mov edi, dword [ebp + 8]
mov dword [ebp - 8], 1
mov dword [ebp - 0x14], 0
mov byte [ebp - 0x25], 1
mov ecx, dword [edi + 4]
mov edx, ecx
mov eax, dword [ecx + ebx*4]
cmp word [eax + 8], 0x4e
jne 0x40e2f6
jmp 0x40e540
mov ebx, dword [ebp + 8]
xor esi, esi
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
mov ecx, dword [ebx + 4]
mov dword [ebp - 8], 1
mov dword [ebp - 0x20], esi
mov eax, dword [ecx + edx*4 - 4]
movsx eax, word [eax + 0xa]
mov dword [ebp - 0x30], eax
mov eax, dword [ecx + edx*4]
cmp word [eax + 8], 0x4e
jne 0x40e78e
mov eax, dword [ecx + edx*4 + 4]
inc edx
mov ecx, dword [ebp - 0x1c]
push 0xffffffffffffffff
mov dword [ebp - 0x80], edx
movsx eax, word [eax + 0xa]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x80]
push eax
push ebx
call fcn.0040ec40
test eax, eax
js 0x45381a
mov esi, dword [ebp - 8]
cmp esi, 1
jne 0x4535e9
mov ebx, dword [ebp - 0x14]
mov eax, ebx
test eax, eax
js 0x45379b
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x80]
mov ecx, dword [eax + 4]
mov eax, dword [ecx + edx*4]
cmp word [eax + 8], 0x4f
jne 0x45372c
inc edx
mov dword [ebp - 0x38], edx
cmp esi, 1
jne 0x453687
mov esi, dword [ebp - 0x20]
mov dword [ebp + esi*4 - 0x184], ebx
inc esi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x20], esi
mov ecx, dword [ebx + 4]
mov eax, dword [ecx + edx*4]
cmp word [eax + 8], 0x4e
je 0x40e705
mov eax, dword [ebp - 0x78]
cmp dword [eax + 0xc], 5
jne 0x45388c
mov edx, dword [eax]
mov eax, dword [edx]
xor ecx, ecx
mov dword [eax + 0x210], 0
test esi, esi
jle 0x40e7dd
mov eax, dword [ebp - 0x20]
mov esi, dword [edx]
mov ebx, dword [esi + 0x210]
cmp ebx, 0x40
jge 0x40e7d8
mov eax, dword [ebp + ecx*4 - 0x184]
mov dword [esi + ebx*4 + 0x110], eax
mov eax, dword [edx]
inc dword [eax + 0x210]
mov eax, dword [ebp - 0x20]
inc ecx
cmp ecx, eax
jl 0x40e7b2
push 0
push 2
push edx
call fcn.004104f0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x453893
mov ecx, dword [ebp - 0xc]
test ecx, ecx
jne 0x453912
mov eax, dword [ebp - 8]
cmp eax, 5
jge 0x453924
mov ebx, dword [ebp - 0x1c]
jmp 0x40e363
mov dl, byte [ebp - 0x15]
jmp 0x40e271
mov edi, dword [ebp - 0x2c]
mov edx, dword [ebx + 0x18]
test edx, edx
je 0x40e49f
mov eax, dword [edx + 4]
mov dword [ebp - 0x34], eax
cmp esi, eax
ja 0x40eaa9
mov edx, dword [edx]
mov dword [ebp - 0x40], esi
test esi, esi
je 0x40e868
mov edi, dword [edi]
sub edi, edx
movzx eax, word [edx + edi]
mov dword [ebp - 0x68], eax
movzx eax, word [edx]
mov ecx, eax
mov dword [ebp - 0x30], ecx
movzx ecx, word [edx + edi]
cmp cx, ax
jne 0x40e86e
add edx, 2
sub dword [ebp - 0x40], 1
jne 0x40e844
mov eax, dword [ebp - 0x34]
cmp esi, eax
jb 0x40e877
jmp 0x40e899
mov eax, dword [ebp - 0x30]
cmp word [ebp - 0x68], ax
jae 0x40e899
lea ecx, [ebx + 0x18]
mov ebx, dword [ecx]
mov eax, dword [ebx + 0x1c]
mov dword [ecx], eax
mov eax, dword [0x4d2370]
mov dword [ebx + 0x1c], eax
mov dword [0x4d2370], ebx
cmp dword [ebx + 0x18], 0
je 0x40e49f
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x2c]
mov dword [ecx + 0x18], ebx
mov eax, dword [0x4d2370]
mov dword [ebp - 0x20], eax
mov ebx, dword [eax + 0x18]
mov dword [0x4d2370], ebx
jmp 0x40e440
mov ebx, eax
jmp 0x40e17e
mov dword [ebp - 0x48], eax
jmp 0x40e222
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x40e49f
mov ecx, dword [eax + 4]
mov dword [ebp - 0x40], ecx
cmp ecx, esi
ja 0x40ea9f
mov edx, dword [ebp - 0x2c]
mov edi, ecx
mov edx, dword [edx]
test ecx, ecx
je 0x40e919
mov eax, dword [eax]
sub eax, edx
mov dword [ebp - 0x34], eax
movzx ecx, word [edx + eax]
mov eax, ecx
mov dword [ebp - 0x68], eax
movzx eax, word [edx]
mov esi, eax
mov dword [ebp - 0x30], esi
mov esi, dword [ebp - 0x50]
cmp cx, ax
jne 0x40e940
mov eax, dword [ebp - 0x34]
add edx, 2
sub edi, 1
jne 0x40e8f2
mov ecx, dword [ebp - 0x40]
cmp ecx, esi
jae 0x40e949
lea ecx, [ebx + 0x1c]
mov ebx, dword [ecx]
mov eax, dword [ebx + 0x18]
mov dword [ecx], eax
mov eax, dword [0x4d2370]
mov dword [ebx + 0x18], eax
mov dword [0x4d2370], ebx
cmp dword [ebx + 0x1c], 0
jne 0x40e949
jmp 0x40e49f
mov eax, dword [ebp - 0x30]
cmp word [ebp - 0x68], ax
jb 0x40e91d
mov ecx, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x2c]
mov dword [ecx + 0x1c], ebx
mov eax, dword [0x4d2370]
mov dword [ebp - 0x4c], eax
mov ebx, dword [eax + 0x1c]
mov dword [0x4d2370], ebx
jmp 0x40e440
test ecx, ecx
je 0x453010
mov edi, dword [edi]
sub edi, eax
movzx ebx, word [eax + edi]
movzx edx, word [eax]
cmp bx, dx
mov dword [ebp - 0x70], ebx
mov ebx, dword [ebp - 0x48]
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x20]
je 0x40eacc
mov eax, dword [ebp - 0x40]
cmp word [ebp - 0x70], ax
sbb eax, eax
and eax, 0xfffffffe
inc eax
jmp 0x40e154
mov eax, dword [esi + 0xc]
dec dword [eax]
mov eax, dword [esi + 0xc]
cmp dword [eax], 0
je 0x40eab0
push 0x10
push esi
call fcn.0041fdcd
add esp, 8
mov dword [ebp - 0x5c], 0
jmp 0x40e3d5
cmp ax, 0x52
je 0x40e33c
jmp 0x4535aa
add edi, 0xffffffae
cmp edi, 4
ja case.default.0x40e9e5
jmp dword [edi*4 + 0x40ebd4]
lea eax, [ebp - 0x64]
mov ecx, esi
push eax
invalid