Function at 0x1400017f0
Capabilities:
Access peb ldr_data
Encode data using xor
Get ntdll base address
Resolve function by parsing pe exports

Disassembly:
sub rsp, 0x28
cmp dword [0x140003020], 0
jne 0x140001a54
mov rax, qword gs:[0x60]
xor edx, edx
mov rcx, qword [rax + 0x18]
mov r8, qword [rcx + 0x10]
mov rax, qword [r8 + 0x30]
test rax, rax
je 0x140001a5e
mov r10, rax
movsxd rax, dword [rax + 0x3c]
mov ecx, dword [rax + r10 + 0x88]
test ecx, ecx
je 0x14000185e
lea rdx, [r10 + rcx]
mov ecx, dword [r10 + rcx + 0xc]
mov eax, dword [rcx + r10]
or eax, 0x20202020
cmp eax, 0x6c64746e
jne 0x14000185e
mov eax, dword [rcx + r10 + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
je 0x14000186a
mov r8, qword [r8]
mov rax, qword [r8 + 0x30]
test rax, rax
jne 0x140001821
test rdx, rdx
je 0x140001a5e
mov r11d, dword [rdx + 0x18]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rbp
mov ebp, dword [rdx + 0x24]
mov qword [rsp + 0x20], rsi
add rbp, r10
mov esi, dword [rdx + 0x1c]
mov qword [rsp + 0x18], rdi
add rsi, r10
mov edi, dword [rdx + 0x20]
mov qword [rsp + 0x10], r12
add rdi, r10
mov qword [rsp + 8], r14
xor ebx, ebx
mov qword [rsp], r15
lea r14, [0x140003020]
mov r12d, 0x775a
nop word [rax + rax]
lea eax, [r11 - 1]
mov r9d, dword [rdi + rax*4]
add r9, r10
cmp word [r9], r12w
jne 0x140001990
xor edx, edx
mov r8d, 0xa23f0808
mov rax, r9
movzx eax, word [rax]
mov ecx, r8d
ror ecx, 8
inc edx
add ecx, eax
mov eax, edx
add rax, r9
xor r8d, ecx
cmp byte [rax], 0
jne 0x1400018e0
mov edx, ebx
lea eax, [r11 - 1]
add rdx, rdx
mov word [rsp + 0x30], 0x50f
movzx r9d, word [rsp + 0x30]
mov r15b, 0xc3
mov dword [r14 + rdx*8 + 8], r8d
movzx eax, word [rbp + rax*2]
mov ecx, dword [rsi + rax*4]
mov dword [r14 + rdx*8 + 0xc], ecx
lea r8, [r10 + rcx]
cmp r9w, word [r8 + 0x12]
lea rax, [r8 + 0x12]
jne 0x14000193a
cmp r15b, byte [rax + 2]
je 0x14000197c
mov ecx, 1
nop
mov eax, ecx
shl eax, 5
mov edx, eax
add rax, 0x12
add rax, r8
cmp r9w, word [rax]
jne 0x14000195a
cmp r15b, byte [rax + 2]
je 0x14000197c
mov rax, r8
sub rax, rdx
add rax, 0x12
cmp r9w, word [rax]
jne 0x140001970
cmp r15b, byte [rax + 2]
je 0x14000197c
inc ecx
cmp ecx, 0x200
jb 0x140001940
xor eax, eax
mov ecx, ebx
inc ebx
add rcx, rcx
mov qword [r14 + rcx*8 + 0x10], rax
cmp ebx, 0x258
je 0x14000199a
add r11d, 0xffffffff
jne 0x1400018c0
mov r15, qword [rsp]
lea eax, [rbx - 1]
mov r12, qword [rsp + 0x10]
xor r11d, r11d
mov rbp, qword [rsp + 0x40]
mov dword [0x140003020], ebx
test eax, eax
je 0x140001a40
nop dword [rax]
mov eax, ebx
xor ecx, ecx
sub eax, r11d
cmp eax, 1
je 0x140001a35
nop dword [rax]
lea r10d, [rcx + 1]
mov r9d, ecx
add r9, r9
mov r8d, r10d
add r8, r8
mov esi, dword [r14 + r9*8 + 0xc]
mov edi, dword [r14 + r8*8 + 0xc]
cmp esi, edi
jbe 0x140001a26
mov eax, dword [r14 + r8*8 + 8]
mov edx, dword [r14 + r9*8 + 8]
mov rcx, qword [r14 + r9*8 + 0x10]
mov dword [r14 + r9*8 + 8], eax
mov rax, qword [r14 + r8*8 + 0x10]
mov qword [r14 + r9*8 + 0x10], rax
mov dword [r14 + r9*8 + 0xc], edi
mov dword [r14 + r8*8 + 8], edx
mov dword [r14 + r8*8 + 0xc], esi
mov qword [r14 + r8*8 + 0x10], rcx
mov ebx, dword [0x140003020]
mov eax, ebx
mov ecx, r10d
sub eax, r11d
dec eax
cmp r10d, eax
jb 0x1400019d0
inc r11d
lea eax, [rbx - 1]
cmp r11d, eax
jb 0x1400019c0
mov rdi, qword [rsp + 0x18]
mov rsi, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x38]
mov r14, qword [rsp + 8]
mov eax, 1
add rsp, 0x28
ret
xor eax, eax
add rsp, 0x28
ret