Function at 0x50f019
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
sub esp, 0x28
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x18]
add eax, 0x10
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
cmp eax, edx
jae 0x50f074
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
and eax, 0xff
cmp eax, 0x25
je 0x50f062
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
and eax, 0xff
cmp eax, 0x33
je 0x50f062
jmp 0x50f066
xor eax, eax
jmp 0x50f069
xor eax, eax
inc eax
cmp eax, 0
jne 0x50f074
xor eax, eax
jmp 0x50f077
xor eax, eax
inc eax
cmp eax, 0
je 0x50f08c
push dword [ebp + 0x20]
push dword [ebp + 0x18]
push dword [ebp + 0xc]
call fcn.0050ecd8
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x14], eax
mov eax, 2
cmp eax, 0
jle 0x50f0eb
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x18]
add eax, 0x10
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
cmp eax, edx
jae 0x50f0cb
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
and eax, 0xff
cmp eax, 0xb
jne 0x50f0cb
xor eax, eax
jmp 0x50f0ce
xor eax, eax
inc eax
cmp eax, 0
je 0x50f0e3
push dword [ebp + 0x20]
push dword [ebp + 0x18]
push dword [ebp + 0xc]
call fcn.0050ecd8
mov eax, dword [ebp - 0x2c]
sub eax, 1
jg 0x50f09e
mov eax, 3
cmp eax, 0
jle 0x50f153
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x18]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 0x14]
cmp eax, edx
jae 0x50f14b
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
and eax, 0xff
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
cmp eax, 0xb
je 0x50f134
mov eax, dword [ebp - 0x20]
cmp eax, 0xc
je 0x50f134
xor eax, eax
jmp 0x50f137
xor eax, eax
inc eax
cmp eax, 0
je 0x50f146
mov eax, dword [ebp - 0x18]
mov dword [ebp + 0x18], eax
jmp 0x50f14b
jmp 0x50f153
mov eax, dword [ebp - 0x30]
sub eax, 1
jg 0x50f0f7
mov eax, 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov eax, dword [ebp + 0x18]
mov dword [ebp + 0x10], eax
jmp 0x50f1d6
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
and eax, 0xff
cmp eax, 0xf
jne 0x50f189
push dword [ebp + 0x18]
call fcn.0044bca0
jmp 0x50f18c
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
and eax, 0xff
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
cmp eax, 0x27
jne 0x50f1ad
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
cmp eax, 0x27
je 0x50f1c5
mov eax, dword [ebp - 0x20]
cmp eax, 0xc
je 0x50f1c5
xor eax, eax
jmp 0x50f1c8
xor eax, eax
inc eax
xor al, 1
cmp eax, 0
je 0x50f1d6
jmp 0x50f1eb
mov eax, dword [ebp + 0x18]
add eax, 0x10
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
cmp eax, edx
jb 0x50f16e
mov eax, dword [ebp - 0x24]
cmp eax, 2
jge 0x50f203
push dword [ebp + 0x20]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0050ecd8
mov eax, dword [ebp + 0x1c]
mov edx, dword [0x549c10]
cmp eax, edx
sete al
xor ah, ah
cwde
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x14]
push 0xffffffffffffffff
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
push eax
call fcn.0044b2fa
push eax
push dword [ebp + 8]
call fcn.00507bbe
mov eax, dword [ebp + 0x18]
sub eax, 0x10
leave
ret 0x1c