Function at 0x140104bf0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r13d, dword [rsp + 0xa8]
mov rax, qword [rsp + 0xa0]
mov r12, qword [rsp + 0x90]
mov dword [rsp + 0x28], r13d
mov rbx, r9
mov rdi, rdx
mov rbp, r8
mov qword [rsp + 0x20], rax
mov r8, r12
mov rdx, rbx
mov rsi, rcx
mov r9, qword [rsp + 0x98]
call fcn.140120940
cmp rax, 0xffffffffffffff88
ja 0x1401048d7
cmp rax, r12
jae 0x1401048d0
mov r9, r12
lea r8, [rbx + rax]
mov rdx, rbp
mov rcx, rdi
sub r9, rax
and r13d, 1
mov qword [rsp + 0x90], rsi
jne 0x1401048e8
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp 0x140104bf0
mov rax, 0xffffffffffffffb8
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp 0x140104900
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
mov rdi, rdx
mov rdx, qword [rsp + 0x60]
mov rax, rcx
lea rbp, [rcx + rdi]
movzx esi, byte [rdx + 2]
lea r11, [rdx + 4]
test r9, r9
je 0x140104ba0
movzx edx, byte [r8 + r9 - 1]
lea r12, [r8 + 8]
cmp r9, 7
jbe 0x1401049b0
mov rcx, 0xffffffffffffffff
test dl, dl
je 0x140104b27
cmp r9, 0xffffffffffffff88
ja 0x140104bdc
sub r9, 8
lzcnt edx, edx
sub edx, 0x17
lea rbx, [r8 + r9]
mov r10, qword [rbx]
cmp rdi, 3
jg 0x140104a35
cmp rbx, r12
jae 0x140104bc0
cmp r8, rbx
je 0x140104b38
mov ecx, edx
mov r10, rbx
shr ecx, 3
mov r12d, ecx
sub r10, r12
cmp r10, r8
jae 0x140104bb8
mov ecx, r9d
mov r9d, r9d
sub rbx, r9
shl ecx, 3
mov r10, qword [rbx]
sub edx, ecx
jmp 0x140104b16
lea rbx, [0x1401ec664]
movzx r10d, byte [r8]
movsxd rcx, dword [rbx + r9*4]
add rcx, rbx
jmp rcx
movzx ecx, byte [r8 + 6]
shl rcx, 0x30
add r10, rcx
movzx ecx, byte [r8 + 5]
shl rcx, 0x28
add r10, rcx
movzx ecx, byte [r8 + 4]
shl rcx, 0x20
add r10, rcx
movzx ecx, byte [r8 + 3]
shl rcx, 0x18
add r10, rcx
movzx ecx, byte [r8 + 2]
shl rcx, 0x10
add r10, rcx
movzx ecx, byte [r8 + 1]
shl rcx, 8
add r10, rcx
test dl, dl
je 0x140104b20
mov ecx, 8
lzcnt edx, edx
mov rbx, r8
sub ecx, r9d
lea edx, [rdx + rcx*8 - 0x17]
cmp rdi, 3
jle 0x140104b38
mov r9d, esi
lea r13, [rbp - 3]
neg r9d
and r9d, 0x3f
jmp 0x140104add
shl ecx, 3
mov r10, qword [r14]
mov rbx, r14
sub edx, ecx
cmp rax, r13
jae 0x140104b16
shlx rcx, r10, rdx
shrx rcx, rcx, r9
lea rcx, [r11 + rcx*2]
add rax, 4
movzx r14d, byte [rcx + 1]
movzx ecx, byte [rcx]
add ecx, edx
mov byte [rax - 4], r14b
shlx rdx, r10, rcx
shrx rdx, rdx, r9
lea rdx, [r11 + rdx*2]
movzx r14d, byte [rdx + 1]
movzx edx, byte [rdx]
add edx, ecx
mov byte [rax - 3], r14b
shlx rcx, r10, rdx
shrx rcx, rcx, r9
lea rcx, [r11 + rcx*2]
movzx r14d, byte [rcx + 1]
movzx ecx, byte [rcx]
add ecx, edx
mov byte [rax - 2], r14b
shlx rdx, r10, rcx
shrx rdx, rdx, r9
lea rdx, [r11 + rdx*2]
movzx r14d, byte [rdx + 1]
movzx edx, byte [rdx]
add edx, ecx
mov byte [rax - 1], r14b
cmp edx, 0x40
ja 0x140104b16
cmp rbx, r12
jae 0x140104b80
cmp r8, rbx
je 0x140104b38
mov ecx, edx
mov r14, rbx
shr ecx, 3
mov r10d, ecx
sub r14, r10
cmp r14, r8
jae 0x140104a50
mov rcx, rbx
sub rcx, r8
mov r9d, ecx
shl ecx, 3
sub rbx, r9
sub edx, ecx
mov r10, qword [rbx]
cmp rax, rbp
jb 0x140104b3d
cmp r8, rbx
je 0x140104b6c
mov rcx, 0xffffffffffffffec
mov rax, rcx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
cmp rax, rbp
jae 0x140104b6c
neg esi
and esi, 0x3f
shlx rcx, r10, rdx
shrx rcx, rcx, rsi
lea rcx, [r11 + rcx*2]
add rax, 1
movzx r9d, byte [rcx + 1]
movzx ecx, byte [rcx]
mov byte [rax - 1], r9b
add edx, ecx
cmp rbp, rax
jne 0x140104b42
cmp r8, rbx
jne 0x140104b20
mov rcx, rdi
cmp edx, 0x40
jne 0x140104b20
jmp 0x140104b27
mov ecx, edx
and edx, 7
shr ecx, 3
sub rbx, rcx
mov r10, qword [rbx]
cmp rax, r13
jb 0x140104a64
jmp 0x140104b16
mov rcx, 0xffffffffffffffb8
mov rax, rcx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rbx, r10
jmp 0x1401049a1
mov ecx, edx
and edx, 7
shr ecx, 3
sub rbx, rcx
mov r10, qword [rbx]
cmp rax, rbp
jb 0x140104b3d
jmp 0x140104b20
mov rcx, r9
jmp 0x140104b27
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
mov rax, qword [rsp + 0x60]
movzx edi, byte [rax + 2]
lea rbx, [rax + 4]
mov r10, rcx
mov rbp, rdx
lea r12, [rcx + rdx]
test r9, r9
je 0x140104ea0
movzx eax, byte [r8 + r9 - 1]
lea r13, [r8 + 8]
cmp r9, 7
jbe 0x140104ca0
mov rdx, 0xffffffffffffffff
test al, al
je 0x140104e27
cmp r9, 0xffffffffffffff88
ja 0x140104edc
sub r9, 8
bsr eax, eax
lea rsi, [r8 + r9]
xor eax, 0x1f
mov r11, qword [rsi]
sub eax, 0x17
cmp rbp, 3
jg 0x140104d27
cmp rsi, r13
jae 0x140104ec0
cmp r8, rsi
je 0x140104e38
mov edx, eax
mov rcx, rsi
shr edx, 3
mov r11d, edx
sub rcx, r11
cmp rcx, r8
jae 0x140104eb8
mov edx, r9d
mov r9d, r9d
sub rsi, r9
shl edx, 3
mov r11, qword [rsi]
sub eax, edx
jmp 0x140104e11
lea rcx, [0x1401ec684]
movzx r11d, byte [r8]
movsxd rdx, dword [rcx + r9*4]
add rdx, rcx
jmp rdx
movzx edx, byte [r8 + 6]
shl rdx, 0x30
add r11, rdx
movzx edx, byte [r8 + 5]
shl rdx, 0x28
add r11, rdx
movzx edx, byte [r8 + 4]
shl rdx, 0x20
add r11, rdx
movzx edx, byte [r8 + 3]
shl rdx, 0x18
add r11, rdx
movzx edx, byte [r8 + 2]
shl rdx, 0x10
add r11, rdx
movzx edx, byte [r8 + 1]
shl rdx, 8
add r11, rdx
test al, al
je 0x140104e20
bsr eax, eax
mov edx, 8
mov rsi, r8
xor eax, 0x1f
sub edx, r9d
lea eax, [rax + rdx*8 - 0x17]
cmp rbp, 3
jle 0x140104e38
mov r9d, edi
lea r14, [r12 - 3]
neg r9d
and r9d, 0x3f
jmp 0x140104dd9
shl edx, 3
mov r11, qword [rcx]
mov rsi, rcx
sub eax, edx
cmp r10, r14
jae 0x140104e11
mov ecx, eax
mov rdx, r11
add r10, 4
shl rdx, cl
mov ecx, r9d
shr rdx, cl
lea rdx, [rbx + rdx*2]
movzx ecx, byte [rdx + 1]
movzx edx, byte [rdx]
add edx, eax
mov byte [r10 - 4], cl
mov rax, r11
mov ecx, edx
shl rax, cl
mov ecx, r9d
shr rax, cl
lea rax, [rbx + rax*2]
movzx ecx, byte [rax + 1]
movzx eax, byte [rax]
add eax, edx
mov byte [r10 - 3], cl
mov rdx, r11
mov ecx, eax
shl rdx, cl
mov ecx, r9d
shr rdx, cl
lea rdx, [rbx + rdx*2]
movzx ecx, byte [rdx + 1]
movzx edx, byte [rdx]
add edx, eax
mov byte [r10 - 2], cl
mov rax, r11
mov ecx, edx
shl rax, cl
mov ecx, r9d
shr rax, cl
lea rax, [rbx + rax*2]
movzx ecx, byte [rax + 1]
movzx eax, byte [rax]
add eax, edx
mov byte [r10 - 1], cl
cmp eax, 0x40
ja 0x140104e11
cmp rsi, r13
jae 0x140104e80
cmp r8, rsi
je 0x140104e38
mov edx, eax
mov rcx, rsi
shr edx, 3
mov r11d, edx
sub rcx, r11
cmp rcx, r8
jae 0x140104d40
mov rdx, rsi
sub rdx, r8
mov ecx, edx
shl edx, 3
sub rsi, rcx
sub eax, edx
mov r11, qword [rsi]
cmp r10, r12
jb 0x140104e3d
cmp r8, rsi
je 0x140104e6f
nop dword [rax + rax]
mov rdx, 0xffffffffffffffec
mov rax, rdx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
cmp r10, r12
jae 0x140104e6f
neg edi
and edi, 0x3f
mov ecx, eax
mov rdx, r11
add r10, 1
shl rdx, cl
mov ecx, edi
shr rdx, cl
lea rdx, [rbx + rdx*2]
movzx r9d, byte [rdx + 1]
movzx edx, byte [rdx]
mov byte [r10 - 1], r9b
add eax, edx
cmp r12, r10
jne 0x140104e42
cmp r8, rsi
jne 0x140104e20
mov rdx, rbp
cmp eax, 0x40
jne 0x140104e20
jmp 0x140104e27
mov edx, eax
and eax, 7
shr edx, 3
sub rsi, rdx
mov r11, qword [rsi]
cmp r10, r14
jb 0x140104d54
jmp 0x140104e11
mov rdx, 0xffffffffffffffb8
mov rax, rdx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rsi, rcx
jmp 0x140104c93
mov edx, eax
and eax, 7
shr edx, 3
sub rsi, rdx
mov r11, qword [rsi]
cmp rcx, r12
jb 0x140104e3d
jmp 0x140104e20
mov rdx, r9
jmp 0x140104e27