Function at 0x4085a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.00408f80
mov esi, edx
mov edi, ecx
mov ebx, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.00409050
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x18], esi
je 0x40864e
test ebx, ebx
jle 0x408d70
xor eax, eax
cmp ebx, 1
je 0x408628
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x30]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x30]
add eax, 2
cmp ecx, eax
jne 0x408610
test bl, 1
je 0x408d70
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x30]
jmp 0x408d70
lea eax, [esi + esi*8]
mov dword [esp + 0x14], eax
shl eax, 6
test ebx, ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0x28], eax
jle 0x408749
cmp ebx, 1
jne 0x408ebd
xor eax, eax
xor ebp, ebp
test bl, 1
mov ebx, ebp
mov edx, dword [esp + 0x10]
je 0x4086a6
mov ecx, dword [esp + 0x28]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4086a6
mov word [esp + ebx*4 + 0xb4], cx
mov word [esp + ebx*4 + 0xb6], ax
inc ebx
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00409050
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x408760
xor eax, eax
cmp ebx, 1
je 0x40871f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xb4]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
movzx edx, word [esp + eax*4 + 0xb8]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
add eax, 2
cmp ecx, eax
jne 0x4086e0
test bl, 1
je 0x408740
movzx eax, word [esp + eax*4 + 0xb4]
movzx ecx, al
inc dword [esp + ecx*4 + 0x934]
shr eax, 8
inc dword [esp + eax*4 + 0xd34]
mov eax, dword [esp + 0xd34]
jmp 0x408769
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00409050
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x2c], eax
lea eax, [ebx - 1]
mov dword [esp + 0x1c], eax
mov dword [esp], ebx
and ebx, 0xfffffffe
lea eax, [esp + 0xb4]
mov dword [esp + 8], eax
lea eax, [esp + 0x1134]
xor ecx, ecx
lea esi, [esp + 0x938]
xor edx, edx
mov dword [esp + 0x24], ebx
jmp 0x4087ca
mov edx, dword [esp + 0x20]
inc edx
add ecx, 8
add esi, 0x400
mov eax, edi
cmp edx, dword [esp + 0x2c]
je 0x4088dc
mov dword [esp + 0x20], edx
mov edx, dword [esp + 8]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
xor eax, eax
xor edx, edx
nop
nop
mov dword [esp + eax*4 + 0x534], edx
mov ebx, dword [esi + eax*4 - 4]
mov edi, ebx
and edi, edx
xor ebx, edx
lea edx, [ebx + edi*2]
mov dword [esp + eax*4 + 0x538], edx
mov edi, dword [esi + eax*4]
mov ebx, edi
and ebx, edx
xor edi, edx
lea edx, [edi + ebx*2]
add eax, 2
cmp eax, 0x100
jne 0x4087e0
cmp byte [esp + 7], 0
mov edi, dword [esp + 0xc]
jne 0x4087b0
cmp dword [esp + 0x1c], 0
je 0x40889f
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [edi + eax*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0x534]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0x534], ebx
mov edx, dword [esp + 0xc]
mov edx, dword [edx + eax*4]
mov ebp, dword [esp + 8]
mov dword [ebp + edi*4], edx
mov edx, dword [esp + 0xc]
movzx edx, word [edx + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0x534]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0x534], ebx
mov edx, dword [esp + 0xc]
mov edx, dword [edx + eax*4 + 4]
mov dword [ebp + edi*4], edx
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 0x24]
add eax, 2
cmp ebx, eax
jne 0x408830
test byte [esp], 1
je 0x4087b0
jmp 0x4088ab
xor eax, eax
test byte [esp], 1
je 0x4087b0
movzx edx, word [edi + eax*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0x534]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0x534], ebx
mov edx, dword [esp + 0xc]
mov eax, dword [edx + eax*4]
mov edx, dword [esp + 8]
mov dword [edx + edi*4], eax
mov edi, dword [esp + 0xc]
jmp 0x4087b0
cmp dword [esp], 0
je 0x408c35
mov ecx, dword [esp]
cmp ecx, 1
jne 0x4088fc
mov eax, dword [esp + 8]
mov word [eax], 1
jmp 0x408b0c
mov ebx, dword [esp + 8]
movzx eax, word [ebx + 4]
add word [ebx], ax
cmp ecx, 3
jl 0x40899b
mov eax, 2
mov edi, 2
sub edi, dword [esp]
xor edx, edx
mov esi, 1
jmp 0x408947
mov ecx, ebx
and ecx, 0xfffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor eax, eax
xor ebp, ebp
jmp 0x408eeb
add eax, 2
cmp ecx, eax
je 0x408675
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408f06
mov word [esp + ebp*4 + 0xb4], si
mov word [esp + ebp*4 + 0xb6], ax
inc ebp
movzx esi, word [edx + eax*2]
test si, si
je 0x408ee0
mov word [esp + ebp*4 + 0xb4], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0xb6], si
inc ebp
jmp 0x408ee0