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

Disassembly:
mov eax, 0x20
call fcn.005e0210
mov ecx, dword [esp + 0x28]
xorps xmm0, xmm0
mov edx, dword [esp + 0x2c]
mov eax, edx
push ebx
mov ebx, dword [esp + 0x44]
push ebp
mov ebp, ecx
movlpd qword [esp + 0x10], xmm0
shld eax, ebp, 5
push esi
mov esi, dword [esp + 0x30]
shl ebp, 5
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], ebp
push edi
mov edi, esi
test eax, eax
jb 0x4f99e4
ja 0x4f9986
test ebp, ebp
je 0x4f99e4
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x10], eax
movzx eax, byte [edi]
lea edi, [edi + 4]
mov dword [ebx], eax
movzx ecx, byte [edi - 3]
shl ecx, 8
or ecx, eax
mov dword [ebx], ecx
movzx edx, byte [edi - 2]
shl edx, 0x10
or edx, ecx
mov dword [ebx], edx
movzx eax, byte [edi - 1]
shl eax, 0x18
or eax, edx
add esi, 1
mov dword [ebx], eax
mov eax, dword [esp + 0x10]
adc eax, 0
add ebx, 4
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x14]
jb 0x4f9992
ja 0x4f99d8
cmp esi, ebp
jb 0x4f9992
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
xor eax, eax
mov edi, 1
cmp eax, dword [esp + 0x44]
ja 0x4f9a40
jb 0x4f99f9
cmp edi, dword [esp + 0x40]
jae 0x4f9a40
mov ebp, ecx
mov dword [esp + 0x10], ecx
shl ebp, 7
xor esi, esi
push edx
push ecx
mov eax, ebx
sub eax, ebp
push eax
push ebx
call fcn.004f9800
mov ecx, dword [esp + 0x48]
add esp, 0x10
mov edx, dword [esp + 0x3c]
add edi, 1
adc esi, 0
add ebx, ebp
cmp esi, dword [esp + 0x44]
jb 0x4f9a04
ja 0x4f9a32
cmp edi, dword [esp + 0x40]
jb 0x4f9a04
mov esi, dword [esp + 0x34]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
jmp 0x4f9a44
mov dword [esp + 0x10], ecx
mov edi, dword [esp + 0x40]
mov eax, edi
push dword [esp + 0x3c]
mov ebx, dword [esp + 0x4c]
shl eax, 7
add eax, 0xffffff80
imul eax, dword [esp + 0x14]
push ecx
add eax, dword [esp + 0x58]
push eax
push ebx
call fcn.004f9800
mov ecx, dword [esp + 0x54]
add esp, 0x10
xorps xmm0, xmm0
movlpd qword [esp + 0x18], xmm0
test ecx, ecx
jb 0x4f9b57
ja 0x4f9a8b
test edi, edi
je 0x4f9b57
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
shl edx, 7
add edx, 0xffffffc0
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
add edx, ebx
mov dword [esp + 0x24], edx
mov dword [esp + 0x18], eax
nop
push ecx
push edi
push 0
push dword [edx]
call fcn.005e08a0
mov edx, eax
xorps xmm0, xmm0
imul edx, dword [esp + 0x10]
movlpd qword [esp + 0x28], xmm0
shl edx, 7
add edx, dword [esp + 0x50]
test esi, esi
jb 0x4f9b0c
ja 0x4f9adc
test ebp, ebp
je 0x4f9b0c
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov eax, dword [ebx + ecx*4]
lea edx, [edx + 4]
mov ebx, dword [esp + 0x4c]
xor eax, dword [edx - 4]
mov dword [ebx + ecx*4], eax
add ecx, 1
mov ebx, dword [esp + 0x48]
adc edi, 0
cmp edi, esi
jb 0x4f9ae4
ja 0x4f9b08
cmp ecx, ebp
jb 0x4f9ae4
mov edi, dword [esp + 0x40]
push dword [esp + 0x3c]
push dword [esp + 0x3c]
push dword [esp + 0x54]
push ebx
call fcn.004f9800
mov eax, dword [esp + 0x28]
add esp, 0x10
mov ecx, dword [esp + 0x20]
add eax, 1
mov edx, dword [esp + 0x24]
adc ecx, 0
mov dword [esp + 0x18], eax
cmp ecx, dword [esp + 0x44]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x44]
jb 0x4f9ab0
ja 0x4f9b53
cmp eax, edi
jb 0x4f9ab0
mov esi, dword [esp + 0x34]
cmp dword [esp + 0x14], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x18], xmm0
jb 0x4f9ba6
ja 0x4f9b6d
test ebp, ebp
je 0x4f9ba6
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov ecx, dword [ebx + edx*4]
lea esi, [esi + 4]
mov byte [esi - 4], cl
mov eax, ecx
shr eax, 8
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 [esp + 0x14]
jb 0x4f9b75
ja 0x4f9ba6
cmp edx, ebp
jb 0x4f9b75
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret