Function at 0x140115bc0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov rdi, r9
mov r9, rcx
mov r13d, edx
mov r12d, 1
cmp edx, 3
jne 0x140115bf3
mov eax, r12d
jmp 0x140115c06
mov rcx, r8
xor edx, edx
mov r8, r12
mov eax, 0x400000
shl r8, cl
div r8
lea r15, [rax + rax*4]
mov qword [rbp - 0x38], rax
shl r15, 4
add r15, 0x17f
and r15, 0xffffffffffffff00
mov qword [rbp - 0x28], r15
mov qword [rbp - 0x20], r15
test r9, r9
jne 0x140115c35
mov r14d, 0x400000
jmp 0x140115c46
lea r14, [r9 + 0x3ffff]
add r14, r15
and r14, 0xfffffffffffc0000
mov ecx, 0xb
call fcn.14011a2f0
mov rcx, qword [rdi + 0x20]
cdqe
mov qword [rbp - 0x30], rax
mov qword [rbp + 0x58], rcx
cmp rcx, rax
jb 0x140115c71
mov ecx, 3
call fcn.14011a4d0
test al, al
jne 0x140115c7b
cmp r13d, 1
jg 0x140115c7b
xor al, al
jmp 0x140115c7d
mov al, 1
xor esi, esi
mov qword [rsp + 0x78], rbx
mov byte [rbp + 0x40], al
mov byte [rbp + 0x48], 0
test r14, 0xffffffffffbfffff
jne 0x140115d41
mov rbx, qword [rdi + 0x50]
test rbx, rbx
je 0x140115d41
dec qword [rdi + 0x40]
mov rdx, r12
mov rax, qword [rbx + 0x10]
mov qword [rdi + 0x50], rax
mov qword [rbx + 0x10], rsi
mov rcx, qword [rdi + 0x58]
add rcx, 0x1e0
call fcn.14011a6e0
cmp byte [rbx + 9], sil
jne 0x140115cec
cmp r13d, 1
jle 0x140115cec
mov r9, qword [rdi + 0x58]
lea r8, [rbp + 0x48]
mov rdx, qword [rbx + 0x40]
mov rcx, rbx
call fcn.140117eb0
mov byte [rbx + 9], 1
cmp byte [rbx + 8], sil
jne 0x140115dd5
mov ecx, 9
call fcn.14011a4d0
test al, al
jne 0x140115d16
mov ecx, 8
call fcn.14011a4d0
test al, al
je 0x140115dd5
mov r9, qword [rdi + 0x58]
lea r8, [rbp + 0x58]
mov rdx, qword [rbx + 0x40]
mov rcx, rbx
mov byte [rbp + 0x58], sil
call fcn.140118060
cmp byte [rbp + 0x58], sil
je 0x140115dd5
mov byte [rbp + 0x48], 1
jmp 0x140115dd5
mov rax, qword [rbp + 0x58]
lea r9, [rbp - 0x3f]
cmp rax, qword [rbp - 0x30]
lea r8, [rbp + 0x40]
mov rax, qword [rbp + 0x60]
mov edx, 0x400000
mov qword [rsp + 0x30], rax
mov rcx, r14
lea rax, [rbp - 0x30]
setae byte [rbp - 0x3f]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x48]
mov qword [rsp + 0x20], rax
call fcn.140117b50
mov rbx, rax
test rax, rax
je 0x140115e8a
cmp byte [rbp + 0x40], sil
jne 0x140115db5
mov r9, qword [rdi + 0x58]
lea r8, [rbp - 0x40]
mov rdx, r15
mov byte [rbp - 0x40], sil
mov rcx, rbx
call fcn.140117eb0
movzx eax, byte [rbp + 0x48]
cmp byte [rbp - 0x40], sil
cmovne eax, r12d
mov byte [rbp + 0x48], al
mov rax, qword [rbp - 0x30]
mov rdx, rdi
mov qword [rbx], rax
mov ecx, r14d
movzx eax, byte [rbp - 0x3f]
mov byte [rbx + 8], al
movzx eax, byte [rbp + 0x40]
mov byte [rbx + 9], al
call fcn.140116390
lea r8, [r15 - 0x10]
xor edx, edx
lea rcx, [rbx + 0x10]
call sub.VCRUNTIME140.dll_memset
mov rax, qword [rbp - 0x38]
mov rcx, rbx
mov qword [rbx + 0x38], rax
mov rax, qword [rbp + 0x50]
mov qword [rbx + 0x58], rax
mov dword [rbx + 0x68], r13d
mov qword [rbx + 0x40], r14
mov qword [rbx + 0x48], r15
mov rax, qword gs:[0x30]
mov qword [rbx + 0x60], rax
call fcn.140117530
xor r8b, r8b
mov qword [rbx + 0x50], rax
cmp qword [rbx + 0x38], rsi
jbe 0x140115e73
nop dword [rax]
nop word [rax + rax]
lea rdx, [rsi + rsi*4]
shl rdx, 4
add rdx, rbx
and byte [rdx + 0x71], 0xfd
mov byte [rdx + 0x70], r8b
inc r8b
movzx ecx, byte [rbp + 0x40]
shl cl, 2
xor cl, byte [rdx + 0x71]
and cl, 4
movzx esi, r8b
xor cl, byte [rdx + 0x71]
mov byte [rdx + 0x71], cl
movzx eax, byte [rbp + 0x48]
shl al, 3
xor al, cl
and al, 8
xor al, cl
mov byte [rdx + 0x71], al
cmp rsi, qword [rbx + 0x38]
jb 0x140115e30
mov rcx, qword [rdi + 0x58]
mov rdx, qword [rbx + 0x48]
add rcx, 0xa0
call fcn.14011a6f0
mov rax, rbx
mov rbx, qword [rsp + 0x78]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret