Function at 0x14016dbd0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x488
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x400], 0xfffffffffffffffe
cmp byte [rcx + 8], 0
jne 0x14016dc5d
mov ebx, r8d
mov rdi, rdx
mov rsi, rcx
cmp qword [0x1405ac398], 0
jne 0x14016dc41
mov ecx, 0x900
mov edx, 0xdc26137e
mov r8d, 0xdf04b2a1
call fcn.1400a8fb0
mov qword [rbp + 0x3f0], rax
mov rcx, rax
call fcn.140086cf0
mov rax, qword [rbp + 0x3f0]
mov qword [0x1405ac398], rax
mov r14, qword [0x1405ac398]
mov rax, qword [r14 + 0x700]
mov rcx, rdi
call qword [case.0x14013008b.0]
cmp eax, 0xffffffff
je 0x14016dc77
mov eax, dword [0x1405a9960]
add rsp, 0x488
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov eax, dword [0x1405a9964]
cmp eax, 0x25
jle 0x14016dc84
jmp 0x14016dcec
mov qword [rbp + 0x3f8], 0
mov rax, qword [r14 + 0x710]
lea r8, [rbp - 0x60]
lea r9, [rbp + 0x3f8]
mov rcx, rdi
mov edx, 0x400
call qword [case.0x14013008b.0]
mov ecx, eax
mov edx, dword [0x1405a9960]
lea eax, [rdx - 1]
imul eax, edx
mov r8d, dword [0x1405442d8]
mov edx, r8d
xor edx, 0xbc252bb6
mov r9d, r8d
and r9d, 0x3c252bb6
lea r9d, [rdx + r9*2]
xor edx, edx
div r9d
add r8d, 0xbc252bb4
cmp edx, r8d
je 0x14016dd1c
mov qword [rbp + 0x3f8], 0
mov rax, qword [r14 + 0x710]
lea r8, [rbp - 0x60]
lea r9, [rbp + 0x3f8]
mov rcx, rdi
mov edx, 0x400
call qword [case.0x14013008b.0]
jmp 0x14016dc84
test ecx, ecx
je 0x14016dc5d
mov qword [rbp + 0x3b8], 0
mov qword [rbp + 0x3c0], 0xf
mov byte [rbp + 0x3a8], 0
lea rax, [0x140463118]
mov qword [rbp + 0x3a0], rax
lea rcx, [rbp + 0x3a0]
lea rdx, [rbp - 0x60]
mov r8d, 2
call fcn.14027d590
xor eax, eax
test al, al
nop dword [rax]
mov edi, dword [rbp + 0x3b8]
mov eax, dword [0x1405a9964]
cmp eax, 0x35
jg 0x14016dd70
test edi, edi
lea r15, [rbp + 0x3a8]
je 0x14016de2a
cmp dword [0x1405442d8], 0x43dad44c
je 0x14016dd9e
jmp 0x14016ddd4
cmp qword [rbp + 0x3c0], 0x10
mov rcx, r15
jb 0x14016ddb2
mov rcx, qword [rbp + 0x3a8]
mov eax, 0xbc252bb5
add eax, dword [0x1405442d8]
lea rdx, [fcn.14016dbd0]
add edx, edx
add edx, 0x3f00
xor edx, eax
not edx
test edx, eax
je 0x14016de23
lea r14, [0x1401779c0]
nop dword [rax + rax]
mov eax, dword [0x1405442d8]
mov ecx, eax
xor ecx, 0xbc252c15
and eax, 0x3c252c15
add eax, eax
mov edx, ecx
xor edx, eax
and eax, ecx
lea ecx, [rdx + rax*2]
call fcn.1403fe444
mov qword [0x1405a9958], rax
mov rcx, r14
call fcn.14041e5a0
cmp dword [0x1405442d8], 0x43dad44c
jne 0x14016dde0
jmp 0x14016dd9e
mov edx, edi
call fcn.140086c20
mov eax, dword [0x1405a9960]
lea ecx, [rax + 1]
nop word cs:[rax + rax]
imul ecx, eax
test cl, 1
je 0x14016de5a
mov eax, dword [0x1405a9960]
mov ecx, dword [0x1405442d8]
add ecx, eax
dec ecx
jmp 0x14016de40
lea rdi, [rsi + 0x90]
lea rdx, [rbp + 0x3a0]
mov rcx, rdi
call fcn.14010d010
mov ecx, 0xbc252bb4
nop word cs:[rax + rax]
mov rdx, qword [rdi]
mov r8d, dword [0x1405a9960]
lea r9d, [r8 - 1]
imul r9d, r8d
and r9d, 1
mov r8d, dword [0x1405442d8]
add r8d, ecx
cmp r9d, r8d
je 0x14016deb9
mov edx, dword [0x1405a9960]
lea r8d, [rdx - 1]
imul r8d, edx
test r8b, 1
jmp 0x14016de80
cmp rax, rdx
jne 0x14016e0a6
lea rdi, [rbp + 0x3d0]
movabs r13, 0x9bb69b0f04e4a9fb
movabs r12, 0x9bb69b0f04e4aa0a
lea r14, [rbp - 0x60]
nop word cs:[rax + rax]
mov rax, qword [0x1405442e0]
lea rcx, [rax + r13]
mov qword [rbp + 0x3e0], rcx
add rax, r12
mov qword [rbp + 0x3e8], rax
movzx eax, byte [0x1405442e8]
add al, 0x87
mov byte [rbp + 0x3d0], al
mov rcx, r14
mov edx, 0xc614a2a1
mov r8d, 0xcc2ef73b
call fcn.1400ac220
mov r15, rax
mov eax, dword [0x1405a9960]
mov ecx, dword [0x1405442d8]
add ecx, eax
dec ecx
imul ecx, eax
test cl, 1
je 0x14016df68
mov qword [rbp + 0x3e0], 0
mov qword [rbp + 0x3e8], 0xf
mov byte [rbp + 0x3d0], 0
jmp 0x14016def0
cmp r15, 0xf
jbe 0x14016df8c
mov eax, dword [0x1405a9960]
lea r9, [rbp - 0x60]
mov rcx, rdi
mov rdx, r15
call fcn.14008a200
lea rax, [0x140463118]
jmp 0x14016dfb2
mov qword [rbp + 0x3e0], r15
lea rdx, [rbp - 0x60]
mov rcx, rdi
mov r8, r15
call fcn.140446180
mov byte [rbp + r15 + 0x3d0], 0
lea rax, [0x140463118]
mov qword [rbp + 0x3c8], rax
test bl, bl
je 0x14016dfd2
add rsi, 0x10
lea rdx, [rbp + 0x3c8]
mov rcx, rsi
call fcn.14016e290
jmp 0x14016dfe5
add rsi, 0x30
lea rdx, [rbp + 0x3c8]
mov rcx, rsi
call fcn.14016e290
mov eax, 0xbc252bb5
add eax, dword [0x1405442d8]
lea rcx, [fcn.14016dbd0]
add ecx, ecx
add ecx, 0x4980
xor ecx, eax
not ecx
test ecx, eax
jne 0x14016e030
jmp 0x14016e009
mov rax, qword [rbp + 0x3e8]
mov ecx, dword [0x1405a9960]
lea edx, [rcx - 1]
imul edx, ecx
test dl, 1
je 0x14016e03d
nop word cs:[rax + rax]
mov eax, dword [0x1405a9964]
cmp eax, 0x2b
jge 0x14016e030
jmp 0x14016e009
cmp rax, 0x10
jb 0x14016e0a6
mov rcx, qword [rbp + 0x3d0]
mov r8, qword [0x1405442e0]
add r8, rax
movabs rdx, 0x9bb69b0f04e4a9fc
add rdx, r8
cmp rdx, 0x1000
jb 0x14016e0a1
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
movabs rdx, 0x9bb69b0f04e4aa1b
add rdx, qword [0x1405442e0]
cmp rcx, rdx
jae 0x14016e123
mov rcx, qword [0x1405a9968]
lea rdx, [rax + rcx]
add rdx, 0x28
mov rcx, r8
call fcn.1400a82c0
mov rax, qword [rbp + 0x3c0]
cmp rax, 0x10
jb 0x14016dc5d
mov rcx, qword [rbp + 0x3a8]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x14016e114
mov r8, qword [rcx - 8]
movabs rdx, 0xdf1dc5c7a15f0761
xor rdx, rcx
movabs r9, 0x5f1dc5c7a15f0761
and r9, rcx
lea rcx, [rdx + r9*2]
add rcx, qword [0x1405442e0]
sub rcx, r8
movabs rdx, 0xbc98d5476385a292
add rdx, rcx
cmp rdx, 0x20
jae 0x14016e11e
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.1400a82c0
jmp 0x14016dc5d
call fcn.1403fe3cc
call fcn.1403fe3cc
int3