Function at 0x1400a5970
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov r8, rdx
mov rsi, rcx
cmp qword [rcx], 0
je 0x1400a5780
mov r15, qword [rsi + 8]
mov rdx, qword [r8]
mov rbx, qword [r8 + 8]
mov r14, qword [r8 + 0x10]
mov r13, qword [r8 + 0x18]
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x40], r13
mov ebp, dword [rsi + 0x30]
movzx r12d, byte [rsi + 0x38]
test byte [rsi + 0x34], 8
jne 0x1400a579d
mov edi, ebp
mov eax, r12d
test r13, r13
jne 0x1400a57ee
jmp 0x1400a587f
mov rcx, qword [rsi + 0x20]
mov rdx, qword [rsi + 0x28]
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp 0x1400a5970
mov rcx, qword [rsi + 0x20]
mov rax, qword [rsi + 0x28]
mov r8, rbx
call qword [rax + 0x18]
test al, al
jne 0x1400a5908
lea rax, [0x140ac90c8]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], 0
xor eax, eax
sub r15, rbx
cmovb r15, rax
mov dword [rsi + 0x30], 0x30
mov byte [rsi + 0x38], 1
mov al, 1
mov edi, 0x30
xor ebx, ebx
test r13, r13
je 0x1400a587f
shl r13, 3
lea rcx, [r13*2]
add rcx, r13
xor edx, edx
jmp 0x1400a5821
mov r8, qword [r14 + rdx + 0x10]
add rbx, r8
add rdx, 0x18
cmp rcx, rdx
je 0x1400a587f
movzx r8d, word [r14 + rdx]
test r8, r8
je 0x1400a5860
cmp r8d, 1
jne 0x1400a5810
movzx r9d, word [r14 + rdx + 2]
cmp r9d, 0x3e8
jae 0x1400a5867
mov r8d, 1
cmp r9w, 0xa
jb 0x1400a5815
xor r8d, r8d
cmp r9w, 0x64
setb r8b
xor r8, 3
jmp 0x1400a5815
mov r8, qword [r14 + rdx + 8]
jmp 0x1400a5815
movzx r9d, r9w
xor r8d, r8d
cmp r9d, 0x2710
setb r8b
xor r8, 5
jmp 0x1400a5815
sub r15, rbx
jbe 0x1400a58a0
movzx r13d, al
lea rax, [0x1400a5960]
movsxd rcx, dword [rax + r13*4]
add rcx, rax
jmp rcx
mov r13, r15
xor r15d, r15d
jmp case.0x1400a5896.0
mov rcx, qword [rsi + 0x20]
mov rdx, qword [rsi + 0x28]
lea r8, [rsp + 0x28]
call 0x1400a5970
mov dword [rsi + 0x30], ebp
mov byte [rsi + 0x38], r12b
jmp 0x1400a590a
mov r13, r15
shr r13, 1
inc r15
shr r15, 1
mov rbx, qword [rsi + 0x20]
mov r14, qword [rsi + 0x28]
inc r13
nop word cs:[rax + rax]
dec r13
je 0x1400a58f4
mov rcx, rbx
mov edx, edi
call qword [r14 + 0x20]
test al, al
je 0x1400a58e0
jmp 0x1400a5908
lea r8, [rsp + 0x28]
mov rcx, rbx
mov rdx, r14
call 0x1400a5970
test al, al
je 0x1400a591b
mov al, 1
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov byte [rsp + 0x27], r12b
mov r12, r15
neg r12
mov r13, 0xffffffffffffffff
nop dword [rax]
lea rax, [r12 + r13]
cmp rax, 0xffffffffffffffff
je 0x1400a594c
mov rcx, rbx
mov edx, edi
call qword [r14 + 0x20]
inc r13
test al, al
je 0x1400a5930
jmp 0x1400a594f
mov r13, r15
cmp r13, r15
setb al
movzx r12d, byte [rsp + 0x27]
jmp 0x1400a58b2
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov rbx, r8
mov rsi, rdx
mov rdi, rcx
mov r8, qword [r8 + 8]
test r8, r8
je 0x1400a59a7
mov rdx, qword [rbx]
mov rcx, rdi
call qword [rsi + 0x18]
mov ecx, eax
mov al, 1
test cl, cl
jne 0x1400a5bd7
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x1400a5bd5
mov r12, qword [rbx + 0x10]
lea rax, [rax + rax*2]
lea r13, [r12 + rax*8]
lea rbx, [0x140ac90e3]
lea r14, [rsp + 0x30]
jmp 0x1400a59f5
mov rdx, qword [r12 + 8]
mov r8, qword [r12 + 0x10]
mov rcx, rdi
call qword [rsi + 0x18]
test al, al
jne 0x1400a5bd1
add r12, 0x18
cmp r12, r13
je 0x1400a5bd5
movzx eax, word [r12]
test rax, rax
je 0x1400a5a80
cmp eax, 1
jne 0x1400a59d0
movzx eax, word [r12 + 2]
mov byte [rsp + 0x34], 0
mov dword [rsp + 0x30], 0
movzx ecx, word [r12]
test rcx, rcx
je 0x1400a5ae5
cmp ecx, 1
jne 0x1400a5aec
movzx ecx, word [r12 + 2]
cmp ecx, 0x3e8
jae 0x1400a5ba6
mov r8d, 1
cmp cx, 0xa
jb 0x1400a5b07
xor r8d, r8d
cmp cx, 0x64
setb r8b
xor r8, 3
lea rcx, [rsp + r8]
add rcx, 0x30
test r8b, 1
jne 0x1400a5b15
jmp 0x1400a5b36
mov r15, qword [r12 + 8]
cmp r15, 0x41
jb 0x1400a5ab2
mov rbp, qword [rsi + 0x18]
nop
mov r8d, 0x40
mov rcx, rdi
mov rdx, rbx
call rbp
test al, al
jne 0x1400a5bd1
add r15, 0xffffffffffffffc0
cmp r15, 0x40
ja 0x1400a5a90
jmp 0x1400a5abb
test r15, r15
je 0x1400a59e8
cmp r15, 0x3f
ja 0x1400a5acc
cmp byte [r15 + rbx], 0xbf
jle 0x1400a5c01
mov rcx, rdi
mov rdx, rbx
mov r8, r15
call qword [rsi + 0x18]
test al, al
je 0x1400a59e8
jmp 0x1400a5bd1
lea rcx, [r12 + 8]
jmp 0x1400a5af1
lea rcx, [r12 + 0x10]
mov r8, qword [rcx]
cmp r8, 6
jae 0x1400a5be8
test r8, r8
je 0x1400a5b90
lea rcx, [rsp + r8]
add rcx, 0x30
test r8b, 1
je 0x1400a5b36
movzx edx, ax
imul edx, edx, 0xcccd
shr edx, 0x13
lea r9d, [rdx + rdx]
lea r9d, [r9 + r9*4]
sub eax, r9d
or al, 0x30
mov byte [rcx - 1], al
dec rcx
mov eax, edx
cmp r8, 1
je 0x1400a5b93
nop dword [rax]
movzx edx, ax
imul r9d, edx, 0xcccd
shr r9d, 0x13
lea r10d, [r9 + r9]
lea r10d, [r10 + r10*4]
sub eax, r10d
or al, 0x30
mov byte [rcx - 1], al
imul eax, r9d, 0x199a
shr eax, 0xf
and eax, 0xfffffffe
lea eax, [rax + rax*4]
sub r9d, eax
or r9b, 0x30
mov byte [rcx - 2], r9b
add rcx, 0xfffffffffffffffe
shr edx, 2
imul eax, edx, 0x147b
shr eax, 0x11
cmp rcx, r14
jne 0x1400a5b40
jmp 0x1400a5b93
xor r8d, r8d
mov rcx, rdi
mov rdx, r14
call qword [rsi + 0x18]
test al, al
je 0x1400a59e8
jmp 0x1400a5bd1
movzx ecx, cx
xor r8d, r8d
cmp ecx, 0x2710
setb r8b
xor r8, 5
lea rcx, [rsp + r8]
add rcx, 0x30
test r8b, 1
jne 0x1400a5b15
jmp 0x1400a5b36
mov al, 1
jmp 0x1400a5bd7
xor eax, eax
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rax, [0x140ac9140]
mov edx, 5
mov rcx, r8
mov r8, rax
call fcn.1400bfeb0
ud2
lea rax, [0x140ac9128]
mov qword [rsp + 0x20], rax
lea rcx, [0x140ac90e3]
mov edx, 0x40
xor r8d, r8d
mov r9, r15
call fcn.1400bffb0
ud2