Function at 0x14012bb90
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.1401478e0
cmp rax, 0xffffffffffffff88
ja 0x14012b877
cmp rax, r12
jae 0x14012b870
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 0x14012b888
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp 0x14012bb90
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 0x14012b8a0
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 0x14012bb40
movzx edx, byte [r8 + r9 - 1]
lea r12, [r8 + 8]
cmp r9, 7
jbe 0x14012b950
mov rcx, 0xffffffffffffffff
test dl, dl
je 0x14012bac7
cmp r9, 0xffffffffffffff88
ja 0x14012bb7c
sub r9, 8
lzcnt edx, edx
sub edx, 0x17
lea rbx, [r8 + r9]
mov r10, qword [rbx]
cmp rdi, 3
jg 0x14012b9d5
cmp rbx, r12
jae 0x14012bb60
cmp r8, rbx
je 0x14012bad8
mov ecx, edx
mov r10, rbx
shr ecx, 3
mov r12d, ecx
sub r10, r12
cmp r10, r8
jae 0x14012bb58
mov ecx, r9d
mov r9d, r9d
sub rbx, r9
shl ecx, 3
mov r10, qword [rbx]
sub edx, ecx
jmp 0x14012bab6
lea rbx, [0x140215b24]
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 0x14012bac0
mov ecx, 8
lzcnt edx, edx
mov rbx, r8
sub ecx, r9d
lea edx, [rdx + rcx*8 - 0x17]
cmp rdi, 3
jle 0x14012bad8
mov r9d, esi
lea r13, [rbp - 3]
neg r9d
and r9d, 0x3f
jmp 0x14012ba7d
shl ecx, 3
mov r10, qword [r14]
mov rbx, r14
sub edx, ecx
cmp rax, r13
jae 0x14012bab6
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 0x14012bab6
cmp rbx, r12
jae 0x14012bb20
cmp r8, rbx
je 0x14012bad8
mov ecx, edx
mov r14, rbx
shr ecx, 3
mov r10d, ecx
sub r14, r10
cmp r14, r8
jae 0x14012b9f0
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 0x14012badd
cmp r8, rbx
je 0x14012bb0c
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 0x14012bb0c
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 0x14012bae2
cmp r8, rbx
jne 0x14012bac0
mov rcx, rdi
cmp edx, 0x40
jne 0x14012bac0
jmp 0x14012bac7
mov ecx, edx
and edx, 7
shr ecx, 3
sub rbx, rcx
mov r10, qword [rbx]
cmp rax, r13
jb 0x14012ba04
jmp 0x14012bab6
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 0x14012b941
mov ecx, edx
and edx, 7
shr ecx, 3
sub rbx, rcx
mov r10, qword [rbx]
cmp rax, rbp
jb 0x14012badd
jmp 0x14012bac0
mov rcx, r9
jmp 0x14012bac7
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 0x14012be40
movzx eax, byte [r8 + r9 - 1]
lea r13, [r8 + 8]
cmp r9, 7
jbe 0x14012bc40
mov rdx, 0xffffffffffffffff
test al, al
je 0x14012bdc7
cmp r9, 0xffffffffffffff88
ja 0x14012be7c
sub r9, 8
bsr eax, eax
lea rsi, [r8 + r9]
xor eax, 0x1f
mov r11, qword [rsi]
sub eax, 0x17
cmp rbp, 3
jg 0x14012bcc7
cmp rsi, r13
jae 0x14012be60
cmp r8, rsi
je 0x14012bdd8
mov edx, eax
mov rcx, rsi
shr edx, 3
mov r11d, edx
sub rcx, r11
cmp rcx, r8
jae 0x14012be58
mov edx, r9d
mov r9d, r9d
sub rsi, r9
shl edx, 3
mov r11, qword [rsi]
sub eax, edx
jmp 0x14012bdb1
lea rcx, [0x140215b44]
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 0x14012bdc0
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 0x14012bdd8
mov r9d, edi
lea r14, [r12 - 3]
neg r9d
and r9d, 0x3f
jmp 0x14012bd79
shl edx, 3
mov r11, qword [rcx]
mov rsi, rcx
sub eax, edx
cmp r10, r14
jae 0x14012bdb1
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 0x14012bdb1
cmp rsi, r13
jae 0x14012be20
cmp r8, rsi
je 0x14012bdd8
mov edx, eax
mov rcx, rsi
shr edx, 3
mov r11d, edx
sub rcx, r11
cmp rcx, r8
jae 0x14012bce0
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 0x14012bddd
cmp r8, rsi
je 0x14012be0f
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 0x14012be0f
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 0x14012bde2
cmp r8, rsi
jne 0x14012bdc0
mov rdx, rbp
cmp eax, 0x40
jne 0x14012bdc0
jmp 0x14012bdc7
mov edx, eax
and eax, 7
shr edx, 3
sub rsi, rdx
mov r11, qword [rsi]
cmp r10, r14
jb 0x14012bcf4
jmp 0x14012bdb1
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 0x14012bc33
mov edx, eax
and eax, 7
shr edx, 3
sub rsi, rdx
mov r11, qword [rsi]
cmp rcx, r12
jb 0x14012bddd
jmp 0x14012bdc0
mov rdx, r9
jmp 0x14012bdc7