Function at 0x140130a70
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.14014c7c0
cmp rax, 0xffffffffffffff88
ja 0x140130757
cmp rax, r12
jae 0x140130750
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 0x140130768
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp 0x140130a70
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 0x140130780
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 0x140130a20
movzx edx, byte [r8 + r9 - 1]
lea r12, [r8 + 8]
cmp r9, 7
jbe 0x140130830
mov rcx, 0xffffffffffffffff
test dl, dl
je 0x1401309a7
cmp r9, 0xffffffffffffff88
ja 0x140130a5c
sub r9, 8
lzcnt edx, edx
sub edx, 0x17
lea rbx, [r8 + r9]
mov r10, qword [rbx]
cmp rdi, 3
jg 0x1401308b5
cmp rbx, r12
jae 0x140130a40
cmp r8, rbx
je 0x1401309b8
mov ecx, edx
mov r10, rbx
shr ecx, 3
mov r12d, ecx
sub r10, r12
cmp r10, r8
jae 0x140130a38
mov ecx, r9d
mov r9d, r9d
sub rbx, r9
shl ecx, 3
mov r10, qword [rbx]
sub edx, ecx
jmp 0x140130996
lea rbx, [0x14021aae4]
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 0x1401309a0
mov ecx, 8
lzcnt edx, edx
mov rbx, r8
sub ecx, r9d
lea edx, [rdx + rcx*8 - 0x17]
cmp rdi, 3
jle 0x1401309b8
mov r9d, esi
lea r13, [rbp - 3]
neg r9d
and r9d, 0x3f
jmp 0x14013095d
shl ecx, 3
mov r10, qword [r14]
mov rbx, r14
sub edx, ecx
cmp rax, r13
jae 0x140130996
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 0x140130996
cmp rbx, r12
jae 0x140130a00
cmp r8, rbx
je 0x1401309b8
mov ecx, edx
mov r14, rbx
shr ecx, 3
mov r10d, ecx
sub r14, r10
cmp r14, r8
jae 0x1401308d0
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 0x1401309bd
cmp r8, rbx
je 0x1401309ec
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 0x1401309ec
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 0x1401309c2
cmp r8, rbx
jne 0x1401309a0
mov rcx, rdi
cmp edx, 0x40
jne 0x1401309a0
jmp 0x1401309a7
mov ecx, edx
and edx, 7
shr ecx, 3
sub rbx, rcx
mov r10, qword [rbx]
cmp rax, r13
jb 0x1401308e4
jmp 0x140130996
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 0x140130821
mov ecx, edx
and edx, 7
shr ecx, 3
sub rbx, rcx
mov r10, qword [rbx]
cmp rax, rbp
jb 0x1401309bd
jmp 0x1401309a0
mov rcx, r9
jmp 0x1401309a7
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 0x140130d20
movzx eax, byte [r8 + r9 - 1]
lea r13, [r8 + 8]
cmp r9, 7
jbe 0x140130b20
mov rdx, 0xffffffffffffffff
test al, al
je 0x140130ca7
cmp r9, 0xffffffffffffff88
ja 0x140130d5c
sub r9, 8
bsr eax, eax
lea rsi, [r8 + r9]
xor eax, 0x1f
mov r11, qword [rsi]
sub eax, 0x17
cmp rbp, 3
jg 0x140130ba7
cmp rsi, r13
jae 0x140130d40
cmp r8, rsi
je 0x140130cb8
mov edx, eax
mov rcx, rsi
shr edx, 3
mov r11d, edx
sub rcx, r11
cmp rcx, r8
jae 0x140130d38
mov edx, r9d
mov r9d, r9d
sub rsi, r9
shl edx, 3
mov r11, qword [rsi]
sub eax, edx
jmp 0x140130c91
lea rcx, [0x14021ab04]
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 0x140130ca0
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 0x140130cb8
mov r9d, edi
lea r14, [r12 - 3]
neg r9d
and r9d, 0x3f
jmp 0x140130c59
shl edx, 3
mov r11, qword [rcx]
mov rsi, rcx
sub eax, edx
cmp r10, r14
jae 0x140130c91
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 0x140130c91
cmp rsi, r13
jae 0x140130d00
cmp r8, rsi
je 0x140130cb8
mov edx, eax
mov rcx, rsi
shr edx, 3
mov r11d, edx
sub rcx, r11
cmp rcx, r8
jae 0x140130bc0
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 0x140130cbd
cmp r8, rsi
je 0x140130cef
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 0x140130cef
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 0x140130cc2
cmp r8, rsi
jne 0x140130ca0
mov rdx, rbp
cmp eax, 0x40
jne 0x140130ca0
jmp 0x140130ca7
mov edx, eax
and eax, 7
shr edx, 3
sub rsi, rdx
mov r11, qword [rsi]
cmp r10, r14
jb 0x140130bd4
jmp 0x140130c91
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 0x140130b13
mov edx, eax
and eax, 7
shr edx, 3
sub rsi, rdx
mov r11, qword [rsi]
cmp rcx, r12
jb 0x140130cbd
jmp 0x140130ca0
mov rdx, r9
jmp 0x140130ca7