Function at 0x1006b7b4
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, esp
push ecx
push ecx
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x1010fa0c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebx + 0xc]
push edi
mov edi, ecx
mov dword [ebp - 0x38], edi
cmp esi, 3
jl 0x1006bb30
test byte [edi + 0x24], 2
mov eax, dword [edi + 0x28]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x18], ecx
mov ecx, edi
mov dword [ebp - 0x1c], eax
je 0x1006baa3
mov eax, dword [ebx + 0x10]
and eax, 0xffffff
mov dword [ebp - 0x40], eax
lea eax, [esi + esi]
push eax
mov dword [ebp - 0x24], eax
imul eax, esi, 9
sub eax, 6
push eax
call fcn.1006aa2f
mov eax, dword [edi + 0x30]
push 2
pop edx
mov dword [ebp - 0x2c], eax
lea ecx, [eax + 1]
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x44], ecx
movzx ecx, ax
mov eax, dword [edi + 0x38]
lea edx, [ecx + edx*2]
mov word [eax], cx
lea ecx, [edx - 2]
mov eax, dword [edi + 0x38]
mov word [eax + 2], cx
mov eax, dword [edi + 0x38]
mov word [eax + 4], dx
mov edx, dword [ebp - 0xc]
add dword [edi + 0x38], 6
inc edx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0xc], edx
cmp edx, esi
jl 0x1006b833
mov eax, esi
shl eax, 3
call fcn.1009e410
movss xmm4, dword [0x100fed9c]
lea ecx, [esi - 1]
xor edx, edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov eax, esp
mov edi, dword [ebp - 8]
shl ecx, 3
mov dword [ebp - 0x14], edx
mov edx, dword [ebx + 8]
mov dword [ebp - 0x28], ecx
movss xmm1, dword [edx + edi*8]
lea esi, [edx + 4]
movss xmm2, dword [edx + edi*8 + 4]
subss xmm1, dword [ecx + edx]
subss xmm2, dword [ecx + edx + 4]
mov dword [ebp - 8], esi
movaps xmm0, xmm1
movss dword [ebp - 0x30], xmm1
movaps xmm3, xmm2
mulss xmm0, xmm1
mulss xmm3, xmm2
movss dword [ebp - 0x20], xmm2
addss xmm3, xmm0
comiss xmm3, dword [0x100fecc4]
jbe 0x1006b900
cvtps2pd xmm0, xmm3
call sub.apI_mS_wIN_crT_matH_L1_1_0.DlL__libm_sse2_sqrt_precise
movss xmm4, dword [0x100fed9c]
mov eax, esp
movss xmm1, dword [ebp - 0x30]
movaps xmm3, xmm4
movss xmm2, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebx + 8]
cvtsd2ss xmm0, xmm0
divss xmm3, xmm0
jmp 0x1006b903
movaps xmm3, xmm4
mulss xmm1, xmm3
mulss xmm2, xmm3
xorps xmm1, xmmword [0x10100320]
movss dword [ecx + eax + 4], xmm1
movss dword [ecx + eax], xmm2
mov ecx, edi
shl ecx, 3
inc edi
mov dword [ebp - 0x28], ecx
cmp edi, dword [ebx + 0xc]
jl 0x1006b890
movss xmm5, dword [0x100fed6c]
mov ecx, eax
mov edi, dword [ebp - 0x38]
sub ecx, edx
mov edx, dword [ebp - 0xc]
xor esi, esi
mov dword [ebp - 0x20], ecx
movss xmm2, dword [eax + esi*8]
mov esi, dword [ebp - 8]
addss xmm2, dword [eax + edx*8]
movss xmm3, dword [ecx + esi]
addss xmm3, dword [eax + edx*8 + 4]
mov esi, dword [ebp - 0x14]
mulss xmm2, xmm5
mulss xmm3, xmm5
movaps xmm0, xmm2
mulss xmm0, xmm2
movaps xmm1, xmm3
mulss xmm1, xmm3
addss xmm1, xmm0
comiss xmm1, dword [0x100fece4]
jbe 0x1006b9a2
movaps xmm0, xmm4
divss xmm0, xmm1
movss xmm1, dword [0x100fee84]
minss xmm1, xmm0
movaps xmm0, xmm1
mulss xmm3, xmm1
mulss xmm2, xmm0
mov eax, dword [ebp - 8]
mov ecx, dword [edi + 0x34]
mulss xmm2, xmm5
movss xmm0, dword [eax - 4]
mulss xmm3, xmm5
subss xmm0, xmm2
movss dword [ebp - 0x3c], xmm0
movss xmm0, dword [eax]
mov eax, dword [ebp - 0x3c]
subss xmm0, xmm3
mov dword [ecx], eax
movss dword [ebp - 0x38], xmm0
mov eax, dword [ebp - 0x38]
mov dword [ecx + 4], eax
mov eax, dword [edi + 0x34]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0xc], ecx
mov eax, dword [edi + 0x34]
mov ecx, dword [ebx + 0x10]
mov dword [eax + 0x10], ecx
mov ecx, dword [edi + 0x34]
mov eax, dword [ebp - 8]
add dword [ebp - 8], 8
addss xmm2, dword [eax - 4]
addss xmm3, dword [eax]
movss dword [ebp - 0x34], xmm2
mov eax, dword [ebp - 0x34]
mov dword [ecx + 0x14], eax
movss dword [ebp - 0x30], xmm3
mov eax, dword [ebp - 0x30]
mov dword [ecx + 0x18], eax
mov eax, dword [edi + 0x34]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0x1c], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x20], ecx
mov eax, dword [edi + 0x34]
mov ecx, dword [ebp - 0x40]
mov dword [eax + 0x24], ecx
mov eax, dword [ebp - 0x2c]
add dword [edi + 0x34], 0x28
movzx ecx, ax
mov eax, dword [edi + 0x38]
lea esi, [ecx + esi*2]
mov word [eax], si
lea ecx, [ecx + edx*2]
mov eax, dword [edi + 0x38]
mov word [eax + 2], cx
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0xc]
movzx edx, ax
mov eax, dword [edi + 0x38]
lea ecx, [edx + ecx*2]
mov word [eax + 4], cx
mov eax, dword [edi + 0x38]
mov word [eax + 6], cx
mov eax, dword [ebp - 0x14]
lea ecx, [edx + eax*2]
mov eax, dword [edi + 0x38]
mov word [eax + 8], cx
mov eax, dword [edi + 0x38]
mov ecx, dword [ebp - 0x20]
mov word [eax + 0xa], si
mov eax, esp
mov esi, dword [ebp - 0x14]
mov edx, esi
add dword [edi + 0x38], 0xc
inc esi
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x14], esi
cmp esi, dword [ebx + 0xc]
jl 0x1006b946
mov eax, dword [ebp - 0x24]
movzx eax, ax
jmp 0x1006bb2d
lea eax, [esi - 2]
imul eax, eax, 3
push esi
push eax
call fcn.1006aa2f
mov edx, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
mov ecx, dword [edi + 0x34]
mov eax, dword [edx]
lea edx, [edx + 8]
mov dword [ecx], eax
mov eax, dword [edx - 4]
mov dword [ecx + 4], eax
mov eax, dword [edi + 0x34]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0xc], ecx
mov eax, dword [edi + 0x34]
mov ecx, dword [ebx + 0x10]
mov dword [eax + 0x10], ecx
add dword [edi + 0x34], 0x14
sub esi, 1
jne 0x1006bab6
mov esi, dword [ebx + 0xc]
push 2
pop edx
mov dword [ebp - 0x10], edx
mov ecx, dword [edi + 0x38]
mov ax, word [edi + 0x30]
movzx edx, dx
mov word [ecx], ax
mov cx, word [edi + 0x30]
mov eax, dword [edi + 0x38]
dec cx
add cx, dx
mov word [eax + 2], cx
mov eax, dword [edi + 0x38]
mov cx, word [edi + 0x30]
add cx, dx
mov edx, dword [ebp - 0x10]
mov word [eax + 4], cx
add dword [edi + 0x38], 6
inc edx
mov dword [ebp - 0x10], edx
cmp edx, esi
jl 0x1006baf0
movzx eax, si
add dword [edi + 0x30], eax
lea esp, [ebp - 0x50]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1009ce88
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc