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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2c
call fcn.005dfa60
push ebx
mov ebx, dword [ebp + 0x1c]
xorps xmm0, xmm0
push esi
mov esi, ecx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 8]
mov eax, edx
mov ecx, dword [ebp + 0xc]
shld ecx, eax, 5
push edi
shl eax, 5
mov edi, esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], eax
movlpd qword [ebp - 0x28], xmm0
test ecx, ecx
jb 0x50f132
ja 0x50f0d4
test eax, eax
je 0x50f132
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp - 4]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 8], eax
movzx eax, byte [edi]
lea edi, [edi + 4]
mov dword [ebx], eax
movzx edx, byte [edi - 3]
shl edx, 8
or edx, eax
mov dword [ebx], edx
movzx ecx, byte [edi - 2]
shl ecx, 0x10
or ecx, edx
mov dword [ebx], ecx
movzx eax, byte [edi - 1]
shl eax, 0x18
or eax, ecx
mov ecx, dword [ebp - 0x18]
mov dword [ebx], eax
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
adc ecx, 0
add ebx, 4
mov dword [ebp - 0x18], ecx
cmp ecx, dword [ebp - 0x10]
jb 0x50f0e3
ja 0x50f12c
cmp eax, esi
jb 0x50f0e3
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
xor eax, eax
mov edi, 1
cmp eax, dword [ebp + 0x14]
ja 0x50f189
jb 0x50f145
cmp edi, dword [ebp + 0x10]
jae 0x50f189
mov eax, edx
mov dword [ebp - 8], edx
shl eax, 7
xor esi, esi
mov dword [ebp - 0x20], eax
push dword [ebp + 0xc]
mov ecx, ebx
push edx
mov edx, ebx
sub edx, eax
call fcn.0050ef70
mov eax, dword [ebp - 0x20]
add esp, 8
mov edx, dword [ebp + 8]
add edi, 1
adc esi, 0
add ebx, eax
cmp esi, dword [ebp + 0x14]
jb 0x50f152
ja 0x50f17e
cmp edi, dword [ebp + 0x10]
jb 0x50f152
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 8]
jmp 0x50f18e
mov eax, edx
mov dword [ebp - 8], eax
push dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp - 0xc]
mov ecx, edi
push edx
mov edx, ebx
shl edx, 7
add edx, 0xffffff80
imul edx, eax
add edx, dword [ebp + 0x1c]
call fcn.0050ef70
mov ecx, dword [ebp + 0x14]
add esp, 8
xorps xmm0, xmm0
movlpd qword [ebp - 0x28], xmm0
test ecx, ecx
jb 0x50f28c
ja 0x50f1cd
test ebx, ebx
je 0x50f28c
mov eax, dword [ebp - 8]
lea edx, [edi - 0x40]
mov esi, dword [ebp - 0x10]
shl eax, 7
add edx, eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x18], eax
nop word [eax + eax]
push ecx
push ebx
push 0
push dword [edx]
call fcn.00608870
mov edx, eax
xorps xmm0, xmm0
imul edx, dword [ebp - 8]
movlpd qword [ebp - 0x28], xmm0
shl edx, 7
add edx, dword [ebp + 0x1c]
test esi, esi
jb 0x50f24c
ja 0x50f21b
cmp dword [ebp - 4], 0
je 0x50f249
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0xc]
lea edx, [edx + 4]
mov ebx, dword [ebp + 0x18]
mov eax, dword [eax + ecx*4]
xor eax, dword [edx - 4]
mov dword [ebx + ecx*4], eax
add ecx, 1
mov ebx, dword [ebp - 4]
adc edi, 0
cmp edi, esi
jb 0x50f221
ja 0x50f246
cmp ecx, ebx
jb 0x50f221
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp + 0x10]
push dword [ebp + 0xc]
mov edx, dword [ebp + 0x18]
mov ecx, edi
push dword [ebp + 8]
call fcn.0050ef70
mov eax, dword [ebp - 0x18]
add esp, 8
mov edx, dword [ebp - 0x1c]
add eax, 1
mov ecx, dword [ebp + 0x14]
adc edx, 0
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], edx
cmp edx, ecx
mov edx, dword [ebp - 0x20]
jb 0x50f1f0
ja 0x50f289
cmp eax, ebx
jb 0x50f1f0
mov esi, dword [ebp - 0x14]
cmp dword [ebp - 0x10], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x28], xmm0
jb 0x50f2e3
mov ebx, dword [ebp - 4]
ja 0x50f2a3
test ebx, ebx
je 0x50f2e3
mov edi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
nop dword [eax]
mov eax, dword [ebp - 0xc]
lea esi, [esi + 4]
mov ecx, dword [eax + edx*4]
mov eax, ecx
shr eax, 8
mov byte [esi - 4], cl
mov byte [esi - 3], al
mov eax, ecx
shr eax, 0x10
shr ecx, 0x18
add edx, 1
mov byte [esi - 2], al
adc edi, 0
mov byte [esi - 1], cl
cmp edi, dword [ebp - 0x10]
jb 0x50f2b0
ja 0x50f2e3
cmp edx, ebx
jb 0x50f2b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret