Function at 0x10017e20
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, 0x48
push esi
xor eax, eax
mov esi, edx
push edi
mov edi, ecx
mov dword [ebp - 4], esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 8], eax
cmp dword [ebx + 0xc], eax
jle 0x1001813f
mov edx, dword [ebx + 8]
xorps xmm3, xmm3
add edx, 0x14
mov dword [ebp - 0x14], edx
nop
movss xmm1, dword [edx - 0x14]
mov eax, 0x100
comiss xmm1, xmm3
jbe 0x10017eb3
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 - 0x20]
add cx, ax
movsx eax, cx
sub eax, edx
movd xmm0, eax
jmp 0x10017ed3
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 4]
xorps xmm1, xmmword [0x100311a0]
movzx ecx, byte [edx + eax + 0x12]
movzx eax, byte [edx + eax + 0x13]
shl ecx, 8
add ecx, eax
movd xmm0, ecx
mov edx, dword [ebp - 0x14]
xor ecx, ecx
cvtdq2ps xmm0, xmm0
movzx eax, byte [edi + 0x18]
mov dword [ebp - 0x28], ecx
mov byte [edx], al
movzx eax, byte [edi + 0x1c]
mov byte [edx + 1], al
divss xmm1, xmm0
mov eax, dword [ebp - 8]
movss dword [ebp - 0x1c], xmm1
cmp dword [edx - 8], ecx
jle 0x1001812c
mov esi, dword [ebx + 0x10]
add esi, 6
shl eax, 4
add eax, esi
mov esi, dword [ebp - 4]
mov dword [ebp - 0x24], eax
mov eax, dword [edx - 0xc]
test eax, eax
jne 0x10017f1f
mov edx, dword [edx - 0x10]
add edx, ecx
jmp 0x10017f22
mov edx, dword [eax + ecx*4]
mov ecx, esi
call fcn.10014400
mov esi, dword [edi + 0x18]
mov edx, eax
mov eax, esi
mov ecx, dword [ebp - 4]
shr eax, 0x1f
mov dword [ebp - 0x3c], esi
movd xmm0, esi
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x10031180]
mov eax, dword [edi + 0x1c]
cvtpd2ps xmm2, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
mulss xmm2, xmm1
addsd xmm0, qword [eax*8 + 0x10031180]
movss dword [ebp - 0x2c], xmm2
cvtpd2ps xmm0, xmm0
mulss xmm0, xmm1
movss dword [ebp - 0x18], xmm0
call fcn.10014760
mov dword [ebp - 0xc], eax
test eax, eax
jns 0x10017f95
xor eax, eax
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x18], eax
jmp 0x100180e3
mov edi, dword [ebp - 0xc]
sub esp, 8
mov eax, dword [ebp - 4]
mov esi, dword [eax + 4]
mov eax, 0x100
cwde
movzx ecx, byte [edi + esi + 2]
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edi + esi + 3]
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]
movd xmm0, edx
cvtdq2ps xmm0, xmm0
add cx, ax
movsx eax, cx
movzx ecx, byte [edi + esi + 6]
mov dword [ebp - 0x34], eax
mov eax, 0x100
cwde
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edi + esi + 7]
mulss xmm0, xmm2
add cx, ax
mov eax, dword [ebp - 0xc]
movsx edi, cx
addss xmm0, xmm3
movzx ecx, byte [eax + esi + 8]
mov eax, 0x100
cwde
movsx ecx, cx
cvtps2pd xmm0, xmm0
imul ecx, eax
mov eax, dword [ebp - 0xc]
movsd qword [ebp - 0x10], xmm0
fld qword [ebp - 0x10]
fstp qword [esp]
movzx eax, byte [eax + esi + 9]
add cx, ax
movsx esi, cx
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
movd xmm1, esi
xorps xmm0, xmm0
cvtdq2ps xmm1, xmm1
fstp qword [ebp - 0x48]
mulss xmm1, dword [ebp - 0x18]
subss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x10], xmm0
fld qword [ebp - 0x10]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
movd xmm0, edi
xorps xmm1, xmm1
cvtdq2ps xmm0, xmm0
fstp qword [ebp - 0x10]
mulss xmm0, dword [ebp - 0x2c]
addss xmm0, xmm1
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
movd xmm1, dword [ebp - 0x34]
xorps xmm0, xmm0
cvtdq2ps xmm1, xmm1
fstp qword [ebp - 0x30]
mulss xmm1, dword [ebp - 0x18]
subss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x38], xmm0
fld qword [ebp - 0x38]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceil
movss xmm1, dword [ebp - 0x1c]
add esp, 8
mov esi, dword [ebp - 0x3c]
xorps xmm3, xmm3
mov edi, dword [ebp - 0x20]
cvttsd2si edx, qword [ebp - 0x10]
cvttsd2si ecx, qword [ebp - 0x30]
fstp qword [ebp - 0x38]
cvttsd2si eax, qword [ebp - 0x38]
mov dword [ebp - 0x18], eax
cvttsd2si eax, qword [ebp - 0x48]
sub esi, eax
dec cx
add si, word [edi + 0x14]
add si, cx
mov ecx, dword [ebp - 0x24]
mov word [ecx - 2], si
mov ax, word [edi + 0x1c]
mov esi, dword [ebp - 4]
sub ax, dx
mov edx, dword [ebp - 0x14]
dec ax
add ax, word [edi + 0x14]
add ax, word [ebp - 0x18]
mov word [ecx], ax
add ecx, 0x10
mov eax, dword [ebp - 8]
mov dword [ebp - 0x24], ecx
inc eax
mov ecx, dword [ebp - 0x28]
inc ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0x28], ecx
cmp ecx, dword [edx - 8]
jl 0x10017f11
mov esi, dword [ebp - 4]
add edx, 0x18
sub dword [ebx + 0xc], 1
mov dword [ebp - 0x14], edx
jne 0x10017e60
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret