Function at 0x5cf382
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov edx, ecx
and dword [ebp - 0x1c], 0
mov eax, dword [eax + 0x18]
and edx, 0xf
sub ecx, edx
mov dword [ebp - 0x24], 1
inc ecx
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x34], ecx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], eax
jbe 0x5cf684
push ebx
push esi
push edi
mov eax, dword [ebp + 0x18]
and byte [ebp + 0x13], 0
and dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0x1d
mov ecx, dword [eax + 0x24]
mov ebx, dword [eax + 0x10]
mov eax, dword [ebp - 0x1c]
mov edx, ecx
imul edx, eax
add edx, ebx
dec eax
mov edi, eax
mov dword [ebp - 0x18], edx
imul edi, ecx
lea esi, [eax - 1]
add edi, ebx
imul esi, ecx
mov cl, byte [edi]
add esi, ebx
shr cl, 1
and cl, 0x70
mov dword [ebp - 0x20], eax
movzx cx, cl
mov word [ebp - 0x14], cx
mov cl, byte [esi]
and cl, 0xc0
movzx bx, cl
shl ebx, 5
cmp byte [ebp + 0x14], 0
je 0x5cf441
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 8]
add eax, 0x9b25
push eax
mov eax, dword [ebp - 0x2c]
add eax, 0x9b25
push eax
call fcn.005cec4a
mov edx, dword [ebp - 0x18]
movzx eax, al
xor dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x24], 0
jne 0x5cf46b
mov edx, dword [ebp + 0x18]
mov ecx, dword [edx + 0x24]
mov edx, dword [edx + 0x10]
push ecx
imul eax, ecx
imul ecx, dword [ebp - 0x1c]
add eax, edx
add ecx, edx
push eax
push ecx
call fcn.005be4a1
add esp, 0xc
jmp 0x5cf672
movzx eax, byte [edi]
movzx ecx, byte [edi + 1]
shl eax, 0x18
inc edi
push 1
shl ecx, 0x10
or eax, ecx
inc edi
xor ecx, ecx
mov ch, byte [edi]
or eax, ecx
inc edi
movzx ecx, byte [edi]
or eax, ecx
inc edi
movzx ecx, byte [esi]
shl ecx, 0x18
inc esi
mov dword [ebp - 8], eax
movzx eax, byte [esi]
shl eax, 0x10
or ecx, eax
inc esi
xor eax, eax
mov ah, byte [esi]
or ecx, eax
inc esi
movzx eax, byte [esi]
or ecx, eax
pop eax
inc esi
cmp dword [ebp - 0x34], eax
mov dword [ebp - 4], ecx
mov dword [ebp - 0x20], eax
jbe 0x5cf5d8
xor eax, eax
jmp 0x5cf4c2
mov ecx, dword [ebp - 4]
mov edx, ecx
mov ecx, dword [ebp - 0x10]
shr edx, cl
and eax, 0xffef
and edx, 1
shl edx, 0xa
or ebx, edx
dec ecx
and ebx, 0xfff7
and ecx, 0x1f
shl ebx, 1
or ebx, eax
mov eax, dword [ebp - 8]
shr eax, cl
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x14]
and ecx, 0xfbff
and eax, 1
shl eax, 3
or eax, ecx
shl eax, 1
mov dword [ebp - 0x14], eax
movzx eax, ax
movzx ecx, bx
or eax, ecx
mov ecx, dword [ebp - 0x28]
add ecx, eax
push ecx
mov ecx, dword [ebp - 0x2c]
add eax, ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.005cec4a
mov ecx, dword [ebp - 0xc]
mov byte [ebp + 0x13], al
movzx ax, al
add ecx, ecx
or ecx, eax
test byte [ebp - 0x20], 0xf
mov dword [ebp - 0xc], ecx
jne 0x5cf5c3
mov ecx, dword [ebp - 0x18]
xor edx, edx
mov dl, byte [ebp - 0xb]
mov byte [ecx], dl
mov dl, byte [ebp - 0xc]
and dword [ebp - 0xc], 0
inc ecx
mov byte [ecx], dl
inc ecx
cmp dword [ebp - 0x10], 0x10
mov dword [ebp - 0x18], ecx
jge 0x5cf593
movzx ecx, byte [edi]
mov edx, dword [ebp - 8]
shl ecx, 0x18
and edx, 0xffff
or ecx, edx
inc edi
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
movzx ecx, byte [edi]
shl ecx, 0x10
or dword [ebp - 8], ecx
and edx, 0xffff
movzx ecx, byte [esi]
shl ecx, 0x18
inc edi
or ecx, edx
inc esi
mov dword [ebp - 4], ecx
movzx ecx, byte [esi]
shl ecx, 0x10
jmp 0x5cf5bf
mov edx, dword [ebp - 8]
xor ecx, ecx
mov ch, byte [edi]
and dx, 0
or ecx, edx
inc edi
mov edx, dword [ebp - 4]
mov dword [ebp - 8], ecx
movzx ecx, byte [edi]
or dword [ebp - 8], ecx
xor ecx, ecx
mov ch, byte [esi]
and dx, 0
inc edi
or ecx, edx
inc esi
mov dword [ebp - 4], ecx
movzx ecx, byte [esi]
or dword [ebp - 4], ecx
inc esi
inc dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 0x34]
jb 0x5cf4bf
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 0x30]
test esi, esi
jbe 0x5cf659
movzx ax, byte [ebp + 0x13]
jmp 0x5cf5e9
mov ecx, dword [ebp - 4]
mov edx, ecx
mov ecx, dword [ebp - 0x10]
shr edx, cl
and eax, 0xffef
and edx, 1
shl edx, 0xa
or ebx, edx
dec ecx
and ebx, 0xfff7
and ecx, 0x1f
shl ebx, 1
or ebx, eax
mov eax, dword [ebp - 8]
shr eax, cl
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x14]
and ecx, 0xfbff
and eax, 1
shl eax, 3
or eax, ecx
shl eax, 1
mov dword [ebp - 0x14], eax
movzx eax, ax
movzx ecx, bx
or eax, ecx
mov ecx, dword [ebp - 0x28]
add ecx, eax
push ecx
mov ecx, dword [ebp - 0x2c]
add eax, ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.005cec4a
mov ecx, dword [ebp - 0xc]
movzx ax, al
add ecx, ecx
or ecx, eax
dec esi
mov dword [ebp - 0xc], ecx
jne 0x5cf5e6
mov edx, dword [ebp - 0x18]
cmp dword [ebp - 0x30], 0
je 0x5cf672
mov eax, dword [ebp - 0xc]
mov cl, 0x10
sub cl, byte [ebp - 0x30]
shl eax, cl
xor ecx, ecx
mov cl, ah
mov byte [edx], cl
mov byte [edx + 1], al
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 0xc]
jb 0x5cf3c2
pop edi
pop esi
pop ebx
xor eax, eax
leave
ret