Function at 0x140122cb0
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.14013ea00
cmp rax, 0xffffffffffffff88
ja 0x140122997
cmp rax, r12
jae 0x140122990
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 0x1401229a8
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp 0x140122cb0
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 0x1401229c0
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 0x140122c60
movzx edx, byte [r8 + r9 - 1]
lea r12, [r8 + 8]
cmp r9, 7
jbe 0x140122a70
mov rcx, 0xffffffffffffffff
test dl, dl
je 0x140122be7
cmp r9, 0xffffffffffffff88
ja 0x140122c9c
sub r9, 8
lzcnt edx, edx
sub edx, 0x17
lea rbx, [r8 + r9]
mov r10, qword [rbx]
cmp rdi, 3
jg 0x140122af5
cmp rbx, r12
jae 0x140122c80
cmp r8, rbx
je 0x140122bf8
mov ecx, edx
mov r10, rbx
shr ecx, 3
mov r12d, ecx
sub r10, r12
cmp r10, r8
jae 0x140122c78
mov ecx, r9d
mov r9d, r9d
sub rbx, r9
shl ecx, 3
mov r10, qword [rbx]
sub edx, ecx
jmp 0x140122bd6
lea rbx, [0x14020bfa4]
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 0x140122be0
mov ecx, 8
lzcnt edx, edx
mov rbx, r8
sub ecx, r9d
lea edx, [rdx + rcx*8 - 0x17]
cmp rdi, 3
jle 0x140122bf8
mov r9d, esi
lea r13, [rbp - 3]
neg r9d
and r9d, 0x3f
jmp 0x140122b9d
shl ecx, 3
mov r10, qword [r14]
mov rbx, r14
sub edx, ecx
cmp rax, r13
jae 0x140122bd6
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 0x140122bd6
cmp rbx, r12
jae 0x140122c40
cmp r8, rbx
je 0x140122bf8
mov ecx, edx
mov r14, rbx
shr ecx, 3
mov r10d, ecx
sub r14, r10
cmp r14, r8
jae 0x140122b10
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 0x140122bfd
cmp r8, rbx
je 0x140122c2c
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 0x140122c2c
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 0x140122c02
cmp r8, rbx
jne 0x140122be0
mov rcx, rdi
cmp edx, 0x40
jne 0x140122be0
jmp 0x140122be7
mov ecx, edx
and edx, 7
shr ecx, 3
sub rbx, rcx
mov r10, qword [rbx]
cmp rax, r13
jb 0x140122b24
jmp 0x140122bd6
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 0x140122a61
mov ecx, edx
and edx, 7
shr ecx, 3
sub rbx, rcx
mov r10, qword [rbx]
cmp rax, rbp
jb 0x140122bfd
jmp 0x140122be0
mov rcx, r9
jmp 0x140122be7
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 0x140122f60
movzx eax, byte [r8 + r9 - 1]
lea r13, [r8 + 8]
cmp r9, 7
jbe 0x140122d60
mov rdx, 0xffffffffffffffff
test al, al
je 0x140122ee7
cmp r9, 0xffffffffffffff88
ja 0x140122f9c
sub r9, 8
bsr eax, eax
lea rsi, [r8 + r9]
xor eax, 0x1f
mov r11, qword [rsi]
sub eax, 0x17
cmp rbp, 3
jg 0x140122de7
cmp rsi, r13
jae 0x140122f80
cmp r8, rsi
je 0x140122ef8
mov edx, eax
mov rcx, rsi
shr edx, 3
mov r11d, edx
sub rcx, r11
cmp rcx, r8
jae 0x140122f78
mov edx, r9d
mov r9d, r9d
sub rsi, r9
shl edx, 3
mov r11, qword [rsi]
sub eax, edx
jmp 0x140122ed1
lea rcx, [0x14020bfc4]
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 0x140122ee0
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 0x140122ef8
mov r9d, edi
lea r14, [r12 - 3]
neg r9d
and r9d, 0x3f
jmp 0x140122e99
shl edx, 3
mov r11, qword [rcx]
mov rsi, rcx
sub eax, edx
cmp r10, r14
jae 0x140122ed1
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 0x140122ed1
cmp rsi, r13
jae 0x140122f40
cmp r8, rsi
je 0x140122ef8
mov edx, eax
mov rcx, rsi
shr edx, 3
mov r11d, edx
sub rcx, r11
cmp rcx, r8
jae 0x140122e00
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 0x140122efd
cmp r8, rsi
je 0x140122f2f
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 0x140122f2f
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 0x140122f02
cmp r8, rsi
jne 0x140122ee0
mov rdx, rbp
cmp eax, 0x40
jne 0x140122ee0
jmp 0x140122ee7
mov edx, eax
and eax, 7
shr edx, 3
sub rsi, rdx
mov r11, qword [rsi]
cmp r10, r14
jb 0x140122e14
jmp 0x140122ed1
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 0x140122d53
mov edx, eax
and eax, 7
shr edx, 3
sub rsi, rdx
mov r11, qword [rsi]
cmp rcx, r12
jb 0x140122efd
jmp 0x140122ee0
mov rdx, r9
jmp 0x140122ee7