Function at 0x4f0650
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x5ff004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov eax, ecx
mov dword [ebp - 0x20], edx
push esi
mov esi, dword [ebp + 0x14]
xor ecx, ecx
mov dword [ebp - 0x28], eax
xor edx, edx
push edi
mov edi, dword [eax + 0x2b4]
mov eax, dword [eax + 0x2b8]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov word [ebp - 8], cx
lea ecx, [esi*2 - 4]
div ecx
mov ecx, dword [ebp - 0x28]
imul eax, esi
mov ebx, edx
push esi
mov esi, dword [ebp - 0x28]
mov ecx, dword [ecx]
mov dword [ebp - 0x24], ebx
add eax, dword [esi + 8]
cdq
push edx
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ecx]
push ecx
call eax
mov ch, byte [ebp - 0x18]
add esp, 0x14
mov cl, byte [ebp - 0x17]
movzx eax, ch
shl ax, 8
movsx edx, ax
movzx eax, cl
or edx, eax
mov eax, dword [ebp + 0x18]
add eax, 0xffffffee
cmp eax, 4
ja case.default.0x4f06e0
jmp dword [eax*4 + 0x4f08e8]
movzx eax, word [esi + 0x14]
inc edx
cmp ch, 0x80
jne 0x4f0700
dec cl
movzx eax, cl
neg eax
sbb eax, eax
and edx, eax
movzx eax, word [esi + 0x14]
movzx ecx, ax
jmp 0x4f0742
mov ecx, 0xc
sub ecx, edx
mov edx, 1
shl edx, cl
jmp 0x4f073e
and edx, 0x1fff
movzx eax, ch
inc edx
shr eax, 5
movzx ecx, word [esi + eax*4 + 0x14]
movzx eax, word [esi + eax*4 + 0x16]
jmp 0x4f0746
movzx eax, word [esi + 0x304]
xor edx, eax
and edx, 0x1fff
inc edx
movzx ecx, word [esi + 0x14]
movzx eax, word [esi + 0x16]
cwde
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x10]
add eax, ebx
movsx ecx, cx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], eax
cmp ebx, eax
jge 0x4f086a
cmp dword [ebp + 0x1c], 0x300
jne 0x4f07f0
lea ecx, [ecx]
mov eax, ebx
test eax, eax
jns 0x4f0779
add eax, 1
sar eax, 1
movzx eax, byte [ebp + eax - 0x16]
test bl, 1
je 0x4f078a
and eax, 0xf
jmp 0x4f078d
shr eax, 4
mov esi, dword [eax*4 + 0x5332a8]
mov eax, dword [ebp - 0x2c]
imul eax, dword [ebp - 0x1c]
imul ecx, edi
imul esi, edx
sar eax, 0xc
sar ecx, 0xc
add ecx, eax
add ecx, esi
cmp ecx, 0x7fff
jle 0x4f07ba
mov ecx, 0x7fff
jmp 0x4f07c7
cmp ecx, 0xffff8000
jge 0x4f07c7
mov ecx, 0xffff8000
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1c], edi
mov edi, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0x34]
lea eax, [eax + ebx*2]
mov ebx, dword [ebp - 0x24]
inc ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], ebx
cmp ebx, dword [ebp - 0x30]
jl 0x4f0770
jmp 0x4f0867
mov eax, ebx
test eax, eax
jns 0x4f07f9
add eax, 1
sar eax, 1
movzx eax, byte [ebp + eax - 0x16]
test bl, 1
je 0x4f080a
and eax, 0xf
jmp 0x4f080d
shr eax, 4
mov esi, dword [eax*4 + 0x5332a8]
mov eax, ecx
mov ecx, dword [ebp - 0x2c]
imul ecx, dword [ebp - 0x1c]
imul eax, edi
imul esi, edx
add eax, ecx
sar eax, 0xc
add eax, esi
cmp eax, 0x7fff
jle 0x4f0838
mov eax, 0x7fff
jmp 0x4f0844
cmp eax, 0xffff8000
jge 0x4f0844
mov eax, 0xffff8000
mov ecx, dword [ebp - 0x20]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1c], edi
mov edi, eax
mov word [ecx], ax
lea ecx, [ecx + ebx*2]
mov ebx, dword [ebp - 0x24]
inc ebx
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x24], ebx
cmp ebx, dword [ebp - 0x30]
jl 0x4f07f0
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x2b8], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x2b4], edi
cmp eax, 0x15
je 0x4f0886
cmp eax, 0x16
jne 0x4f08d7
and ebx, 0x8000001f
jns 0x4f0895
dec ebx
or ebx, 0xffffffe0
add ebx, 1
jne 0x4f08d7
mov ecx, dword [esi + 0x300]
test ecx, ecx
jle 0x4f08d7
movzx edi, word [esi + 0x306]
movzx ebx, word [esi + 0x308]
movzx edx, word [esi + 0x304]
jmp 0x4f08c0
imul edx, edi
add edx, ebx
and edx, 0x7fff
sub ecx, 1
jne 0x4f08c0
mov word [esi + 0x304], dx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00502eb4
mov esp, ebp
pop ebp
ret