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

Disassembly:
sub rsp, 0x38
mov rax, qword [0x140238008]
xor rax, rsp
mov qword [rsp + 8], rax
cmp dword [0x140239c20], 0
jne 0x1400015c4
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 0x1400015db
mov r10, rax
movsxd rax, dword [rax + 0x3c]
mov ecx, dword [rax + r10 + 0x88]
test ecx, ecx
je 0x1400013cd
lea rdx, [r10 + rcx]
mov ecx, dword [r10 + rcx + 0xc]
mov eax, dword [rcx + r10]
or eax, 0x20202020
cmp eax, 0x6c64746e
jne 0x1400013cd
mov eax, dword [rcx + r10 + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
je 0x1400013d9
mov r8, qword [r8]
mov rax, qword [r8 + 0x30]
test rax, rax
jne 0x140001390
test rdx, rdx
je 0x1400015db
mov qword [rsp + 0x40], rbx
mov ebx, dword [rdx + 0x18]
mov qword [rsp + 0x48], rbp
mov ebp, dword [rdx + 0x20]
mov qword [rsp + 0x50], rsi
add rbp, r10
mov qword [rsp + 0x28], r12
lea r12, [0x140239c20]
mov qword [rsp + 0x20], r13
mov r13d, 0x775a
mov qword [rsp + 0x18], r14
mov r14d, dword [rdx + 0x1c]
mov qword [rsp + 0x10], r15
add r14, r10
mov r15d, dword [rdx + 0x24]
add r15, r10
mov qword [rsp + 0x30], rdi
xor esi, esi
dec ebx
mov r9d, dword [rbp + rbx*4]
add r9, r10
cmp word [r9], r13w
jne 0x1400014fb
xor r8d, r8d
mov edx, 0xced13e16
mov rax, r9
nop
movzx eax, word [rax]
mov ecx, edx
ror ecx, 8
inc r8d
add ecx, eax
mov eax, r8d
add rax, r9
xor edx, ecx
cmp byte [rax], 0
jne 0x140001450
mov edi, esi
mov r11b, 0xc3
add rdi, rdi
mov word [rsp], 0x50f
movzx r9d, word [rsp]
mov dword [r12 + rdi*8 + 8], edx
movzx eax, word [r15 + rbx*2]
mov ecx, dword [r14 + rax*4]
mov dword [r12 + rdi*8 + 0xc], ecx
lea r8, [r10 + rcx]
cmp r9w, word [r8 + 0x12]
lea rax, [r8 + 0x12]
jne 0x1400014a5
cmp r11b, byte [rax + 2]
je 0x1400014ec
mov ecx, 1
nop word [rax + rax]
mov eax, ecx
shl eax, 5
mov edx, eax
add rax, 0x12
add rax, r8
cmp r9w, word [rax]
jne 0x1400014ca
cmp r11b, byte [rax + 2]
je 0x1400014ec
mov rax, r8
sub rax, rdx
add rax, 0x12
cmp r9w, word [rax]
jne 0x1400014e0
cmp r11b, byte [rax + 2]
je 0x1400014ec
inc ecx
cmp ecx, 0x200
jb 0x1400014b0
xor eax, eax
inc esi
mov qword [r12 + rdi*8 + 0x10], rax
cmp esi, 0x258
je 0x140001503
test ebx, ebx
jne 0x140001430
mov r15, qword [rsp + 0x10]
lea eax, [rsi - 1]
mov r14, qword [rsp + 0x18]
xor r11d, r11d
mov r13, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x48]
mov dword [0x140239c20], esi
test eax, eax
je 0x1400015b0
nop dword [rax + rax]
mov eax, esi
xor ecx, ecx
sub eax, r11d
cmp eax, 1
je 0x1400015a5
nop dword [rax]
lea r10d, [rcx + 1]
mov r9d, ecx
add r9, r9
mov r8d, r10d
add r8, r8
mov edi, dword [r12 + r9*8 + 0xc]
mov ebx, dword [r12 + r8*8 + 0xc]
cmp edi, ebx
jbe 0x140001596
mov eax, dword [r12 + r8*8 + 8]
mov edx, dword [r12 + r9*8 + 8]
mov rcx, qword [r12 + r9*8 + 0x10]
mov dword [r12 + r9*8 + 8], eax
mov rax, qword [r12 + r8*8 + 0x10]
mov qword [r12 + r9*8 + 0x10], rax
mov dword [r12 + r9*8 + 0xc], ebx
mov dword [r12 + r8*8 + 8], edx
mov dword [r12 + r8*8 + 0xc], edi
mov qword [r12 + r8*8 + 0x10], rcx
mov esi, dword [0x140239c20]
mov eax, esi
mov ecx, r10d
sub eax, r11d
dec eax
cmp r10d, eax
jb 0x140001540
inc r11d
lea eax, [rsi - 1]
cmp r11d, eax
jb 0x140001530
mov rdi, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
mov r12, qword [rsp + 0x28]
mov eax, 1
mov rcx, qword [rsp + 8]
xor rcx, rsp
call fcn.1400017a0
add rsp, 0x38
ret
xor eax, eax
mov rcx, qword [rsp + 8]
xor rcx, rsp
call fcn.1400017a0
add rsp, 0x38
ret