Function at 0x14012bad0
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.140146000
cmp rax, 0xffffffffffffff88
ja 0x14012b777
cmp rax, r12
jae 0x14012b770
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 0x14012b788
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp 0x14012bad0
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 0x14012b7a0
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
mov rbx, rdx
mov rax, rcx
mov rdx, qword [rsp + 0x60]
mov r11, rbx
lea rdi, [rcx + rbx]
test rbx, rbx
jg 0x14012b7c7
mov rdi, rcx
xor r11d, r11d
movzx ebp, byte [rdx + 2]
lea r10, [rdx + 4]
test r9, r9
je 0x14012ba80
movzx edx, byte [r8 + r9 - 1]
lea r12, [r8 + 8]
cmp r9, 7
jbe 0x14012b938
mov rcx, 0xffffffffffffffff
test dl, dl
je 0x14012b927
cmp r9, 0xffffffffffffff88
ja 0x14012bab4
sub r9, 8
lzcnt edx, edx
sub edx, 0x17
lea rsi, [r8 + r9]
mov rcx, qword [rsi]
cmp r11, 3
jle 0x14012ba40
mov r11, rsi
mov esi, ebp
lea r13, [rdi - 3]
neg esi
and esi, 0x3f
jmp 0x14012b8cf
shl ecx, 3
mov r11, r9
sub edx, ecx
mov rcx, qword [r9]
cmp rax, r13
jae 0x14012b90c
shlx r9, rcx, rdx
shrx r9, r9, rsi
lea r9, [r10 + r9*2]
add rax, 4
movzx r14d, byte [r9 + 1]
movzx r9d, byte [r9]
add r9d, edx
mov byte [rax - 4], r14b
shlx rdx, rcx, r9
shrx rdx, rdx, rsi
lea rdx, [r10 + rdx*2]
movzx r14d, byte [rdx + 1]
movzx edx, byte [rdx]
add edx, r9d
mov byte [rax - 3], r14b
shlx r9, rcx, rdx
shrx r9, r9, rsi
lea r9, [r10 + r9*2]
movzx r14d, byte [r9 + 1]
movzx r9d, byte [r9]
add r9d, edx
mov byte [rax - 2], r14b
shlx rdx, rcx, r9
shrx rdx, rdx, rsi
lea rdx, [r10 + rdx*2]
movzx r14d, byte [rdx + 1]
movzx edx, byte [rdx]
add edx, r9d
mov byte [rax - 1], r14b
cmp edx, 0x40
ja 0x14012ba30
cmp r11, r12
jae 0x14012ba10
cmp r8, r11
je 0x14012b9b9
mov ecx, edx
mov r9, r11
shr ecx, 3
mov r14d, ecx
sub r9, r14
cmp r9, r8
jae 0x14012b838
mov rcx, r11
sub rcx, r8
mov r9d, ecx
shl ecx, 3
sub r11, r9
sub edx, ecx
mov rcx, qword [r11]
cmp rax, rdi
jb 0x14012b9be
cmp r8, r11
je 0x14012b9f8
nop
mov rcx, 0xffffffffffffffec
mov rax, rcx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
lea r13, [0x14020f5b0]
movzx ecx, byte [r8]
movsxd rsi, dword [r13 + r9*4]
add rsi, r13
jmp rsi
movzx esi, byte [r8 + 6]
shl rsi, 0x30
add rcx, rsi
movzx esi, byte [r8 + 5]
shl rsi, 0x28
add rcx, rsi
movzx esi, byte [r8 + 4]
shl rsi, 0x20
add rcx, rsi
movzx esi, byte [r8 + 3]
shl rsi, 0x18
add rcx, rsi
movzx esi, byte [r8 + 2]
shl rsi, 0x10
add rcx, rsi
movzx esi, byte [r8 + 1]
shl rsi, 8
add rcx, rsi
test dl, dl
je 0x14012b920
mov esi, 8
lzcnt edx, edx
sub esi, r9d
cmp r11, 3
mov r11, r8
lea edx, [rdx + rsi*8 - 0x17]
jg 0x14012b824
cmp rax, rdi
jae 0x14012b9f8
neg ebp
and ebp, 0x3f
nop dword [rax + rax]
shlx r9, rcx, rdx
shrx r9, r9, rbp
lea r9, [r10 + r9*2]
add rax, 1
movzx esi, byte [r9 + 1]
movzx r9d, byte [r9]
mov byte [rax - 1], sil
add edx, r9d
cmp rax, rdi
jne 0x14012b9c8
cmp r8, r11
jne 0x14012b920
mov rcx, rbx
cmp edx, 0x40
jne 0x14012b920
jmp 0x14012b927
mov ecx, edx
and edx, 7
shr ecx, 3
sub r11, rcx
mov rcx, qword [r11]
cmp rax, r13
jb 0x14012b84c
jmp 0x14012b90c
lea r11, [0x14023e570]
jmp 0x14012b90c
cmp rsi, r12
jae 0x14012ba95
cmp r8, rsi
je 0x14012babc
mov ecx, edx
mov r11, rsi
shr ecx, 3
mov r12d, ecx
sub r11, r12
cmp r11, r8
jae 0x14012ba69
mov ecx, r9d
mov r9d, r9d
sub rsi, r9
mov r11, rsi
shl ecx, 3
sub edx, ecx
mov rcx, qword [r11]
jmp 0x14012b90c
mov rcx, 0xffffffffffffffb8
mov rax, rcx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov ecx, edx
and edx, 7
shr ecx, 3
sub rsi, rcx
mov rcx, qword [rsi]
mov r11, rsi
cmp rax, rdi
jb 0x14012b9be
jmp 0x14012b920
mov rcx, r9
jmp 0x14012b927
mov r11, r8
jmp 0x14012b9b9
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
mov rax, qword [rsp + 0x68]
mov r10, rcx
mov rsi, rdx
mov rcx, rdx
lea rbp, [r10 + rdx]
test rdx, rdx
jg 0x14012baf8
mov rbp, r10
xor ecx, ecx
movzx r12d, byte [rax + 2]
lea r11, [rax + 4]
test r9, r9
je 0x14012bdc0
movzx eax, byte [r8 + r9 - 1]
lea r13, [r8 + 8]
cmp r9, 7
jbe 0x14012bc80
mov rdx, 0xffffffffffffffff
test al, al
je 0x14012bc6f
cmp r9, 0xffffffffffffff88
ja 0x14012bdf6
sub r9, 8
bsr eax, eax
lea rdi, [r8 + r9]
xor eax, 0x1f
mov rdx, qword [rdi]
sub eax, 0x17
cmp rcx, 3
jle 0x14012bd88
mov rbx, rdi
mov edi, r12d
lea r14, [rbp - 3]
neg edi
and edi, 0x3f
jmp 0x14012bc13
shl edx, 3
mov rbx, rcx
sub eax, edx
mov rdx, qword [rcx]
cmp r10, r14
jae 0x14012bc4f
mov ecx, eax
mov r9, rdx
add r10, 4
shl r9, cl
mov ecx, edi
shr r9, cl
lea rcx, [r11 + r9*2]
movzx r9d, byte [rcx]
movzx r15d, byte [rcx + 1]
add r9d, eax
mov rax, rdx
mov byte [r10 - 4], r15b
mov ecx, r9d
shl rax, cl
mov ecx, edi
shr rax, cl
lea rax, [r11 + rax*2]
movzx ecx, byte [rax + 1]
movzx eax, byte [rax]
add eax, r9d
mov byte [r10 - 3], cl
mov r9, rdx
mov ecx, eax
shl r9, cl
mov ecx, edi
shr r9, cl
lea rcx, [r11 + r9*2]
movzx r9d, byte [rcx]
movzx r15d, byte [rcx + 1]
add r9d, eax
mov rax, rdx
mov byte [r10 - 2], r15b
mov ecx, r9d
shl rax, cl
mov ecx, edi
shr rax, cl
lea rax, [r11 + rax*2]
movzx ecx, byte [rax + 1]
movzx eax, byte [rax]
add eax, r9d
mov byte [r10 - 1], cl
cmp eax, 0x40
ja 0x14012bd78
cmp rbx, r13
jae 0x14012bd58
cmp r8, rbx
je 0x14012bd03
mov edx, eax
mov rcx, rbx
shr edx, 3
mov r9d, edx
sub rcx, r9
cmp rcx, r8
jae 0x14012bb70
mov rdx, rbx
sub rdx, r8
mov ecx, edx
shl edx, 3
sub rbx, rcx
sub eax, edx
mov rdx, qword [rbx]
cmp r10, rbp
jb 0x14012bd08
cmp r8, rbx
je 0x14012bd44
nop dword [rax]
mov rdx, 0xffffffffffffffec
mov rax, rdx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdi, [0x14020f5d0]
movzx edx, byte [r8]
movsxd rbx, dword [rdi + r9*4]
add rbx, rdi
jmp rbx
movzx ebx, byte [r8 + 6]
shl rbx, 0x30
add rdx, rbx
movzx ebx, byte [r8 + 5]
shl rbx, 0x28
add rdx, rbx
movzx ebx, byte [r8 + 4]
shl rbx, 0x20
add rdx, rbx
movzx ebx, byte [r8 + 3]
shl rbx, 0x18
add rdx, rbx
movzx ebx, byte [r8 + 2]
shl rbx, 0x10
add rdx, rbx
movzx ebx, byte [r8 + 1]
shl rbx, 8
add rdx, rbx
test al, al
je 0x14012bc68
bsr eax, eax
mov ebx, 8
sub ebx, r9d
xor eax, 0x1f
lea eax, [rax + rbx*8 - 0x17]
mov rbx, r8
cmp rcx, 3
jg 0x14012bb58
cmp r10, rbp
jae 0x14012bd44
neg r12d
and r12d, 0x3f
nop
mov ecx, eax
mov r9, rdx
add r10, 1
shl r9, cl
mov ecx, r12d
shr r9, cl
lea r9, [r11 + r9*2]
movzx edi, byte [r9 + 1]
movzx r9d, byte [r9]
mov byte [r10 - 1], dil
add eax, r9d
cmp r10, rbp
jne 0x14012bd10
cmp r8, rbx
jne 0x14012bc68
mov rdx, rsi
cmp eax, 0x40
jne 0x14012bc68
jmp 0x14012bc6f
mov edx, eax
and eax, 7
shr edx, 3
sub rbx, rdx
mov rdx, qword [rbx]
cmp r10, r14
jb 0x14012bb84
jmp 0x14012bc4f
lea rbx, [0x14023e570]
jmp 0x14012bc4f
cmp rdi, r13
jae 0x14012bdd7
cmp r8, rdi
je 0x14012bdfe
mov edx, eax
mov rbx, rdi
shr edx, 3
mov ecx, edx
sub rbx, rcx
cmp rbx, r8
jae 0x14012bdb0
mov edx, r9d
mov rbx, rdi
mov r9d, r9d
sub rbx, r9
shl edx, 3
sub eax, edx
mov rdx, qword [rbx]
jmp 0x14012bc4f
mov rdx, 0xffffffffffffffb8
mov rax, rdx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov edx, eax
mov rbx, rdi
and eax, 7
shr edx, 3
sub rbx, rdx
mov rdx, qword [rbx]
cmp r10, rbp
jb 0x14012bd08
jmp 0x14012bc68
mov rdx, r9
jmp 0x14012bc6f
mov rbx, r8
jmp 0x14012bd03