Function at 0x90a1ac6
Capabilities:
Encrypt data using rc4 ksa

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, 0x8a8
mov eax, dword [0x90e6610]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebx + 8]
mov dword [ebp - 0x874], ecx
mov ecx, 0x8000
movzx eax, word [edi + 2]
sub ecx, eax
movzx eax, word [edi + 4]
sub eax, 0x4000
shl eax, 0xf
cdq
idiv ecx
mov esi, eax
movzx eax, word [edi + 6]
mov edi, 0x4000
sub eax, edi
shl eax, 0xf
cdq
idiv ecx
cmp esi, edi
mov ecx, edi
mov edx, eax
cmovl ecx, esi
mov esi, 0xffffc000
cmp ecx, esi
mov eax, esi
cmovg eax, ecx
cmp edx, edi
mov dword [ebp - 0x86c], eax
mov eax, edi
cmovl eax, edx
cmp eax, esi
cmovg esi, eax
xor edi, edi
mov edx, edi
imul eax, edx, 0x101
mov ecx, 0x8000
inc eax
shr eax, 1
movzx eax, ax
sub ecx, eax
mov word [ebp + edx*8 - 0x806], ax
mov eax, ecx
imul ecx, esi
imul eax, dword [ebp - 0x86c]
sar ecx, 0xf
sar eax, 0xf
add ecx, 0x4000
add eax, 0x4000
mov word [ebp + edx*8 - 0x802], cx
mov word [ebp + edx*8 - 0x804], ax
mov ecx, 0x100
inc edx
cmp edx, ecx
jb 0x90a1b4e
push edi
mov eax, 0x504c4142
push eax
push eax
push ecx
mov ecx, dword [ebp - 0x874]
lea eax, [ebp - 0x808]
push eax
push eax
call fcn.0900bf19
movzx edx, word [ebp - 0xe]
movzx eax, word [ebp - 0x806]
mov dword [ebp - 0x86c], edx
cmp edx, eax
jbe 0x90a204b
mov eax, 0xfe
movzx ecx, word [ebp + eax*8 - 0x7fe]
cmp word [ebp + eax*8 - 0x806], cx
jbe 0x90a1bf4
mov word [ebp + eax*8 - 0x806], cx
sub eax, 1
jns 0x90a1bda
movzx esi, word [ebp - 0x806]
xor ecx, ecx
inc ecx
cmp dword [ebx + 0xc], ecx
jne 0x90a1c93
mov eax, edx
mov ecx, esi
sub eax, esi
mov esi, edi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x90d6748]
cvttsd2si eax, xmm0
sub ecx, eax
mov dword [ebp - 0x874], ecx
imul eax, esi, 0x101
inc eax
shr eax, 1
movzx eax, ax
cmp eax, ecx
jle 0x90a1c5c
movzx ecx, word [ebp + esi*8 - 0x806]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x51e
jg 0x90a1c71
mov ecx, dword [ebp - 0x874]
inc esi
cmp esi, 0x100
jb 0x90a1c30
mov eax, dword [ebx + 8]
mov ax, word [eax + 2]
jmp 0x90a204d
movsd xmm7, qword [0x90beb80]
xor ecx, ecx
movsd xmm6, qword [0x90b4780]
inc ecx
mov edx, dword [ebp - 0x86c]
movzx esi, word [ebp - 0x806]
jmp 0x90a1ca3
movsd xmm7, qword [0x90d6740]
movsd xmm6, qword [0x90bebd8]
movsd xmm1, qword [0x90b4788]
xorps xmm0, xmm0
sub edx, esi
movsd qword [ebp - 0x8a0], xmm0
movsd qword [ebp - 0x8a8], xmm0
movsd qword [ebp - 0x870], xmm0
movsd qword [ebp - 0x878], xmm0
movsd qword [ebp - 0x898], xmm0
movsd qword [ebp - 0x890], xmm0
movsd qword [ebp - 0x888], xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movsd qword [ebp - 0x880], xmm1
movzx eax, word [ebp + ecx*8 - 0x806]
sub eax, esi
movd xmm5, eax
cvtdq2pd xmm5, xmm5
mulsd xmm5, xmm1
comisd xmm5, xmm7
jb 0x90a1de3
comisd xmm6, xmm5
jbe 0x90a1de3
movd xmm4, ecx
mov eax, ecx
cvtdq2pd xmm4, xmm4
shr eax, 0x1f
inc edi
addsd xmm4, qword [eax*8 + 0x90befa0]
mulsd xmm4, qword [0x90beae0]
movaps xmm1, xmm4
movaps xmm0, xmm4
addsd xmm0, qword [ebp - 0x8a0]
mulsd xmm1, xmm4
movaps xmm3, xmm4
mulsd xmm3, xmm5
addsd xmm5, qword [ebp - 0x898]
movaps xmm2, xmm1
movsd qword [ebp - 0x8a0], xmm0
addsd xmm1, qword [ebp - 0x8a8]
mulsd xmm2, xmm4
movsd qword [ebp - 0x898], xmm5
movsd qword [ebp - 0x8a8], xmm1
movsd xmm1, qword [ebp - 0x880]
movaps xmm0, xmm2
addsd xmm0, qword [ebp - 0x870]
mulsd xmm2, xmm4
movsd qword [ebp - 0x870], xmm0
movaps xmm0, xmm3
addsd xmm2, qword [ebp - 0x878]
addsd xmm0, qword [ebp - 0x890]
mulsd xmm3, xmm4
movsd qword [ebp - 0x878], xmm2
movsd qword [ebp - 0x890], xmm0
addsd xmm3, qword [ebp - 0x888]
movsd qword [ebp - 0x888], xmm3
inc ecx
cmp ecx, 0xfe
jbe 0x90a1cfc
cmp edi, 3
jb 0x90a204b
lea ecx, [ebp - 0x868]
call fcn.090073d9
movsd xmm0, qword [ebp - 0x878]
lea ecx, [ebp - 0x868]
movsd xmm1, qword [ebp - 0x870]
movsd qword [ebp - 0x868], xmm0
movsd xmm0, qword [ebp - 0x8a8]
movsd qword [ebp - 0x858], xmm0
movsd qword [ebp - 0x840], xmm0
movsd qword [ebp - 0x828], xmm0
movd xmm0, edi
cvtdq2pd xmm0, xmm0
shr edi, 0x1f
movsd qword [ebp - 0x860], xmm1
addsd xmm0, qword [edi*8 + 0x90befa0]
movsd qword [ebp - 0x848], xmm1
movsd xmm1, qword [ebp - 0x8a0]
movsd qword [ebp - 0x838], xmm1
movsd qword [ebp - 0x820], xmm1
movsd qword [ebp - 0x818], xmm0
call fcn.0900bf19
test al, al
je 0x90a204b
movsd xmm5, qword [ebp - 0x888]
movsd xmm4, qword [ebp - 0x890]
movsd xmm0, qword [ebp - 0x860]
movsd xmm2, qword [ebp - 0x868]
movsd xmm3, qword [ebp - 0x898]
movsd xmm1, qword [ebp - 0x848]
mulsd xmm0, xmm4
push ecx
mulsd xmm2, xmm5
push ecx
mulsd xmm1, xmm5
addsd xmm2, xmm0
movsd xmm0, qword [ebp - 0x858]
mulsd xmm0, xmm3
addsd xmm2, xmm0
movsd xmm0, qword [ebp - 0x840]
mulsd xmm0, xmm4
movsd qword [ebp - 0x888], xmm2
addsd xmm1, xmm0
movsd qword [esp], xmm2
movsd xmm0, qword [ebp - 0x838]
mulsd xmm0, xmm3
addsd xmm1, xmm0
movsd xmm0, qword [ebp - 0x820]
mulsd xmm0, xmm4
movsd qword [ebp - 0x898], xmm1
movsd qword [ebp - 0x8a0], xmm1
movsd xmm1, qword [ebp - 0x828]
mulsd xmm1, xmm5
addsd xmm1, xmm0
movsd xmm0, qword [ebp - 0x818]
mulsd xmm0, xmm3
addsd xmm1, xmm0
movsd qword [ebp - 0x890], xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll_fabs
movsd xmm0, qword [0x90bfba8]
movsd xmm1, qword [ebp - 0x898]
fstp qword [ebp - 0x880]
comisd xmm0, xmmword [ebp - 0x880]
pop ecx
pop ecx
jb 0x90a1f9c
comisd xmm0, xmm1
jae 0x90a204b
movsd xmm2, qword [ebp - 0x890]
divsd xmm2, xmm1
xorps xmm2, xmmword [0x90befc0]
jmp 0x90a2005
movsd xmm0, qword [ebp - 0x888]
mulsd xmm0, qword [0x90bfce0]
mulsd xmm1, xmm1
mulsd xmm0, qword [ebp - 0x890]
subsd xmm1, xmm0
xorps xmm0, xmm0
comisd xmm0, xmm1
jae 0x90a204b
push ecx
push ecx
movsd qword [esp], xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll_sqrt
movsd xmm0, qword [ebp - 0x888]
fsub qword [ebp - 0x8a0]
pop ecx
pop ecx
addsd xmm0, xmm0
movsd qword [ebp - 0x880], xmm0
fdiv qword [ebp - 0x880]
fstp qword [ebp - 0x880]
movsd xmm2, qword [ebp - 0x880]
xorps xmm0, xmm0
xorps xmm3, xmm3
maxsd xmm0, xmm2
movsd xmm2, qword [0x90b4780]
movaps xmm1, xmm2
minsd xmm1, xmm0
mulsd xmm1, qword [0x90bee38]
movaps xmm0, xmm1
subsd xmm0, xmm2
comisd xmm3, xmm1
cvttsd2si ecx, xmm0
movaps xmm0, xmm1
addsd xmm0, xmm2
movzx ecx, cx
cvttsd2si eax, xmm0
movzx eax, ax
cmova eax, ecx
jmp 0x90a204d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.09001f80
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8