Function at 0x1400f6510
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x58], rax
test rax, rax
je 0x1400f65e4
mov rbp, r8
mov r13, rdx
mov r14, rcx
mov rax, qword [rsp + 0x108]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x100]
mov qword [rsp + 0x48], rax
mov r15, qword [rsp + 0xf0]
movabs r12, 0xcccccccccccccccd
mov rax, qword [rsp + 0x70]
cmp r15, rax
jle 0x1400f6a7d
cmp qword [rsp + 0x58], rax
jle 0x1400f6a7d
test r15, r15
je 0x1400f65e4
movzx edx, word [r13]
mov rcx, qword [r9]
mov rax, qword [rcx]
mov rcx, qword [rcx + 8]
sub rcx, rax
sar rcx, 3
imul rcx, r12
cmp rcx, rdx
jbe 0x1400f65f8
lea r8, [rdx + rdx*4]
lea r8, [rax + r8*8]
add r8, 0x10
neg r15
xor ebx, ebx
mov rsi, r15
movzx edi, word [r14 + rbx]
movzx r10d, di
cmp rcx, r10
jbe 0x1400f65f8
mov r11d, dword [r8]
lea r10, [r10 + r10*4]
cmp r11d, dword [rax + r10*8 + 0x10]
jb 0x1400f65fa
add rbx, 2
inc rsi
jne 0x1400f65bf
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2
mov r8, rsi
neg r8
lea r11, [r14 + rbx]
mov r10, qword [rsp + 0x58]
cmp r8, r10
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x80], r11
jl 0x1400f6705
cmp rsi, 0xffffffffffffffff
mov r15, r13
je 0x1400f6bf3
mov r11, r8
shr r11, 0x3f
add r11, r8
mov r13, r11
and r13, 0xfffffffffffffffe
add r13, r14
add r13, rbx
mov r9, rbp
sub r9, r15
je 0x1400f66c3
sar r9, 1
mov r12, r9
and r12, 0xfffffffffffffffe
movzx edx, word [r15 + r12]
cmp rcx, rdx
jbe 0x1400f65f8
movzx r8d, word [r13]
cmp rcx, r8
jbe 0x1400f65f8
mov rdi, r11
mov r10, r9
shr r10, 1
add r12, r15
lea r11, [rdx + rdx*4]
lea rdx, [r8 + r8*4]
mov edx, dword [rax + rdx*8 + 0x10]
add r12, 2
mov r8, r10
not r8
add r8, r9
cmp dword [rax + r11*8 + 0x10], edx
cmovae r8, r10
cmovae r12, r15
test r8, r8
jne 0x1400f66dd
mov r11, rdi
sar r11, 1
mov r9, r12
sub r9, r15
sar r9, 1
lea rbp, [r14 + r11*2]
add rbp, rbx
mov rcx, r15
jmp 0x1400f67b2
mov r12, r15
jmp 0x1400f66a8
add r12, r10
add r12, 2
not r9
add r9, r8
mov r8, r9
test r9, r9
je 0x1400f66a5
mov r10, r8
and r10, 0xfffffffffffffffe
movzx r11d, word [r12 + r10]
cmp rcx, r11
jbe 0x1400f65f8
mov r9, r8
shr r9, 1
lea r11, [r11 + r11*4]
cmp dword [rax + r11*8 + 0x10], edx
jae 0x1400f66d5
jmp 0x1400f66c8
mov r9, r10
shr r9, 0x3f
add r9, r10
mov r12, r9
and r12, 0xfffffffffffffffe
mov r15, r13
add r12, r13
mov rbp, r11
cmp r11, r13
je 0x1400f679d
movzx edx, word [r12]
cmp rcx, rdx
jbe 0x1400f65f8
mov r13, r9
mov r9, r15
sub r9, r14
sub r9, rbx
sar r9, 1
mov rbp, r9
and rbp, 0xfffffffffffffffe
add rbp, r14
movzx r8d, word [rbx + rbp]
cmp rcx, r8
jbe 0x1400f65f8
mov rdi, r11
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8]
add rdx, 0x10
add rbp, rbx
mov r10, r9
shr r10, 1
mov edx, dword [rdx]
lea r11, [r8 + r8*4]
add rbp, 2
mov r8, r10
not r8
add r8, r9
cmp edx, dword [rax + r11*8 + 0x10]
cmovb rbp, rdi
cmovb r8, r10
test r8, r8
jne 0x1400f6863
mov r9, r13
sar r9, 1
mov r11, rbp
sub r11, r14
sub r11, rbx
sar r11, 1
mov rcx, r15
mov r13, rbp
mov r8, r12
cmp r13, r15
je 0x1400f6940
mov r8, rbp
cmp r15, r12
je 0x1400f6940
lea rdx, [rbp + 2]
cmp r15, rdx
mov qword [rsp + 0x60], r9
je 0x1400f6908
lea rax, [rcx + 2]
cmp r12, rax
je 0x1400f6a08
mov r8, r12
sub r8, rcx
sub rcx, rbp
mov r9, rcx
sar r9, 1
mov rdx, r8
sar rdx, 1
mov rax, r9
cmp r9, rdx
jne 0x1400f688b
lea rax, [r13 + 2]
lea rcx, [r15 + 2]
mov r9, qword [rsp + 0x60]
movzx edx, word [rax - 2]
movzx r8d, word [rcx - 2]
mov word [rax - 2], r8w
mov word [rcx - 2], dx
cmp rax, r15
je 0x1400f693d
add rax, 2
lea rdx, [rcx + 2]
cmp rcx, r12
mov rcx, rdx
jne 0x1400f6817
jmp 0x1400f693d
add r10, rbp
add r10, 2
not r9
add r9, r8
mov rbp, r10
mov r8, r9
test r9, r9
je 0x1400f679a
mov r10, r8
and r10, 0xfffffffffffffffe
movzx r11d, word [r10 + rbp]
cmp rcx, r11
jbe 0x1400f65f8
mov r9, r8
shr r9, 1
lea r11, [r11 + r11*4]
cmp edx, dword [rax + r11*8 + 0x10]
jb 0x1400f6857
jmp 0x1400f6847
mov r10, rdx
cqo
idiv r10
mov rax, r10
test rdx, rdx
jne 0x1400f688b
mov qword [rsp + 0x50], r11
lea rax, [r10*2]
add rax, r13
movzx edx, word [rax - 2]
lea r11, [rax + rcx]
add r11, 0xfffffffffffffffe
add rax, 0xfffffffffffffffe
mov rdi, rax
mov r10, r11
movzx r11d, word [r11]
mov word [rdi], r11w
mov r11, r12
sub r11, r10
sar r11, 1
mov rdi, r9
sub rdi, r11
lea r15, [r10 + r9*2]
lea r11, [r13 + rdi*2]
cmovl r11, r15
mov rdi, r10
cmp r11, rax
jne 0x1400f68be
mov word [r10], dx
cmp rax, r13
jne 0x1400f68ab
add r8, r13
mov r15, r8
mov r9, qword [rsp + 0x60]
mov r11, qword [rsp + 0x50]
jmp 0x1400f693d
movzx eax, word [r13]
mov word [rsp + 0x50], ax
mov rdi, r12
sub rdi, rdx
mov rcx, r13
mov r8, rdi
mov r15, r11
call fcn.1401a4fc0
mov r11, r15
mov r9, qword [rsp + 0x60]
lea r15, [rdi + r13]
movzx ecx, word [rsp + 0x50]
mov word [r13 + rdi], cx
mov r8, r15
lea r15, [r11 + rsi]
neg r15
mov rcx, qword [rsp + 0x58]
mov rdi, rcx
sub rdi, r9
lea rax, [r11 + r9]
sub rcx, rax
sub rcx, rsi
cmp rax, rcx
jl 0x1400f69aa
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r15
mov rcx, r8
mov rdx, r12
mov rbp, r8
mov r8, qword [rsp + 0x78]
mov rdi, r9
mov r9, qword [rsp + 0x68]
mov r15, r11
call fcn.1400f6510
mov r12, r13
mov r14, qword [rsp + 0x80]
jmp 0x1400f69e3
add r14, rbx
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r9
mov qword [rsp + 0x20], r11
mov rcx, r14
mov rdx, rbp
mov r14, r8
mov r9, qword [rsp + 0x68]
call fcn.1400f6510
mov rbp, qword [rsp + 0x78]
mov qword [rsp + 0x58], rdi
mov r13, r12
test rdi, rdi
mov r9, qword [rsp + 0x68]
movabs r12, 0xcccccccccccccccd
jne 0x1400f656e
jmp 0x1400f65e4
lea rax, [r12 - 2]
movzx ecx, word [r12 - 2]
mov r8, rax
sub r8, rbp
mov r15, r12
sub r15, r8
cmp r13, rax
je 0x1400f6a44
mov word [rsp + 0x50], cx
mov rcx, r15
mov rdx, r13
mov rdi, r11
call fcn.1401a4fc0
movzx ecx, word [rsp + 0x50]
mov r11, rdi
mov r9, qword [rsp + 0x60]
mov word [r13], cx
jmp 0x1400f693d
cmp rax, qword [rsp + 0x48]
je 0x1400f65e4
xor ecx, ecx
lea rdx, [rax + rcx]
add rdx, 0xfffffffffffffffe
movzx r8d, word [rdx]
mov word [rbp + rcx], r8w
add rcx, 0xfffffffffffffffe
cmp rdx, qword [rsp + 0x48]
jne 0x1400f6a5b
jmp 0x1400f65e4
cmp r15, qword [rsp + 0x58]
jle 0x1400f6b21
cmp r13, rbp
je 0x1400f65e4
mov rax, qword [rsp + 0x48]
mov rcx, r13
movzx edx, word [rcx]
mov word [rax], dx
add rcx, 2
add rax, 2
cmp rcx, rbp
jne 0x1400f6a99
add rbp, 0xfffffffffffffffe
mov rbx, qword [rsp + 0x48]
cmp r13, r14
je 0x1400f6a4e
movzx ecx, word [rax - 2]
mov r8, qword [r9]
mov rdx, qword [r8]
mov r11, qword [r8 + 8]
sub r11, rdx
sar r11, 3
imul r11, r12
cmp r11, rcx
jbe 0x1400f65f8
lea r8, [r13 - 2]
movzx r10d, word [r8]
cmp r11, r10
jbe 0x1400f65f8
lea rdi, [rax - 2]
lea r11, [rcx + rcx*4]
mov r11d, dword [rdx + r11*8 + 0x10]
lea rsi, [r10 + r10*4]
cmp r11d, dword [rdx + rsi*8 + 0x10]
cmovb ecx, r10d
cmovb r13, r8
cmovae rax, rdi
mov word [rbp], cx
add rbp, 0xfffffffffffffffe
cmp rax, rbx
jne 0x1400f6ab5
jmp 0x1400f65e4
cmp r14, r13
je 0x1400f65e4
mov rax, qword [rsp + 0x48]
mov r8, rax
neg r8
mov rcx, r14
mov r10, r13
movzx edx, word [rcx]
mov word [rax], dx
add rcx, 2
add rax, 2
add r8, 0xfffffffffffffffe
cmp rcx, r10
jne 0x1400f6b3b
cmp r13, rbp
je 0x1400f6bcd
movzx ecx, word [r13]
mov rdx, qword [r9]
mov rbx, qword [rdx]
mov r10, qword [rdx + 8]
sub r10, rbx
sar r10, 3
imul r10, r12
cmp r10, rcx
mov r15, qword [rsp + 0x48]
jbe 0x1400f65f8
movzx edx, word [r15]
cmp r10, rdx
jbe 0x1400f65f8
lea r10, [rcx + rcx*4]
mov r10d, dword [rbx + r10*8 + 0x10]
lea r11, [rdx + rdx*4]
xor esi, esi
xor edi, edi
cmp r10d, dword [rbx + r11*8 + 0x10]
setae sil
setb dil
cmovb edx, ecx
lea r15, [r15 + rsi*2]
lea r13, [r13 + rdi*2]
mov word [r14], dx
add r14, 2
mov qword [rsp + 0x48], r15
cmp rax, r15
jne 0x1400f6b52
jmp 0x1400f65e4
mov rdx, qword [rsp + 0x48]
add r8, rdx
neg r8
mov rcx, r14
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.1401a4fc0
mov word [r14 + rbx], dx
mov word [r15], di
jmp 0x1400f65e4