Function at 0x5d7870
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, 0x1034
call fcn.00650b20
mov eax, dword [0x748068]
xor eax, esp
mov dword [esp + 0x1030], eax
push ebx
push esi
mov esi, ecx
cvttss2si ecx, xmm1
push edi
mov dword [esp + 0x34], esi
mov dword [esi], ecx
test ecx, ecx
jg 0x5d78c1
mov eax, VariantInit
imul ecx
add edx, ecx
sar edx, 0x1e
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x7ffffffe
sub eax, ecx
lea ecx, [eax + 1]
mov dword [esi], ecx
cmp ecx, 0x7ffffffe
jle 0x5d78cf
mov dword [esi], SysReAllocString
lea eax, [esi + 0x104]
mov dword [esp + 0x18], 4
lea edi, [esi + 4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], edi
mov ebx, eax
nop word [eax + eax]
xor eax, eax
mov dword [esp + 0x1c], eax
mov byte [edi + eax], al
mov ecx, 0x1f31d
mov eax, dword [esi]
cdq
idiv ecx
imul eax, eax, 0xb14
imul ecx, edx, 0x41a7
sub ecx, eax
test ecx, ecx
lea eax, [ecx + 0x7fffffff]
cmovg eax, ecx
mov dword [esi], eax
and eax, 0x800001ff
jns 0x5d792c
dec eax
or eax, 0xfffffe00
inc eax
mov word [ebx], ax
mov ecx, 0x1f31d
mov eax, dword [esi]
cdq
idiv ecx
imul eax, eax, 0xb14
imul ecx, edx, 0x41a7
sub ecx, eax
test ecx, ecx
lea eax, [ecx + 0x7fffffff]
cmovg eax, ecx
mov dword [esi], eax
and eax, 0x800001ff
jns 0x5d7962
dec eax
or eax, 0xfffffe00
inc eax
mov word [ebx + 2], ax
add ebx, 4
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, 0x100
jl 0x5d78f6
sub dword [esp + 0x18], 1
jne 0x5d78f0
lea ecx, [esi + 0x103]
mov dword [esp + 0x1c], 0xff
mov dword [esp + 0x18], ecx
nop word [eax + eax]
mov bl, byte [ecx]
mov ecx, 0x1f31d
mov eax, dword [esi]
cdq
idiv ecx
imul ecx, edx, 0x41a7
imul eax, eax, 0xb14
sub ecx, eax
test ecx, ecx
lea edx, [ecx + 0x7fffffff]
cmovg edx, ecx
mov dword [esi], edx
and edx, 0x800000ff
jns 0x5d79d7
dec edx
or edx, 0xffffff00
inc edx
mov ecx, dword [esp + 0x18]
mov al, byte [edi + edx]
mov byte [ecx], al
dec ecx
sub dword [esp + 0x1c], 1
mov byte [edi + edx], bl
mov dword [esp + 0x18], ecx
jne 0x5d79a0
lea eax, [esp + 0x334]
xor edx, edx
sub eax, esi
lea ecx, [esi + 0x504]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x336]
mov ebx, dword [esp + 0x18]
sub eax, esi
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x734]
mov edi, dword [esp + 0x1c]
sub eax, esi
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x736]
sub eax, esi
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
nop word [eax + eax]
movzx eax, word [ecx - 0x400]
lea ecx, [ecx + 4]
mov word [esp + edx*4 + 0x38], ax
movzx eax, word [ecx - 0x402]
mov word [esp + edx*4 + 0x3a], ax
movzx eax, word [ecx - 4]
mov word [esp + edx*4 + 0x438], ax
movzx eax, word [ecx - 2]
mov word [esp + edx*4 + 0x43a], ax
inc edx
movzx eax, word [ecx + 0x3fc]
mov word [ebx + ecx - 4], ax
movzx eax, word [ecx + 0x3fe]
mov ebx, dword [esp + 0x30]
mov word [edi + ecx - 4], ax
movzx eax, word [ecx + 0x7fc]
mov word [esi + ecx - 4], ax
movzx eax, word [ecx + 0x7fe]
mov word [ebx + ecx - 4], ax
mov ebx, dword [esp + 0x18]
cmp edx, 0x100
jl 0x5d7a40
mov esi, dword [esp + 0x34]
xor ecx, ecx
mov edi, dword [esp + 0x28]
mov edx, 0x100
movzx eax, byte [edi]
lea edi, [edi + 1]
lea ecx, [ecx + 4]
movzx eax, word [esp + eax*4 + 0x38]
mov word [ecx + esi + 0x100], ax
movzx eax, byte [edi - 1]
movzx eax, word [esp + eax*4 + 0x3a]
mov word [ecx + esi + 0x102], ax
movzx eax, byte [edi - 1]
movzx eax, word [esp + eax*4 + 0x438]
mov word [ecx + esi + 0x500], ax
movzx eax, byte [edi - 1]
movzx eax, word [esp + eax*4 + 0x43a]
mov word [ecx + esi + 0x502], ax
movzx eax, byte [edi - 1]
movzx eax, word [esp + eax*4 + 0x838]
mov word [ecx + esi + 0x900], ax
movzx eax, byte [edi - 1]
movzx eax, word [esp + eax*4 + 0x83a]
mov word [ecx + esi + 0x902], ax
movzx eax, byte [edi - 1]
movzx eax, word [esp + eax*4 + 0xc38]
mov word [ecx + esi + 0xd00], ax
movzx eax, byte [edi - 1]
movzx eax, word [esp + eax*4 + 0xc3a]
mov word [ecx + esi + 0xd02], ax
sub edx, 1
jne 0x5d7ac3
movss xmm0, dword [0x6f2a64]
add esi, 0x1104
mov ebx, dword [esp + 0x20]
xorps xmm5, xmm5
mov dword [esp + 0x18], 4
nop dword [eax + eax]
mov edi, 0x100
nop word [eax + eax]
movzx eax, word [ebx]
sub eax, 0x100
movd xmm2, eax
movzx eax, word [ebx + 2]
sub eax, 0x100
cvtdq2ps xmm2, xmm2
movd xmm3, eax
cvtdq2ps xmm3, xmm3
mulss xmm2, xmm0
mulss xmm3, xmm0
movaps xmm0, xmm2
movss dword [esp + 0x28], xmm2
mulss xmm0, xmm2
movaps xmm4, xmm3
movss dword [esp + 0x20], xmm3
mulss xmm4, xmm3
addss xmm4, xmm0
movss xmm0, dword [0x6f2a30]
comiss xmm0, xmm4
jb 0x5d7c02
movss xmm3, dword [0x6f2b58]
xorps xmm1, xmm1
xorps xmm0, xmm0
jmp 0x5d7c6e
movaps xmm1, xmm4
mulss xmm1, xmm5
ucomiss xmm1, xmm1
lahf
test ah, 0x44
jp 0x5d7c2b
movaps xmm0, xmm4
call fcn.00556b50
movss xmm3, dword [0x6f2b58]
movaps xmm2, xmm3
divss xmm2, xmm0
jmp 0x5d7c5a
cvtps2pd xmm1, xmm2
cvtps2pd xmm0, xmm3
mulsd xmm1, xmm1
mulsd xmm0, xmm0
addsd xmm0, xmm1
call fcn.00682420
movsd xmm1, qword [0x6f2c18]
divsd xmm1, xmm0
movss xmm3, dword [0x6f2b58]
cvtpd2ps xmm2, xmm1
movss xmm1, dword [esp + 0x20]
movss xmm0, dword [esp + 0x28]
mulss xmm1, xmm2
mulss xmm0, xmm2
movss dword [esi], xmm0
sub esp, 8
addss xmm0, xmm3
movss dword [esi + 4], xmm1
mulss xmm0, dword [0x6f2e20]
addss xmm0, dword [0x6f2b28]
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x28], xmm0
fld qword [esp + 0x28]
fstp qword [esp]
call fcn.00682520
fstp qword [esp + 0x28]
movsd xmm0, qword [esp + 0x28]
cvtpd2ps xmm0, xmm0
cvttss2si eax, xmm0
mov word [ebx], ax
movss xmm0, dword [esi + 4]
addss xmm0, dword [0x6f2b58]
mulss xmm0, dword [0x6f2e20]
addss xmm0, dword [0x6f2b28]
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x28], xmm0
fld qword [esp + 0x28]
fstp qword [esp]
call fcn.00682520
fstp qword [esp + 0x28]
movsd xmm0, qword [esp + 0x28]
add esp, 8
cvtpd2ps xmm0, xmm0
add esi, 8
xorps xmm5, xmm5
cvttss2si eax, xmm0
movss xmm0, dword [0x6f2a64]
mov word [ebx + 2], ax
add ebx, 4
sub edi, 1
jne 0x5d7ba0
sub dword [esp + 0x18], 1
jne 0x5d7b90
mov ecx, dword [esp + 0x103c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0064fb08
mov esp, ebp
pop ebp
ret