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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2c
call fcn.00628ef0
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 0x500192
ja 0x500134
test eax, eax
je 0x500192
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 0x500143
ja 0x50018c
cmp eax, esi
jb 0x500143
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
xor eax, eax
mov edi, 1
cmp eax, dword [ebp + 0x14]
ja 0x5001e9
jb 0x5001a5
cmp edi, dword [ebp + 0x10]
jae 0x5001e9
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.004fffd0
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 0x5001b2
ja 0x5001de
cmp edi, dword [ebp + 0x10]
jb 0x5001b2
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 8]
jmp 0x5001ee
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.004fffd0
mov ecx, dword [ebp + 0x14]
add esp, 8
xorps xmm0, xmm0
movlpd qword [ebp - 0x28], xmm0
test ecx, ecx
jb 0x5002ec
ja 0x50022d
test ebx, ebx
je 0x5002ec
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.00653740
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 0x5002ac
ja 0x50027b
cmp dword [ebp - 4], 0
je 0x5002a9
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 0x500281
ja 0x5002a6
cmp ecx, ebx
jb 0x500281
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.004fffd0
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 0x500250
ja 0x5002e9
cmp eax, ebx
jb 0x500250
mov esi, dword [ebp - 0x14]
cmp dword [ebp - 0x10], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x28], xmm0
jb 0x500343
mov ebx, dword [ebp - 4]
ja 0x500303
test ebx, ebx
je 0x500343
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 0x500310
ja 0x500343
cmp edx, ebx
jb 0x500310
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret