Function at 0x10018f90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x40
push esi
mov esi, edx
mov dword [ebp - 8], ecx
xor edx, edx
mov dword [ebp - 0x38], esi
push edi
mov dword [ebp - 4], edx
cmp dword [ebx + 0xc], edx
jle 0x10019277
mov edi, dword [ebx + 8]
mov eax, 0x100
add edi, 0x14
xorps xmm0, xmm0
mov dword [ebp - 0x10], edi
movss xmm1, dword [edi - 0x14]
comiss xmm1, xmm0
jbe 0x10019020
mov edi, dword [esi + 0x1c]
mov esi, dword [esi + 4]
cwde
movzx ecx, byte [edi + esi + 6]
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edi + esi + 7]
add cx, ax
mov eax, 0x100
movsx edx, cx
movzx ecx, byte [edi + esi + 4]
cwde
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edi + esi + 5]
mov edi, dword [ebp - 0x10]
add cx, ax
movsx eax, cx
sub eax, edx
movd xmm0, eax
jmp 0x10019040
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 4]
xorps xmm1, xmmword [0x10085930]
movzx ecx, byte [edx + eax + 0x12]
movzx eax, byte [edx + eax + 0x13]
shl ecx, 8
add ecx, eax
movd xmm0, ecx
mov ecx, dword [ebp - 8]
xor esi, esi
cvtdq2ps xmm0, xmm0
movzx eax, byte [ecx + 0x18]
mov byte [edi], al
movzx eax, byte [ecx + 0x1c]
divss xmm1, xmm0
mov byte [edi + 1], al
movss dword [ebp - 0x34], xmm1
cmp dword [edi - 8], esi
jle 0x10019259
mov eax, dword [ebp - 4]
mov ecx, dword [ebx + 0x10]
shl eax, 4
add ecx, 6
add eax, ecx
mov dword [ebp - 0xc], eax
mov edx, dword [edi - 0xc]
test edx, edx
jne 0x10019086
mov edx, dword [edi - 0x10]
add edx, esi
jmp 0x10019089
mov edx, dword [edx + esi*4]
mov ecx, dword [ebp - 0x38]
call fcn.10013b60
mov ecx, dword [ebp - 8]
mov edx, eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x24], 0
mov eax, dword [ecx + 0x18]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100858d0]
mov eax, dword [ecx + 0x1c]
mov ecx, dword [ebp - 0x38]
cvtpd2ps xmm0, xmm0
mulss xmm0, xmm1
movss dword [ebp - 0x1c], xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100858d0]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40]
push eax
cvtpd2ps xmm0, xmm0
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
mulss xmm0, xmm1
movss dword [ebp - 0x2c], xmm0
call fcn.10013f80
add esp, 0x10
test eax, eax
jne 0x1001911b
xor edi, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x2c], edi
jmp 0x10019206
xorps xmm0, xmm0
xorps xmm1, xmm1
cvtsi2ss xmm0, dword [ebp - 0x14]
sub esp, 8
mulss xmm0, dword [ebp - 0x1c]
addss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x18], xmm0
fld qword [ebp - 0x18]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
fstp qword [ebp - 0x18]
movsd xmm0, qword [ebp - 0x18]
xorps xmm1, xmm1
cvtsi2ss xmm1, dword [ebp - 0x3c]
cvtpd2ps xmm0, xmm0
mulss xmm1, dword [ebp - 0x2c]
cvttss2si edi, xmm0
xorps xmm0, xmm0
subss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x18], xmm0
fld qword [ebp - 0x18]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
fstp qword [ebp - 0x18]
movsd xmm0, qword [ebp - 0x18]
xorps xmm1, xmm1
cvtpd2ps xmm0, xmm0
cvttss2si eax, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, dword [ebp - 0x40]
mov dword [ebp - 0x14], eax
mulss xmm0, dword [ebp - 0x1c]
addss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x20], xmm0
fld qword [ebp - 0x20]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceil
fstp qword [ebp - 0x20]
movsd xmm0, qword [ebp - 0x20]
xorps xmm1, xmm1
cvtsi2ss xmm1, dword [ebp - 0x24]
cvtpd2ps xmm0, xmm0
mulss xmm1, dword [ebp - 0x2c]
cvttss2si eax, xmm0
xorps xmm0, xmm0
subss xmm0, xmm1
mov dword [ebp - 0x1c], eax
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x30], xmm0
fld qword [ebp - 0x30]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceil
fstp qword [ebp - 0x30]
movsd xmm0, qword [ebp - 0x30]
add esp, 8
cvtpd2ps xmm0, xmm0
cvttss2si eax, xmm0
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 8]
inc esi
movss xmm1, dword [ebp - 0x34]
movzx ecx, word [edx + 0x14]
mov eax, ecx
dec cx
sub eax, edi
mov edi, dword [ebp - 0xc]
dec ax
add ax, word [edx + 0x18]
add ax, word [ebp - 0x1c]
mov word [edi - 2], ax
mov ax, word [edx + 0x1c]
sub ax, word [ebp - 0x14]
mov edx, dword [ebp - 4]
add ax, cx
add ax, word [ebp - 0x2c]
mov ecx, edi
mov edi, dword [ebp - 0x10]
inc edx
mov dword [ebp - 4], edx
mov word [ecx], ax
add ecx, 0x10
mov dword [ebp - 0xc], ecx
cmp esi, dword [edi - 8]
jl 0x10019078
jmp 0x1001925c
mov edx, dword [ebp - 4]
mov esi, dword [ebp - 0x38]
add edi, 0x18
sub dword [ebx + 0xc], 1
xorps xmm0, xmm0
mov dword [ebp - 0x10], edi
mov eax, 0x100
jne 0x10018fd2
pop edi
mov eax, edx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret