Function at 0x4cf100
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push edi
mov edi, ecx
mov eax, dword [edi + 0xc]
movzx ecx, word [eax + 0xe]
imul ecx, dword [eax + 4]
add ecx, 0x1f
sar ecx, 3
and ecx, 0xfffffffc
mov dword [ebp - 0x20], ecx
test eax, eax
je 0x4cf129
mov eax, dword [eax + 8]
jmp 0x4cf12b
xor eax, eax
cdq
xor eax, edx
sub eax, edx
imul eax, ecx
push eax
push dword [edi]
push eax
call fcn.005ad9be
add esp, 4
push eax
call fcn.0058bd80
add esp, 0xc
mov dword [edi + 4], eax
test eax, eax
jne 0x4cf156
pop edi
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [edi + 0xc]
xor edx, edx
mov dword [ebp - 0x1c], edx
cmp dword [ecx + 8], edx
jle 0x4cf314
push ebx
xor ebx, ebx
push esi
mov dword [ebp - 4], ebx
nop
cmp dword [ecx + 4], 0
mov eax, ecx
mov dword [ebp - 0x18], 0
jle 0x4cf2fd
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov eax, dword [edi]
lea esi, [ebx + ecx]
mov cl, byte [esi + eax]
mov dl, byte [esi + eax + 1]
mov bl, byte [esi + eax + 2]
mov byte [ebp - 8], cl
movzx ecx, cl
shl ecx, 8
movzx eax, dl
or ecx, eax
mov byte [ebp - 0xc], dl
shl ecx, 8
movzx eax, bl
or ecx, eax
mov byte [ebp - 0x10], bl
je 0x4cf2db
cmp ecx, 0xffffff
je 0x4cf2db
cmp ecx, dword [edi + 0x38]
je 0x4cf2db
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.004d0ae0
movsd xmm5, qword [edi + 0x28]
add esp, 0x18
movsd xmm1, qword [edi + 0x30]
movaps xmm2, xmm5
movsd xmm0, qword [0x64aad0]
addsd xmm2, xmm1
subsd xmm1, xmm5
movsd xmm3, qword [0x64aaf8]
mulsd xmm2, xmm0
mulsd xmm1, xmm0
movaps xmm0, xmm2
subsd xmm0, qword [ebp + 0x18]
mulsd xmm0, qword [0x64aab8]
subsd xmm2, xmm0
movaps xmm0, xmm1
addsd xmm0, xmm2
comisd xmm0, xmm3
ja 0x4cf252
subsd xmm2, xmm1
xorps xmm4, xmm4
comisd xmm4, xmm2
jbe 0x4cf25d
comisd xmm0, xmm3
ja 0x4cf252
xorps xmm2, xmm2
jmp 0x4cf25d
addsd xmm1, xmm1
movaps xmm2, xmm3
subsd xmm2, xmm1
movsd xmm1, qword [ebp - 0x30]
lea eax, [ebp - 8]
movsd xmm0, qword [ebp - 0x28]
subsd xmm1, xmm5
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
sub esp, 0x18
addsd xmm1, xmm2
movsd qword [esp + 0x10], xmm0
movaps xmm0, xmm3
minsd xmm0, xmm1
xorps xmm1, xmm1
maxsd xmm1, xmm0
movsd xmm0, qword [ebp + 8]
movsd qword [esp + 8], xmm1
movsd qword [esp], xmm0
call fcn.004cfdd0
mov esi, dword [ebp - 0x14]
add esp, 0x24
mov ebx, dword [ebp - 4]
mov ecx, dword [edi + 4]
movzx eax, byte [ebp - 8]
lea edx, [ebx + esi]
mov byte [edx + ecx], al
lea edx, [ebx + esi]
mov ecx, dword [edi + 4]
movzx eax, byte [ebp - 0xc]
mov byte [edx + ecx + 1], al
lea edx, [ebx + esi]
mov ecx, dword [edi + 4]
movzx eax, byte [ebp - 0x10]
mov byte [edx + ecx + 2], al
jmp 0x4cf2de
mov ebx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
mov eax, dword [edi + 0xc]
inc edx
mov ecx, dword [ebp - 0x14]
add ecx, 3
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], ecx
cmp edx, dword [eax + 4]
jl 0x4cf188
mov edx, dword [ebp - 0x1c]
add ebx, dword [ebp - 0x20]
inc edx
mov ecx, eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 4], ebx
cmp edx, dword [eax + 8]
jl 0x4cf170
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret 0x18