Function at 0x140040940
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push rsi
lea rbp, [rax - 0xc8]
sub rsp, 0x1b8
movsd xmm5, qword [0x14016e008]
mov rsi, rcx
movaps xmmword [rax - 0x48], xmm6
xorps xmm3, xmm3
movsd xmm6, qword [0x14016e230]
xorps xmm4, xmm4
movaps xmmword [rax - 0x58], xmm7
movsd xmm7, qword [0x14016ed00]
movaps xmmword [rax - 0x68], xmm8
movsd xmm8, qword [0x14016eac8]
movaps xmmword [rax - 0x78], xmm9
movsd xmm9, qword [0x14016e268]
movaps xmmword [rax - 0x88], xmm10
movsd xmm10, qword [0x14016e648]
movaps xmmword [rax - 0x98], xmm11
movsd xmm11, qword [0x14016e6e0]
movaps xmmword [rax - 0xa8], xmm12
xorps xmm12, xmm12
nop word [rax + rax]
movaps xmm2, xmm4
movaps xmm1, xmm4
mulsd xmm2, xmm8
movaps xmm0, xmm4
mulsd xmm1, xmm9
mulsd xmm0, xmm4
mulsd xmm2, xmm4
mulsd xmm1, xmm4
subsd xmm2, xmm0
addsd xmm1, xmm10
divsd xmm2, xmm1
addsd xmm3, xmm2
comisd xmm3, xmm11
jbe 0x140040a12
movaps xmm0, xmm4
mulsd xmm0, xmm5
subsd xmm3, xmm0
addsd xmm4, xmm6
comisd xmm7, xmm4
ja 0x1400409d0
movaps xmm11, xmmword [rsp + 0x130]
movaps xmm10, xmmword [rsp + 0x140]
movaps xmm9, xmmword [rsp + 0x150]
movaps xmm8, xmmword [rsp + 0x160]
movaps xmm7, xmmword [rsp + 0x170]
movaps xmm6, xmmword [rsp + 0x180]
comisd xmm12, xmm3
movaps xmm12, xmmword [rsp + 0x120]
jbe 0x140040a77
call fcn.14009cdd5
call fcn.14009cdef
mov rax, rsi
add rsp, 0x1b8
pop rsi
pop rbp
ret
mov qword [rsp + 0x1e8], rbx
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x1b0], rdi
xor eax, eax
mov qword [rsp + 0x1a8], r12
mov qword [rsp + 0x1a0], r13
mov qword [rsp + 0x198], r14
mov qword [rsp + 0x190], r15
nop
mov byte [rcx], al
lea rcx, [rcx + 1]
inc eax
cmp eax, 0x100
jb 0x140040ab0
xor r9d, r9d
lea r14, [fcn.14009cdef]
xor cl, cl
mov r10d, 0xff
xor edi, edi
mov r11d, 1
cmp r10d, r11d
jbe 0x140040af0
nop
lea r11d, [r11*2 + 1]
cmp r11d, r10d
jb 0x140040ae0
nop dword [rax]
movzx eax, cl
movzx edx, byte [rsp + rax + 0x20]
mov eax, r9d
test r9d, r9d
je 0x140040b38
sub eax, 1
je 0x140040b2e
sub eax, 1
je 0x140040b24
cmp eax, 1
je 0x140040b1a
lea eax, [r9 - 4]
movzx eax, byte [rax + r14]
jmp 0x140040b3d
cvttsd2si rax, xmm3
shr eax, 0x18
jmp 0x140040b3d
cvttsd2si rax, xmm3
shr eax, 0x10
jmp 0x140040b3d
cvttsd2si rax, xmm3
shr eax, 8
jmp 0x140040b3d
cvttsd2si rax, xmm3
add al, dl
lea r8d, [r9 + 1]
movzx edx, al
cmp r8d, 0x19
lea eax, [rdx + 0x19]
movzx ecx, al
cmovb ecx, edx
xor r9d, r9d
cmp r8d, 0x19
movzx ebx, cl
mov eax, ebx
cmovb r9d, r8d
and eax, r11d
inc edi
cmp edi, 0xb
jbe 0x140040b74
xor edx, edx
div r10d
mov eax, edx
movzx ecx, bl
cmp eax, r10d
ja 0x140040af0
je 0x140040ba2
mov edx, eax
mov ecx, r10d
movzx eax, byte [rsp + rdx + 0x20]
xor byte [rsp + rcx + 0x20], al
movzx eax, byte [rsp + rcx + 0x20]
xor byte [rsp + rdx + 0x20], al
movzx eax, byte [rsp + rdx + 0x20]
xor byte [rsp + rcx + 0x20], al
movzx ecx, bl
add r10d, 0xffffffff
jne 0x140040ad1
movzx r10d, byte [rsp + rbx + 0x20]
lea r14, [fcn.14009cdd5]
movzx edx, byte [rsp + 0x27]
movzx r15d, byte [rsp + 0x21]
movzx r13d, byte [rsp + 0x23]
movzx edi, byte [rsp + r10 + 0x20]
movzx r12d, byte [rsp + 0x25]
add r13b, byte [rsp + r15 + 0x20]
inc r15b
movzx r11d, byte [r14]
movzx ecx, byte [r14 + 1]
add r11b, 5
movzx ebx, byte [r14 + 2]
add cl, 0x20
movzx r9d, r13b
add bl, 5
add r13b, dil
shl r11b, 4
or r11b, cl
shl bl, 4
movzx ecx, r15b
inc r15b
movzx eax, byte [rsp + r9 + 0x20]
mov byte [rsp + r10 + 0x20], al
movzx eax, byte [rsp + rdx + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, byte [rsp + rcx + 0x20]
mov byte [rsp + rdx + 0x20], al
mov byte [rsp + rcx + 0x20], dil
add r12b, byte [rsp + rdi + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rcx, rax
movzx r10d, r11b
movzx eax, byte [rsp + rdx + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rax, rdi
movzx r9d, r13b
movzx eax, al
movzx edx, byte [rsp + rcx + 0x20]
xor dl, byte [rsp + rax + 0x20]
lea rax, [fcn.14009cdd5]
movzx ecx, byte [rax + 3]
xor dl, r11b
movzx eax, byte [rsp + r9 + 0x20]
add cl, 0x20
movzx r11d, byte [rsp + r10 + 0x20]
or bl, cl
mov byte [rsp + r10 + 0x20], al
movzx r8d, dl
movzx ecx, r15b
movzx eax, byte [rsp + r8 + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], r11b
add r12b, byte [rsp + r11 + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r10 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rax, r11
movzx eax, al
movzx edx, byte [rsp + rcx + 0x20]
xor dl, byte [rsp + rax + 0x20]
xor dl, bl
mov byte [rsi], dl
movzx edi, byte [r14 + 4]
movzx eax, byte [r14 + 5]
add dil, 5
shl dil, 4
add al, 0x20
or dil, al
movzx r8d, dl
add r13b, r11b
movzx r9d, bl
movzx r10d, r13b
movzx ebx, byte [rsp + r9 + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add r13b, bl
mov byte [rsp + r9 + 0x20], al
movzx eax, byte [rsp + r8 + 0x20]
mov byte [rsp + r10 + 0x20], al
lea eax, [r15 + 1]
movzx ecx, al
movzx eax, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], bl
add r12b, byte [rsp + rbx + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r9 + 0x20]
add rcx, rax
movzx r9d, dil
movzx eax, cl
movzx r11d, byte [rsp + r9 + 0x20]
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rax, rbx
movzx r10d, r13b
movzx eax, al
add r13b, r11b
movzx edx, byte [rsp + rcx + 0x20]
xor dl, byte [rsp + rax + 0x20]
lea rax, [fcn.14009cdd5]
xor dl, dil
mov byte [rsi + 1], dl
movzx esi, byte [rax + 6]
movzx eax, byte [r14 + 7]
add sil, 5
add al, 0x20
movzx r8d, dl
shl sil, 4
or sil, al
movzx eax, byte [rsp + r10 + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, byte [rsp + r8 + 0x20]
mov byte [rsp + r10 + 0x20], al
lea eax, [r15 + 2]
movzx ecx, al
movzx eax, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], r11b
add r12b, byte [rsp + r11 + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r9 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add rax, r11
movzx r10d, sil
movzx eax, al
movzx edx, byte [rsp + rcx + 0x20]
movzx ebx, byte [rsp + r10 + 0x20]
xor dl, byte [rsp + rax + 0x20]
mov rax, qword [rbp + 0xd0]
xor dl, sil
mov byte [rax + 2], dl
lea rax, [fcn.14009cdd5]
movzx ecx, byte [rax + 8]
movzx edi, byte [rax + 9]
add cl, 5
shl cl, 4
add dil, 0x20
or dil, cl
add r15b, 3
movzx r14d, r15b
mov r15, qword [rbp + 0xd0]
lea rsi, [fcn.14009cdd5]
movzx r8d, dl
add rsi, 0xa
movzx r9d, r13b
add r13b, bl
movzx eax, byte [rsp + r9 + 0x20]
mov byte [rsp + r10 + 0x20], al
movzx eax, byte [rsp + r8 + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, byte [rsp + r14 + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + r14 + 0x20], bl
inc r14b
add r12b, byte [rsp + rbx + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r10 + 0x20]
add rcx, rax
movzx r10d, dil
movzx eax, cl
movzx r11d, byte [rsp + r10 + 0x20]
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rax, rbx
movzx r9d, r13b
movzx eax, al
mov ebx, 5
movzx edx, byte [rsp + rcx + 0x20]
mov byte [rbp + 0xd8], r11b
xor dl, byte [rsp + rax + 0x20]
xor dl, dil
mov byte [r15 + 3], dl
movzx eax, byte [rsi]
movzx ecx, byte [rsi + 1]
add al, 5
shl al, 4
add cl, 0x20
or cl, al
movzx r8d, dl
movzx eax, byte [rsp + r9 + 0x20]
mov byte [rsp + r10 + 0x20], al
mov byte [rbp + 0xe0], cl
movzx eax, byte [rsp + r8 + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx ecx, r14b
movzx eax, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], r11b
add r12b, byte [rsp + r11 + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r10 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rax, r11
movzx eax, al
movzx edx, byte [rsp + rcx + 0x20]
movzx ecx, byte [rbp + 0xe0]
xor dl, byte [rsp + rax + 0x20]
xor dl, cl
mov byte [r15 + 4], dl
lea r15d, [rbx - 1]
nop dword [rax + rax]
movzx eax, byte [rsi + 2]
lea rsi, [rsi + 2]
add r13b, byte [rbp + 0xd8]
add al, 5
movzx r11d, byte [rsi + 1]
inc r14b
shl al, 4
add r11b, 0x20
or r11b, al
movzx r10d, cl
movzx r8d, dl
inc rbx
movzx r9d, r13b
movzx ecx, r14b
movzx edi, byte [rsp + r10 + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
mov byte [rsp + r10 + 0x20], al
movzx eax, byte [rsp + r8 + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], dil
add r12b, byte [rsp + rdi + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r10 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rax, rdi
movzx eax, al
movzx edx, byte [rsp + rcx + 0x20]
movzx ecx, r11b
xor dl, byte [rsp + rax + 0x20]
xor dl, r11b
test rbx, rbx
jle 0x140041065
mov rax, qword [rbp + 0xd0]
mov byte [rbx + rax - 1], dl
mov byte [rbp + 0xd8], dil
sub r15, 1
jne 0x140040fb0
movzx r11d, byte [rsp + rcx + 0x20]
lea rsi, [fcn.14009cdd5]
movzx eax, byte [rsi + 0x15]
mov r10, rcx
movzx ebx, byte [rsi + 0x14]
add al, 0x20
mov r15, qword [rbp + 0xd0]
add bl, 5
movzx r8d, dl
add r13b, dil
movzx r9d, r13b
inc r14b
shl bl, 4
add r13b, r11b
or bl, al
movzx eax, byte [rsp + r9 + 0x20]
mov byte [rsp + rcx + 0x20], al
movzx eax, byte [rsp + r8 + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx ecx, r14b
inc r14b
movzx eax, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], r11b
add r12b, byte [rsp + r11 + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r10 + 0x20]
add rcx, rax
movzx r10d, bl
movzx eax, cl
movzx edi, byte [rsp + r10 + 0x20]
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rax, r11
movzx r9d, r13b
movzx eax, al
movzx edx, byte [rsp + rcx + 0x20]
xor dl, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
xor dl, bl
mov byte [rsp + r10 + 0x20], al
mov byte [r15 + 9], dl
movzx ecx, byte [rsi + 0x16]
movzx esi, byte [rsi + 0x17]
add cl, 5
shl cl, 4
add sil, 0x20
or sil, cl
movzx r8d, dl
movzx ecx, r14b
movzx eax, byte [rsp + r8 + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], dil
add r12b, byte [rsp + rdi + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r10 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rax, rdi
movzx eax, al
movzx edx, byte [rsp + rcx + 0x20]
xor dl, byte [rsp + rax + 0x20]
lea rax, [fcn.14009cdd5]
xor dl, sil
mov byte [r15 + 0xa], dl
movzx ecx, byte [rax + 0x18]
movzx ebx, byte [rax + 0x19]
add cl, 5
shl cl, 4
add bl, 0x20
or bl, cl
movzx r8d, dl
add r13b, dil
mov rdi, qword [rsp + 0x1b0]
inc r14b
movzx r9d, r13b
mov r13, qword [rsp + 0x1a0]
movzx ecx, r14b
mov r14, qword [rsp + 0x198]
movzx eax, byte [rsp + r9 + 0x20]
movzx r10d, sil
movzx r11d, byte [rsp + r10 + 0x20]
mov byte [rsp + r10 + 0x20], al
movzx eax, byte [rsp + r8 + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, byte [rsp + rcx + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rsp + rcx + 0x20], r11b
add r12b, byte [rsp + r11 + 0x20]
movzx eax, r12b
mov r12, qword [rsp + 0x1a8]
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r8 + 0x20]
add rcx, rax
movzx eax, byte [rsp + r10 + 0x20]
add rcx, rax
movzx eax, cl
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r9 + 0x20]
add rax, r11
movzx eax, al
movzx edx, byte [rsp + rcx + 0x20]
xor dl, byte [rsp + rax + 0x20]
mov rax, r15
xor dl, bl
mov rbx, qword [rsp + 0x1e8]
mov byte [r15 + 0xb], dl
mov byte [r15 + 0xc], 0
mov r15, qword [rsp + 0x190]
add rsp, 0x1b8
pop rsi
pop rbp
ret