Function at 0x140003830
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb8
mov rax, r8
mov r8, rdx
mov rdi, rcx
mov qword [rsp + 0x20], r9
lea rcx, [rsp + 0x50]
mov rdx, rdi
mov r9, rax
call fcn.140089820
cmp qword [rsp + 0x50], 0
mov rcx, qword [rsp + 0x98]
mov rdx, qword [rsp + 0xa0]
mov r9, qword [rsp + 0x60]
je 0x140003a29
mov r8, qword [rsp + 0x80]
test r8, r8
je 0x140003a30
mov qword [rsp + 0x28], rdi
mov rdi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0xa8]
mov rax, qword [rsp + 0xb0]
mov r10, qword [rsp + 0x70]
mov qword [rsp + 0x48], r10
mov r14, qword [rsp + 0x90]
mov r10, qword [rsp + 0x68]
mov qword [rsp + 0x30], r10
lea r10, [rbx - 1]
mov qword [rsp + 0x38], r10
mov r10, r8
jmp 0x1400038f4
cmp rdi, 0xffffffffffffffff
cmovne r14, rax
mov r8, r10
test r10, r10
je 0x140003af4
sub r10, rax
cmp r10, rdx
jae 0x140003af7
mov rbp, r8
sub rbp, qword [rsp + 0x30]
mov r11, r8
sub r11, r9
mov qword [rsp + 0x40], r11
mov r11, r8
cmp r8, r11
jne 0x140003af7
movzx r11d, byte [rcx + r10]
mov rsi, qword [rsp + 0x48]
bt rsi, r11
jae 0x14000398d
cmp r9, r14
mov r13, r14
cmovb r13, r9
cmp rdi, 0xffffffffffffffff
cmove r13, r9
lea r11, [r13 - 1]
cmp r11, rax
jae 0x1400039c0
mov r12, r13
neg r12
mov r11, qword [rsp + 0x38]
lea r15, [r11 + r13]
lea r11, [r10 + r13]
dec r11
test r12, r12
je 0x1400039c9
cmp r11, rdx
jae 0x140003b48
movzx r13d, byte [r15]
inc r12
dec r15
lea rsi, [r11 - 1]
cmp r13b, byte [rcx + r11]
mov r11, rsi
je 0x140003960
mov r10, qword [rsp + 0x40]
sub r10, r12
mov r11, rax
cmp rdi, 0xffffffffffffffff
je 0x140003999
mov r14, r11
mov r11, r10
mov rsi, r10
sub rsi, rax
mov r10, rsi
cmp rsi, rdx
jb 0x140003916
jmp 0x140003af7
test r13, r13
jne 0x140003b6b
cmp rdi, 0xffffffffffffffff
mov r11, r14
cmove r11, rax
lea r15, [rcx + r10]
mov r12, r9
nop dword [rax + rax]
cmp r12, r11
jae 0x1400038e0
cmp r12, rax
jae 0x140003b16
lea rsi, [r10 + r12]
cmp rsi, rdx
jae 0x140003b2f
movzx esi, byte [rbx + r12]
lea r13, [r12 + 1]
cmp sil, byte [r15 + r12]
mov r12, r13
je 0x1400039e0
mov r11, qword [rsp + 0x30]
mov r10, rbp
cmp rdi, 0xffffffffffffffff
jne 0x140003996
jmp 0x140003999
cmp byte [rsp + 0x6a], 0
je 0x140003a38
xor r8d, r8d
jmp 0x140003afc
movzx eax, byte [rsp + 0x69]
test r9, r9
jne 0x140003a76
xor r8d, r8d
test al, al
je 0x140003afc
nop dword [rax]
xor al, 1
jne 0x140003a50
jmp 0x140003afc
and r10d, 0x1f
shl r10d, 6
and r8d, 0x3f
or r8d, r10d
mov r10d, eax
xor r10b, 1
test al, al
mov eax, r10d
je 0x140003ae2
cmp r9, rdx
jae 0x140003a90
cmp byte [rcx + r9], 0xc0
jge 0x140003a96
jmp 0x140003b57
jne 0x140003b57
movzx r8d, byte [rcx + r9 - 1]
test r8b, r8b
jns 0x140003a68
movzx r10d, byte [rcx + r9 - 2]
cmp r10b, 0xbf
jg 0x140003a59
movzx r11d, byte [rcx + r9 - 3]
cmp r11b, 0xbf
jg 0x140003ace
movzx esi, byte [rcx + r9 - 4]
and esi, 7
shl esi, 6
and r11d, 0x3f
or r11d, esi
jmp 0x140003ad2
and r11d, 0xf
shl r11d, 6
and r10d, 0x3f
or r10d, r11d
jmp 0x140003a5d
xor eax, eax
cmp r8d, 0x110000
cmove r9, rax
mov r8, r9
jmp 0x140003afc
xor r8d, r8d
mov rdi, qword [rsp + 0x28]
mov rax, rdi
mov rdx, r8
add rsp, 0xb8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp r9, rax
cmovbe r9, rax
lea r8, [0x14009b298]
mov rcx, r9
mov rdx, rax
call fcn.140082710
add r10, r9
cmp rdx, r10
cmova r10, rdx
lea r8, [0x14009b2b0]
mov rcx, r10
call fcn.140082710
lea r8, [0x14009b2e0]
mov rcx, r11
call fcn.140082710
lea rax, [0x14009b2f8]
mov qword [rsp + 0x20], rax
xor r8d, r8d
call fcn.14008a430
lea r8, [0x14009b2c8]
mov rcx, r11
mov rdx, rax
call fcn.140082710
int3