Function at 0x140012538
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov rax, rsp
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x78]
sub rsp, 0x138
xorps xmm5, xmm5
movaps xmmword [rax - 0x58], xmm6
movsd xmm6, qword [0x14025b108]
movaps xmm4, xmm5
movaps xmm3, xmm5
mov r13, rcx
movaps xmm1, xmm3
movaps xmm2, xmm3
movaps xmm0, xmm3
mulsd xmm2, qword [0x14025aca8]
mulsd xmm1, qword [0x14025a2e0]
mulsd xmm0, xmm3
mulsd xmm2, xmm3
mulsd xmm1, xmm3
addsd xmm1, qword [0x14025a4e0]
subsd xmm2, xmm0
divsd xmm2, xmm1
addsd xmm4, xmm2
comisd xmm4, xmmword [0x14025a8d8]
jbe 0x1400125bc
movaps xmm0, xmm3
mulsd xmm0, qword [0x140259fd8]
subsd xmm4, xmm0
addsd xmm3, qword [0x14025a110]
comisd xmm6, xmm3
ja 0x14001256a
comisd xmm5, xmm4
jbe 0x1400125df
call fcn.1400362f9
call fcn.14003632d
jmp 0x140012bc5
xor eax, eax
lea rcx, [rsp + 0x20]
mov byte [rcx], al
inc eax
inc rcx
cmp eax, 0x100
jb 0x1400125e6
xor r10d, r10d
mov r9d, 0xff
xor r8b, r8b
lea edx, [r10 + 0xb]
mov qword [rbp + 0x90], rdx
xor ebx, ebx
lea r11d, [rbx + 1]
cmp r9d, r11d
jbe 0x140012623
lea r11d, [r11*2 + 1]
cmp r11d, r9d
jb 0x140012616
mov eax, r10d
test r10d, r10d
je 0x140012671
dec eax
je 0x140012667
dec eax
je 0x14001265d
dec eax
je 0x140012653
lea rax, [fcn.14003632d]
lea ecx, [r10 - 4]
add rcx, rax
movzx eax, r8b
mov r8b, byte [rcx]
add r8b, byte [rsp + rax + 0x20]
jmp 0x140012682
cvttsd2si rcx, xmm4
shr ecx, 0x18
jmp 0x140012676
cvttsd2si rcx, xmm4
shr ecx, 0x10
jmp 0x140012676
cvttsd2si rcx, xmm4
shr ecx, 8
jmp 0x140012676
cvttsd2si rcx, xmm4
movzx eax, r8b
mov r8b, byte [rsp + rax + 0x20]
add r8b, cl
inc r10d
cmp r10d, 0x1c
jb 0x140012692
xor r10d, r10d
add r8b, 0x1c
movzx eax, r8b
inc ebx
and eax, r11d
cmp ebx, edx
jbe 0x1400126ab
xor edx, edx
div r9d
mov eax, edx
mov edx, VariantTimeToDosDateTime
cmp eax, r9d
ja 0x140012623
cmp r9d, eax
je 0x1400126d6
mov edx, eax
mov ecx, r9d
mov al, byte [rsp + rdx + 0x20]
xor byte [rsp + rcx + 0x20], al
mov al, byte [rsp + rcx + 0x20]
xor byte [rsp + rdx + 0x20], al
mov al, byte [rsp + rdx + 0x20]
xor byte [rsp + rcx + 0x20], al
mov edx, VariantTimeToDosDateTime
dec r9d
jne 0x14001260b
movzx r10d, byte [rsp + 0x27]
movzx r14d, byte [rsp + 0x21]
mov r12b, byte [rsp + 0x25]
mov r15b, byte [rsp + r14 + 0x20]
movzx eax, r8b
lea rdi, [fcn.1400362f9]
movzx edx, byte [rsp + rax + 0x20]
add r15b, byte [rsp + 0x23]
mov cl, byte [rdi + 1]
movzx r11d, byte [rsp + rdx + 0x20]
mov sil, byte [rdi]
sub cl, 0x4d
movzx r8d, r15b
inc r14b
add sil, 2
mov al, byte [rsp + r8 + 0x20]
movzx ebx, r14b
shl sil, 4
mov byte [rsp + rdx + 0x20], al
mov al, byte [rsp + r10 + 0x20]
or sil, cl
mov byte [rsp + r8 + 0x20], al
mov al, byte [rsp + rbx + 0x20]
add r15b, r11b
mov byte [rsp + r10 + 0x20], al
mov byte [rsp + rbx + 0x20], r11b
add r12b, byte [rsp + r11 + 0x20]
movzx eax, r12b
movzx r9d, r15b
inc r14b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + r10 + 0x20]
add ecx, eax
movzx eax, byte [rsp + rdx + 0x20]
add ecx, eax
movzx eax, cl
movzx ecx, byte [rsp + r8 + 0x20]
movzx r8d, sil
movzx edx, byte [rsp + rax + 0x20]
movzx r10d, byte [rsp + r8 + 0x20]
add ecx, r11d
movzx eax, cl
mov cl, byte [rsp + rdx + 0x20]
movzx r11d, r14b
xor cl, byte [rsp + rax + 0x20]
mov al, byte [rdi + 3]
mov dil, byte [rdi + 2]
sub al, 0x4d
xor cl, sil
add dil, 2
movzx edx, cl
shl dil, 4
or dil, al
mov al, byte [rsp + r9 + 0x20]
mov byte [rsp + r8 + 0x20], al
mov al, byte [rsp + rdx + 0x20]
mov byte [rsp + r9 + 0x20], al
mov al, byte [rsp + r11 + 0x20]
mov byte [rsp + rdx + 0x20], al
mov byte [rsp + r11 + 0x20], r10b
add r12b, byte [rsp + r10 + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + rdx + 0x20]
add ecx, eax
movzx eax, byte [rsp + r8 + 0x20]
add ecx, eax
movzx eax, cl
movzx ecx, byte [rsp + r9 + 0x20]
movzx edx, byte [rsp + rax + 0x20]
add ecx, r10d
movzx eax, cl
mov cl, byte [rsp + rdx + 0x20]
xor cl, byte [rsp + rax + 0x20]
lea rax, [fcn.1400362f9]
add rax, 4
xor cl, dil
mov byte [r13], cl
mov bl, byte [rax]
mov qword [rbp + 0x98], rax
add bl, 2
mov al, byte [rax + 1]
add r15b, byte [rsp + r11 + 0x20]
movzx edx, cl
sub al, 0x4d
movzx r8d, dil
mov rdi, qword [rbp + 0x98]
movzx r10d, byte [rsp + r8 + 0x20]
movzx r9d, r15b
shl bl, 4
or bl, al
mov al, byte [rsp + r9 + 0x20]
inc r14b
mov byte [rsp + r8 + 0x20], al
mov al, byte [rsp + rdx + 0x20]
lea rsi, [rsp + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, r14b
mov byte [rbp + 0x80], bl
add rsi, rax
mov qword [rbp + 0x88], 0xa
mov al, byte [rsi]
mov byte [rsp + rdx + 0x20], al
mov byte [rsi], r10b
add r12b, byte [rsp + r10 + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + rdx + 0x20]
add ecx, eax
movzx eax, byte [rsp + r8 + 0x20]
mov r8b, byte [rbp + 0x80]
add ecx, eax
movzx eax, cl
movzx ecx, byte [rsp + r9 + 0x20]
movzx edx, byte [rsp + rax + 0x20]
add ecx, r10d
mov dl, byte [rsp + rdx + 0x20]
movzx eax, cl
xor dl, byte [rsp + rax + 0x20]
xor dl, bl
mov ebx, 2
mov byte [r13 + 1], dl
add r15b, byte [rsi]
movzx edx, dl
movzx r8d, r8b
movzx r10d, byte [rsp + r8 + 0x20]
movzx r9d, r15b
lea rdi, [rdi + 2]
mov al, byte [rdi]
mov r11b, byte [rdi + 1]
inc r14b
add al, 2
sub r11b, 0x4d
lea rsi, [rsp + 0x20]
shl al, 4
inc rbx
or r11b, al
mov al, byte [rsp + r9 + 0x20]
mov byte [rsp + r8 + 0x20], al
mov al, byte [rsp + rdx + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, r14b
add rsi, rax
mov al, byte [rsi]
mov byte [rsp + rdx + 0x20], al
mov byte [rsi], r10b
add r12b, byte [rsp + r10 + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + rdx + 0x20]
add ecx, eax
movzx eax, byte [rsp + r8 + 0x20]
mov r8b, r11b
add ecx, eax
movzx eax, cl
movzx ecx, byte [rsp + r9 + 0x20]
movzx edx, byte [rsp + rax + 0x20]
add ecx, r10d
mov dl, byte [rsp + rdx + 0x20]
movzx eax, cl
xor dl, byte [rsp + rax + 0x20]
xor dl, r11b
test rbx, rbx
jle 0x140012987
mov byte [rbx + r13 - 1], dl
dec qword [rbp + 0x88]
jne 0x1400128e6
movzx edx, dl
movzx r9d, r8b
movzx eax, r14b
add r15b, byte [rsp + rax + 0x20]
movzx r10d, byte [rsp + r9 + 0x20]
lea rsi, [fcn.1400362f9]
mov cl, byte [rsi + 0x1a]
mov bl, byte [rsi + 0x1b]
movzx r8d, r15b
mov al, byte [rsp + r8 + 0x20]
add cl, 2
sub bl, 0x4d
mov byte [rsp + r9 + 0x20], al
mov al, byte [rsp + rdx + 0x20]
shl cl, 4
mov byte [rsp + r8 + 0x20], al
or bl, cl
inc r14b
movzx r11d, r14b
lea rdi, [rsi + 0x1c]
inc r14b
mov al, byte [rsp + r11 + 0x20]
mov esi, 0xe
mov byte [rsp + rdx + 0x20], al
mov byte [rsp + r11 + 0x20], r10b
add r12b, byte [rsp + r10 + 0x20]
add r15b, byte [rsp + r11 + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + rdx + 0x20]
add ecx, eax
movzx eax, byte [rsp + r9 + 0x20]
movzx r9d, r15b
add ecx, eax
movzx eax, cl
movzx ecx, byte [rsp + r8 + 0x20]
movzx r8d, bl
movzx edx, byte [rsp + rax + 0x20]
add ecx, r10d
movzx r10d, byte [rsp + r8 + 0x20]
movzx eax, cl
mov cl, byte [rsp + rdx + 0x20]
xor cl, byte [rsp + rax + 0x20]
xor cl, bl
lea rbx, [rsp + 0x20]
mov byte [r13 + 0xc], cl
mov al, byte [rdi]
mov dl, byte [rdi + 1]
add al, 2
sub dl, 0x4d
shl al, 4
or dl, al
mov al, byte [rsp + r9 + 0x20]
mov byte [rsp + r8 + 0x20], al
mov byte [rbp + 0x80], dl
movzx edx, cl
mov al, byte [rsp + rdx + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, r14b
add rbx, rax
mov al, byte [rbx]
mov byte [rsp + rdx + 0x20], al
mov byte [rbx], r10b
add r12b, byte [rsp + r10 + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + rdx + 0x20]
add ecx, eax
movzx eax, byte [rsp + r8 + 0x20]
add ecx, eax
movzx eax, cl
movzx ecx, byte [rsp + r9 + 0x20]
movzx edx, byte [rsp + rax + 0x20]
add ecx, r10d
movzx eax, cl
mov cl, byte [rsp + rdx + 0x20]
mov dl, byte [rbp + 0x80]
xor cl, byte [rsp + rax + 0x20]
xor cl, dl
mov byte [r13 + 0xd], cl
add r15b, byte [rbx]
movzx r8d, dl
movzx edx, cl
movzx r10d, byte [rsp + r8 + 0x20]
movzx r9d, r15b
lea rdi, [rdi + 2]
mov al, byte [rdi]
mov r11b, byte [rdi + 1]
inc r14b
add al, 2
sub r11b, 0x4d
lea rbx, [rsp + 0x20]
shl al, 4
inc rsi
or r11b, al
mov al, byte [rsp + r9 + 0x20]
mov byte [rsp + r8 + 0x20], al
mov al, byte [rsp + rdx + 0x20]
mov byte [rsp + r9 + 0x20], al
movzx eax, r14b
add rbx, rax
mov al, byte [rbx]
mov byte [rsp + rdx + 0x20], al
mov byte [rbx], r10b
add r12b, byte [rsp + r10 + 0x20]
movzx eax, r12b
movzx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [rsp + rdx + 0x20]
add ecx, eax
movzx eax, byte [rsp + r8 + 0x20]
add ecx, eax
movzx eax, cl
movzx ecx, byte [rsp + r9 + 0x20]
movzx edx, byte [rsp + rax + 0x20]
add ecx, r10d
movzx eax, cl
mov cl, byte [rsp + rdx + 0x20]
mov dl, r11b
xor cl, byte [rsp + rax + 0x20]
xor cl, r11b
test rsi, rsi
jle 0x140012b72
mov byte [rsi + r13 - 1], cl
dec qword [rbp + 0x90]
jne 0x140012ad1
movzx eax, r14b
movzx edx, cl
movzx r9d, r11b
add r15b, byte [rsp + rax + 0x20]
movzx r11d, byte [rsp + r9 + 0x20]
inc r14b
movzx r10d, r15b
movzx ecx, r14b
mov byte [r13 + 0x19], 0
mov al, byte [rsp + r10 + 0x20]
mov byte [rsp + r9 + 0x20], al
mov al, byte [rsp + rdx + 0x20]
mov byte [rsp + r10 + 0x20], al
mov al, byte [rsp + rcx + 0x20]
mov byte [rsp + rdx + 0x20], al
mov byte [rsp + rcx + 0x20], r11b
mov rax, r13
movaps xmm6, xmmword [rsp + 0x120]
add rsp, 0x138
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret