Function at 0x5f0920
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 4], edx
mov edx, 1
push ebx
push esi
lea ecx, [ecx + eax*2]
xor esi, esi
add ecx, 2
mov dword [ebp - 0x18], ecx
lea ecx, [eax + 1]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 0xc]
mov eax, ecx
shl edx, cl
xor ecx, ecx
bts ecx, eax
mov dword [ebp - 0x14], edx
push edi
lea ebx, [edx - 1]
xor edx, edx
cmp eax, 0x20
mov dword [ebp - 8], ebx
mov edi, ebx
mov ebx, dword [ebp + 8]
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
cmovae edx, ecx
lea eax, [ebx*2 + 2]
add eax, ecx
mov ebx, edi
adc esi, edx
add eax, 8
adc esi, 0
test esi, esi
jb 0x5f099f
ja 0x5f0993
cmp eax, dword [ebp + 0x14]
jbe 0x5f099f
mov eax, 0xffffffd2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 0xff
ja 0x5f0993
mov eax, dword [ebp + 0xc]
cmp eax, 0xc
jbe 0x5f09bc
mov eax, 0xffffffd4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x10]
lea ecx, [eax - 1]
mov word [ebp + 8], ax
mov edx, 1
mov eax, edx
mov word [ebp + 0xa], dx
shl ax, cl
xor ecx, ecx
movzx eax, ax
mov dword [ebp - 0x24], eax
test esi, esi
je 0x5f0a37
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
add esi, 6
lea esi, [esi + edi*4]
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp + 0x10]
mov edx, dword [ebp - 0x1c]
sub esi, eax
mov dword [ebp + 0x14], esi
mov ebx, esi
lea esp, [esp]
movzx esi, word [eax]
cmp si, 0xffff
jne 0x5f0a16
mov byte [edx], cl
dec edi
sub edx, 4
mov esi, 1
jmp 0x5f0a25
cmp si, word [ebp - 0x24]
jl 0x5f0a25
xor ebx, ebx
mov word [ebp + 0xa], bx
mov ebx, dword [ebp + 0x14]
mov word [ebx + eax], si
inc ecx
mov esi, dword [ebp - 0x10]
add eax, 2
cmp ecx, esi
jb 0x5f0a00
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov dword [ecx], eax
mov eax, dword [ebp - 0x14]
mov ecx, eax
shr ecx, 3
shr eax, 1
cmp edi, ebx
jne 0x5f0b6a
add eax, 3
xor edi, edi
add eax, ecx
mov dword [ebp + 8], edi
mov dword [ebp - 0x1c], eax
xorps xmm0, xmm0
xor eax, eax
movlpd qword [ebp - 0x28], xmm0
test esi, esi
je 0x5f0adc
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x24]
mov dword [ebp + 0x14], ecx
jmp 0x5f0a80
movsx esi, word [edx + eax*2]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x24], esi
mov dword [edi + edx], ecx
mov dword [edi + edx + 4], ebx
mov edx, dword [ebp - 4]
cmp esi, 8
jle 0x5f0abf
add edi, dword [ebp - 0x18]
mov dword [edi + 8], ecx
lea ecx, [esi - 9]
shr ecx, 2
lea esi, [edi + 8]
mov dword [edi + 0xc], ebx
and ecx, 0x3ffffffe
add edi, 0x10
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp + 8]
add edi, esi
inc eax
add ecx, 0x1010101
mov dword [ebp + 8], edi
mov dword [ebp + 0x14], ecx
adc ebx, 0x1010101
cmp eax, dword [ebp - 0x10]
jb 0x5f0a80
mov ebx, dword [ebp - 8]
xor edx, edx
cmp dword [ebp - 0x14], edx
jbe 0x5f0b1e
mov esi, dword [ebp - 0x18]
mov edi, ebx
shr edi, 1
inc esi
inc edi
mov dword [ebp + 8], edi
nop
mov edi, dword [ebp - 0xc]
lea esi, [esi + 2]
movzx eax, byte [esi - 3]
mov ecx, edx
and ecx, ebx
mov byte [edi + ecx*4 + 6], al
mov ecx, dword [ebp - 0x1c]
movzx eax, byte [esi - 2]
add ecx, edx
and ecx, ebx
mov byte [edi + ecx*4 + 6], al
mov eax, dword [ebp - 0x1c]
lea edx, [edx + eax*2]
and edx, ebx
dec dword [ebp + 8]
jne 0x5f0af0
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x5f0b61
mov esi, dword [ebp - 0xc]
mov edi, ebx
add esi, 7
lea ecx, [ecx]
movzx eax, byte [esi - 1]
lea esi, [esi + 4]
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx + eax*2]
movzx eax, word [ecx]
mov edx, eax
inc eax
mov word [ecx], ax
mov cl, byte [ebp + 0xc]
bsr eax, edx
sub cl, al
mov dword [ebp + 8], eax
shl dx, cl
sub dx, bx
mov byte [esi - 4], cl
mov word [esi - 7], dx
dec edi
jne 0x5f0b30
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [eax + 3]
xor eax, eax
add edx, ecx
mov dword [ebp + 8], eax
test esi, esi
je 0x5f0b1e
mov ecx, dword [ebp - 4]
jmp 0x5f0b80
xor ebx, ebx
xor esi, esi
cmp bx, word [ecx]
jge 0x5f0bbb
lea esp, [esp]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
mov byte [ebx + eax*4 + 6], cl
add eax, edx
mov ebx, dword [ebp - 8]
and eax, ebx
mov ecx, dword [ebp - 4]
cmp eax, edi
jbe 0x5f0bb0
add eax, edx
and eax, ebx
cmp eax, edi
ja 0x5f0ba8
movsx ecx, word [ecx]
inc esi
cmp esi, ecx
jl 0x5f0b90
mov ecx, dword [ebp - 4]
mov esi, dword [ebp + 8]
add ecx, 2
inc esi
mov dword [ebp - 4], ecx
mov dword [ebp + 8], esi
cmp esi, dword [ebp - 0x10]
jb 0x5f0b80
test eax, eax
je 0x5f0b1e
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret