Function at 0x4e0ad0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x18]
mov eax, ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
sub eax, edi
and eax, 0xfffffffe
cmp eax, 0x40
jle 0x4e0b5d
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
test esi, esi
jle 0x4e0bc8
push ecx
push ebx
lea eax, [esp + 0x1c]
push edi
push eax
call fcn.004df130
mov edx, dword [esp + 0x24]
mov eax, esi
mov ebp, dword [esp + 0x28]
mov ecx, ebx
sar eax, 2
add esp, 0x10
sar esi, 1
sub ecx, ebp
add esi, eax
and ecx, 0xfffffffe
mov eax, edx
sub eax, edi
and eax, 0xfffffffe
cmp eax, ecx
mov eax, dword [esp + 0x2c]
push eax
push esi
jge 0x4e0b3f
push edx
push edi
call fcn.004e0ad0
mov edi, ebp
jmp 0x4e0b4a
push ebx
push ebp
call fcn.004e0ad0
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x3c]
mov eax, ebx
sub eax, edi
add esp, 0x10
and eax, 0xfffffffe
cmp eax, 0x40
jg 0x4e0af3
cmp edi, ebx
je 0x4e0d52
lea esi, [edi + 2]
cmp esi, ebx
je 0x4e0d52
mov ecx, 2
sub ecx, edi
mov dword [esp + 0x20], ecx
nop dword [eax + eax]
movzx ebp, word [esi]
mov edx, esi
movzx eax, bp
mov dword [esp + 0x24], ebp
movd xmm1, eax
movzx eax, word [edi]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
jbe 0x4e0d01
add ecx, 0xfffffffe
mov eax, esi
add ecx, esi
push ecx
sub eax, ecx
add eax, 2
push edi
push eax
call fcn.0067d850
add esp, 0xc
mov word [edi], bp
jmp 0x4e0d43
sub ebx, edi
mov eax, ebx
mov dword [esp + 0x24], ebx
sar eax, 1
mov esi, eax
mov dword [esp + 0x10], eax
sar esi, 1
test esi, esi
jle 0x4e0caf
mov ebx, eax
lea ebp, [ebx - 1]
sar ebp, 1
mov dword [esp + 0x14], ebp
nop dword [eax]
movzx eax, word [edi + esi*2 - 2]
dec esi
mov dword [esp + 0x20], eax
mov edx, esi
mov ecx, esi
cmp esi, ebp
jge 0x4e0c3b
add ecx, ecx
movzx eax, word [edi + ecx*2 + 4]
movd xmm1, eax
movzx eax, word [edi + ecx*2 + 2]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
xor eax, eax
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
seta al
inc ecx
xor eax, 1
add ecx, eax
mov ax, word [edi + ecx*2]
mov word [edi + edx*2], ax
mov edx, ecx
cmp ecx, ebp
jl 0x4e0c02
cmp edx, ebp
jne 0x4e0c50
test bl, 1
jne 0x4e0c50
mov ax, word [edi + ebx*2 - 2]
mov word [edi + edx*2], ax
lea edx, [ebx - 1]
lea ecx, [edx - 1]
sar ecx, 1
cmp esi, edx
jge 0x4e0c93
mov eax, dword [esp + 0x20]
movzx eax, ax
movd xmm1, eax
cvtdq2pd xmm1, xmm1
nop dword [eax + eax]
movzx ebp, word [edi + ecx*2]
movd xmm0, ebp
cvtdq2pd xmm0, xmm0
comisd xmm0, xmm1
jbe 0x4e0c8f
mov word [edi + edx*2], bp
mov edx, ecx
dec ecx
sar ecx, 1
cmp esi, edx
jl 0x4e0c70
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov word [edi + edx*2], ax
test esi, esi
jg 0x4e0bf0
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
cmp eax, 2
jl 0x4e0d52
nop dword [eax + eax]
movzx eax, word [edi + ebx - 2]
mov dword [esp + 0x24], eax
mov ax, word [edi]
mov word [edi + ebx - 2], ax
lea eax, [esp + 0x24]
push ecx
push eax
lea eax, [ebx - 2]
sar eax, 1
push eax
push 0
push edi
call fcn.004df9e0
mov ecx, dword [esp + 0x40]
add ebx, 0xfffffffe
mov eax, ebx
add esp, 0x14
and eax, 0xfffffffe
cmp eax, 4
jge 0x4e0cc0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
movzx eax, word [esi - 2]
lea ecx, [esi - 2]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
jbe 0x4e0d40
movzx ebp, word [ecx]
nop dword [eax]
mov word [edx], bp
mov edx, ecx
movzx eax, word [ecx - 2]
sub ecx, 2
mov ebp, eax
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
ja 0x4e0d20
mov ebp, dword [esp + 0x24]
mov word [edx], bp
mov ecx, dword [esp + 0x20]
add esi, 2
cmp esi, ebx
jne 0x4e0b80
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret