Function at 0x2016c0c0
Capabilities:
Encode data using xor
Parse pe header

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x60]
mov qword [rbp], 0xfffffffffffffffe
mov rax, qword [rcx + 8]
mov rcx, qword [0x204a2188]
add rcx, qword [rax + 0x38]
je 0x2016c20b
mov rdi, r8
cmp qword [r8 + 0x18], 0
je 0x2016c212
mov rbx, rdx
mov rax, rdx
shr rax, 0x2f
jne 0x2016c212
test rbx, rbx
je 0x2016c212
mov rsi, r9
mov edx, 0x40
mov rcx, rbx
call fcn.2016c410
test eax, eax
jne 0x2016c212
mov r15, qword [0x20459918]
movsxd r12, dword [r15]
mov r13d, dword [0x2037528c]
movzx eax, word [rbx]
cmp eax, 0x5a4d
jne 0x2016c212
movsxd rax, dword [rbx + 0x3c]
mov rcx, rax
xor rcx, rbx
and rax, rbx
lea r14, [rcx + rax*2]
mov edx, 0x108
mov rcx, r14
call fcn.2016c410
test eax, eax
jne 0x2016c212
cmp dword [r14], 0x4550
jne 0x2016c212
mov eax, dword [r14 + 0x90]
test rax, rax
je 0x2016c21c
lea rcx, [rax + rbx]
mov qword [rbp - 8], rcx
mov eax, dword [rax + rbx + 0xc]
test eax, eax
je 0x2016c394
add r12, r15
mov ecx, dword [0x20459910]
lea edx, [rcx + 1]
mov dword [0x20459910], edx
xor ecx, edx
not ecx
xor r14d, r14d
mov r15d, 0
mov qword [rbp - 0x40], rcx
mov dword [rbp - 0xc], edx
test ecx, edx
jne 0x2016c2c1
xor ecx, ecx
mov r14d, 0
mov r15d, 0
test r13d, r13d
jle 0x2016c2c1
xor r14d, r14d
xor r15d, r15d
movsxd rcx, ecx
xor r15, qword [r12 + rcx + 8]
xor r14, qword [r12 + rcx]
add ecx, 0x10
cmp ecx, r13d
jl 0x2016c1f2
jmp 0x2016c2c1
cmp qword [rax + 0x48], 0
je 0x2016c21c
mov ecx, 0x57
call fcn.2014f570
xor eax, eax
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov r8, qword [rcx - 8]
sub rcx, r8
add rcx, 0xfffffffffffffff8
mov rdx, qword [0x20375298]
mov r9, qword [0x20375290]
xor r10d, r10d
test dword [rbp - 0x40], r11d
setne r10b
add r10, 0xffffffffffffffff
mov r11d, 0
adc r11, 0xffffffffffffffff
sub r9, r14
sbb rdx, r15
and r9, r10
and rdx, r11
or rdx, r9
setne dl
or dl, byte [0x204a2278]
and dl, 1
mov byte [0x204a2278], dl
cmp rcx, 0x20
jae 0x2016c3a1
add rax, 0x28
mov rdx, rax
mov rcx, r8
mov r8d, 0x37d39d
call fcn.200807c0
test r13d, r13d
je 0x2016c383
mov rax, qword [rbp - 8]
lea rcx, [rax + 0x14]
mov qword [rbp - 8], rcx
mov eax, dword [rax + 0x20]
test eax, eax
je 0x2016c394
mov ecx, eax
xor rcx, rbx
mov edx, ebx
and edx, eax
lea r13, [rcx + rdx*2]
test r13, r13
lea rax, [0x2036ed38]
cmove r13, rax
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x18], 0xf
mov byte [rbp - 0x30], 0
mov rcx, r13
mov edx, 0xcdd305a5
call fcn.20080a60
mov r12, rax
cmp rax, 0xf
jbe 0x2016c317
lea rcx, [rbp - 0x30]
mov rdx, r12
mov r9, r13
call fcn.200712e0
jmp 0x2016c330
mov qword [rbp - 0x20], r12
lea rcx, [rbp - 0x30]
mov rdx, r13
mov r8, r12
call fcn.20353d70
mov byte [rbp + r12 - 0x30], 0
lea rax, [0x2036e458]
mov qword [rbp - 0x38], rax
mov rcx, rdi
lea rdx, [rbp - 0x38]
call fcn.2016c4a0
mov r11d, dword [rbp - 0xc]
mov r13d, eax
mov rax, qword [rbp - 0x18]
cmp rax, 0x10
jb 0x2016c2a1
mov rcx, qword [rbp - 0x30]
cmp byte [0x204a2278], 0
jne 0x2016c22f
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x2016c296
jmp 0x2016c22f
mov rcx, rsi
lea rdx, [rbp - 8]
call fcn.2016c7e0
jmp 0x2016c2aa
cmp qword [rsi + 8], 0
setne al
jmp 0x2016c21e
call fcn.2030c4cc
int3