Function at 0x2039b9e0
Capabilities:
Encode data using xor
Execute anti-debugging instructions

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x4f8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x470], 0xfffffffffffffffe
mov rdi, rdx
mov rbx, rcx
mov qword [rbp + 0x468], 0
xor ecx, ecx
xor edx, edx
mov r8d, 0x54d50a7c
mov r9d, 0xa22dfceb
call fcn.2039d5d0
cmp rbx, 0x12345678
je 0x2039ba78
mov r15, rax
call fcn.2039b3c0
test rdi, rdi
setns al
sets cl
cmp rdi, 0x10000
setae r13b
setb dl
and r13b, cl
and cl, dl
and al, dl
or r13b, al
xor r13b, cl
rdtsc
mov qword [rbp + 0x440], rdx
mov qword [rbp + 0x400], rax
je 0x2039babd
xor r14d, r14d
jmp 0x2039baca
cmp qword [0x20598fcc], 0x33c0
jne 0x2039c03c
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x30], 0x1a223a2b
mov ecx, 1
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call fcn.2039d230
add rax, 0x33c0
mov qword [0x20598fcc], rax
jmp 0x2039c03c
movzx eax, byte [rdi]
add al, byte [0x205b6d58]
sete r14b
mov r12, rbx
test rbx, rbx
jne 0x2039baed
mov ecx, 1
xor edx, edx
mov r8d, 0x7fb4a6fe
mov r9d, 0x5b1d481c
call fcn.2039d580
mov r12, rax
movzx eax, byte [0x205b6d30]
mov ecx, eax
xor cl, 0xfe
test cl, al
je 0x2039bb3e
mov dword [rsp + 0x20], 0xde99c40c
mov ecx, 1
mov edx, 1
mov r8d, 0x7701725
mov r9d, 0x529ce0b2
call fcn.2039e280
test rax, rax
je 0x2039bb3e
test r13b, r13b
je 0x2039bb89
lea r9, [rbp + 0x468]
mov rcx, rbx
xor edx, edx
mov r8d, edi
jmp 0x2039bbfc
test r12, r12
je 0x2039bc14
mov eax, dword [0x205b3b80]
add eax, dword [r12 + 0x3c]
je 0x2039bc14
mov eax, eax
cmp dword [r12 + rax], 0x4550
jne 0x2039bc14
cmp dword [r12 + rax + 0x88], 0
je 0x2039bb82
cmp dword [r12 + rax + 0x8c], 0
jne 0x2039bc14
xor esi, esi
jmp 0x2039bc31
mov qword [rbp - 0x20], 0
xor ecx, ecx
test rdi, rdi
je 0x2039bbdd
mov edx, 1
xor r8d, r8d
xor r9d, r9d
cmp byte [rdi + rcx], 0
setne r9b
movzx r8d, r8b
cmove r8d, edx
add rcx, r9
mov r9d, r8d
not r9b
mov r10d, r9d
and r10b, 1
mov r11d, r8d
xor r11b, 1
and r11b, r8b
or r11b, r10b
and r9b, 0xfe
or r9b, r11b
cmp r9b, 0xff
je 0x2039bba0
mov word [rbp - 0x20], cx
inc ecx
mov word [rbp - 0x1e], cx
mov qword [rbp - 0x18], rdi
lea rdx, [rbp - 0x20]
lea r9, [rbp + 0x468]
mov rcx, rbx
xor r8d, r8d
call qword [case.0x2010e313.0]
cmp eax, 0xc0000138
jne 0x2039bc14
mov qword [rbp + 0x468], 0
lea rcx, [rbp - 0x20]
mov r8d, 0x400
xor edx, edx
call fcn.2044feb0
mov sil, 1
test r14b, r14b
je 0x2039bd3a
mov rax, qword [rbp + 0x440]
shl rax, 0x20
mov r14, qword [rbp + 0x400]
or r14, rax
lea rcx, [rbp - 0x20]
mov r8d, 0x400
xor edx, edx
call fcn.2044feb0
rdtsc
shl rdx, 0x20
or rdx, rax
sub rdx, r14
cmp qword [0x20598f68], 0
je 0x2039bc79
mov rax, qword [0x20598f68]
cmp rax, rdx
jae 0x2039bc80
mov qword [0x20598f68], rdx
cmp qword [rbp + 0x468], 0
setne al
xor sil, 1
or sil, al
jne 0x2039bfd9
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x58], 0xb970ad78
mov dword [rsp + 0x50], 0xbf3883e9
mov dword [rsp + 0x48], 0xfbf13cfd
mov qword [rsp + 0x40], 0
mov ecx, 1
mov edx, 1
xor r8d, r8d
xor r9d, r9d
call fcn.2039e200
cmp eax, 0x4750412d
je 0x2039bfd9
mov dword [rsp + 0x20], 0xde99c40c
mov ecx, 1
mov edx, 1
mov r8d, 0x7701725
mov r9d, 0x529ce0b2
call fcn.2039e280
test rax, rax
je 0x2039bfd9
inc qword [0x20598f08]
cmp rdi, 0xffff
ja 0x2039be41
lea r9, [rbp + 0x468]
mov rcx, rbx
xor edx, edx
mov r8d, edi
jmp 0x2039becd
xor r12d, r12d
xor ecx, ecx
mov edx, 1
mov r8, rbx
mov r9d, 0xce7c9fb1
call fcn.2039d2d0
test rax, rax
je 0x2039bc31
nop dword [rax + rax]
mov r14d, r12d
movzx ecx, word [rax + r14*2]
test ecx, ecx
je 0x2039bda9
cmp ecx, 0x2e
je 0x2039bda9
mov byte [rbp + r14 - 0x20], cl
mov ecx, r12d
not ecx
mov edx, ecx
and edx, 1
mov r8d, r12d
and r8d, 0xfffffffe
or r8d, edx
xor r12d, 1
and ecx, 0x7ffffffe
or ecx, r12d
not ecx
add ecx, ecx
mov edx, r8d
xor edx, ecx
and ecx, r8d
lea r12d, [rdx + rcx*2]
jmp 0x2039bd60
mov eax, 0x400
sub eax, r12d
cmp eax, 2
jb 0x2039bc31
mov dword [rbp + 0x414], eax
mov qword [rbp + 0x460], 0xf
mov qword [rbp + 0x458], 1
mov word [rbp + 0x448], 0x2e
test r13b, r13b
je 0x2039bf1e
mov rax, qword [rbp + 0x458]
mov rcx, qword [rbp + 0x460]
cmp rcx, rax
jne 0x2039c057
mov dword [rsp + 0x20], 0x196c5e56
xor ecx, ecx
mov edx, 1
mov r8d, 0x4caa3e99
mov r9d, 0x47ea3fbc
call fcn.2039e350
mov qword [rsp + 0x20], 1
lea rcx, [rbp + 0x448]
mov edx, 1
mov r9, rax
call fcn.2006cb20
jmp 0x2039c0a1
mov qword [rbp + 0x448], 0
xor ecx, ecx
test rdi, rdi
je 0x2039be8d
xor edx, edx
jmp 0x2039be7b
mov edx, 1
mov r8b, r9b
add rcx, r8
mov r8d, edx
not r8b
or r8b, 0xfe
cmp r8b, 0xff
jne 0x2039be8d
xor r8d, r8d
cmp byte [rdi + rcx], 0
setne r9b
je 0x2039be60
movzx edx, dl
jmp 0x2039be65
mov word [rbp + 0x448], cx
add ecx, 0xffff8240
mov edx, ecx
xor edx, 0x7dc1
and ecx, 0x7dc1
lea ecx, [rdx + rcx*2]
mov word [rbp + 0x44a], cx
mov qword [rbp + 0x450], rdi
lea rdx, [rbp + 0x448]
lea r9, [rbp + 0x468]
mov rcx, rbx
xor r8d, r8d
call qword [case.0x2010e313.0]
cmp eax, 0xc0000142
je 0x2039bee5
cmp eax, 0xc0000138
jne 0x2039bf70
mov qword [rbp + 0x468], 0
xor eax, eax
cmp rdi, 0x10000
setae al
lea rcx, [0x20598ea0]
inc qword [0x20598f40]
inc qword [0x20598f10]
lea rax, [rcx + rax*8]
add rax, 0x78
jmp 0x2039bfa2
mov rcx, rdi
mov edx, 0xa2a5ba54
mov r8d, 0x86f9a3d2
mov r9d, 0x6bd7d4ac
call fcn.2008dcc0
mov rcx, qword [rbp + 0x458]
mov rdx, qword [rbp + 0x460]
mov r8, rdx
sub r8, rcx
cmp r8, rax
jae 0x2039c071
mov qword [rsp + 0x20], rax
lea rcx, [rbp + 0x448]
mov rdx, rax
mov r9, rdi
call fcn.2006cb20
jmp 0x2039c2bc
cmp qword [rbp + 0x468], 0
je 0x2039bef0
xor eax, eax
cmp rdi, 0x10000
setae al
lea rcx, [0x20598ea0]
inc qword [0x20598f28]
lea rax, [rcx + rax*8]
add rax, 0x90
mov rcx, qword [rax]
mov rdx, rcx
not rdx
movabs r8, 0x7ffffffffffffffe
xor r8, rcx
mov r9, rcx
and r9, 0xfffffffffffffffe
and r8, rdx
and edx, 1
or rdx, r9
xor rcx, 1
or r8, rcx
not r8
lea rcx, [rdx + r8*2]
mov qword [rax], rcx
mov dword [rsp + 0x20], 0x3e5a555d
xor esi, esi
mov ecx, 1
xor edx, edx
mov r8, r15
mov r9d, 0x3381110e
call fcn.2039d4b0
movzx r8d, r13b
xor r8d, 0xc0000139
cmp qword [rbp + 0x468], 0
cmovne r8d, esi
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x40], 0x64f60ece
mov dword [rsp + 0x38], 0x5b1d481c
mov qword [rsp + 0x30], 0
xor ecx, ecx
xor edx, edx
xor r9d, r9d
call fcn.2039d3a0
mov rax, qword [rbp + 0x468]
add rsp, 0x4f8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rdx, [rax + 1]
mov qword [rbp + 0x458], rdx
cmp rcx, 0x10
jb 0x2039c094
mov rcx, qword [rbp + 0x448]
jmp 0x2039c09b
mov r12, rax
add r12, rcx
mov qword [rbp + 0x458], r12
cmp rdx, 0x10
jb 0x2039c1f5
mov rdx, qword [rbp + 0x448]
jmp 0x2039c1fc
lea rcx, [rbp + 0x448]
mov word [rcx + rax], 0x23
mov qword [rbp + 0x438], r15
movzx edx, di
mov r12d, 1
lea r9, [rbp + 0x3f4]
movabs r8, 0xcccccccccccccccd
nop word cs:[rax + rax]
mov rcx, rdx
mov rax, rdx
mul r8
shr rdx, 3
lea eax, [rdx + rdx]
lea eax, [rax + rax*4]
mov r10d, ecx
sub r10d, eax
mov r15d, r10d
not r15b
mov r11d, r10d
xor r11b, 0x30
mov eax, r15d
and al, 0xcf
or al, r11b
not al
and r15b, 0x30
and r10b, 0xcf
or r10b, r15b
or r10b, al
mov byte [r9], r10b
cmp rcx, 0xa
jb 0x2039c11f
inc r12
dec r9
jmp 0x2039c0d0
mov qword [rbp + 0x428], 0
mov qword [rbp + 0x430], 0xf
mov byte [rbp + 0x418], 0
test r12, r12
mov r15, qword [rbp + 0x438]
je 0x2039c181
cmp r12, 0xf
jbe 0x2039c15f
lea rcx, [rbp + 0x418]
mov rdx, r12
call fcn.2006bec0
jmp 0x2039c181
mov qword [rbp + 0x428], r12
lea rcx, [rbp + 0x418]
mov rdx, r9
mov r8, r12
call fcn.2044f800
mov byte [rbp + r12 + 0x418], 0
mov r8, qword [rbp + 0x428]
cmp qword [rbp + 0x430], 0x10
jb 0x2039c19b
mov r9, qword [rbp + 0x418]
jmp 0x2039c1a2
lea r9, [rbp + 0x418]
mov rcx, qword [rbp + 0x458]
mov rax, qword [rbp + 0x460]
mov rdx, rax
sub rdx, rcx
cmp rdx, r8
jae 0x2039c1d1
mov qword [rsp + 0x20], r8
lea rcx, [rbp + 0x448]
mov rdx, r8
call fcn.2006cb20
jmp 0x2039c240
lea r10, [rcx + r8]
mov rdx, r10
mov qword [rbp + 0x408], r10
mov qword [rbp + 0x458], r10
cmp rax, 0x10
jb 0x2039c222
mov r12, qword [rbp + 0x448]
jmp 0x2039c229
lea rdx, [rbp + 0x448]
mov qword [rbp + 0x438], rdx
add rcx, rdx
mov rdx, rdi
mov r8, rax
call fcn.2044f800
mov rax, qword [rbp + 0x438]
mov byte [rax + r12], 0
jmp 0x2039c2bc
lea r12, [rbp + 0x448]
add rcx, r12
mov rdx, r9
call fcn.2044f800
mov rax, qword [rbp + 0x408]
mov byte [r12 + rax], 0
mov rax, qword [rbp + 0x430]
cmp rax, 0x10
jb 0x2039c2bc
mov rcx, qword [rbp + 0x418]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x2039c2ab
mov r8, qword [rcx - 8]
movabs rdx, 0x9b3fc0e896bca77f
add rdx, rcx
movabs rcx, 0x7ffffffffffffff8
and rcx, rdx
xor rdx, 0xfffffffffffffff8
lea rcx, [rdx + rcx*2]
sub rcx, r8
movabs rdx, 0x64c03f1769435881
add rdx, rcx
cmp rdx, 0x20
jae 0x2039c3b5
add rax, 0x28
mov rdx, rax
mov rcx, r8
mov r8d, 0x55519619
mov r9d, 0x9cb3b75c
call fcn.2008bfb0
mov rax, qword [rbp + 0x458]
mov ecx, dword [rbp + 0x414]
cmp rax, rcx
jae 0x2039c346
cmp qword [rbp + 0x460], 0x10
jb 0x2039c2e1
mov rdx, qword [rbp + 0x448]
jmp 0x2039c2e8
lea rdx, [rbp + 0x448]
lea rcx, [r14 + rbp]
add rcx, 0xffffffffffffffe0
xor r8d, r8d
test rax, rax
je 0x2039c31d
nop dword [rax + rax]
movzx r9d, byte [rdx + r8]
mov byte [rcx + r8], r9b
mov r9d, r8d
xor r9d, 1
and r8d, 1
lea r8d, [r9 + r8*2]
cmp rax, r8
ja 0x2039c300
mov eax, r8d
mov byte [rcx + rax], 0
mov qword [rbp + 0x418], 0
lea rcx, [rbp - 0x20]
lea rdx, [rbp + 0x418]
call fcn.20398800
mov qword [rbp + 0x468], rax
mov rax, qword [rbp + 0x460]
cmp rax, 0x10
jb 0x2039bc31
mov rcx, qword [rbp + 0x448]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x2039c39a
mov r8, qword [rcx - 8]
sub rcx, r8
add rcx, 0xfffffffffffffff8
cmp rcx, 0x20
jae 0x2039c3b0
mov ecx, eax
not ecx
and ecx, 0x28
mov rdx, rax
xor rdx, 0x28
and rdx, rax
or rdx, rcx
and eax, 0x28
lea rdx, [rdx + rax*2]
mov rcx, r8
mov r8d, 0x55519619
mov r9d, 0x9cb3b75c
call fcn.2008bfb0
jmp 0x2039bc31
call fcn.20407a4c
call fcn.20407a4c
int3