Function at 0x140001070
Capabilities:
Access peb ldr_data
Allocate or change rwx memory
Get ntdll base address
Resolve function by parsing pe exports

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x28], rax
lea rcx, str.___Parsing_LdrpThunkSignature_For_Clean_Syscalls._n_n
call fcn.140001010
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x18]
mov rbx, qword [rcx + 0x10]
cmp qword [rbx + 0x30], 0
je 0x1400010d5
nop dword [rax]
mov rcx, qword [rbx + 0x60]
lea rdx, [0x140003318]
mov r8d, 9
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
je 0x1400010f6
mov rbx, qword [rbx]
cmp qword [rbx + 0x30], 0
jne 0x1400010b0
lea rcx, str.____Cannot_find_NTDLL._n
call fcn.140001010
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400019e0
add rsp, 0x30
pop rbx
ret
mov qword [rsp + 0x40], rbp
xor edx, edx
mov qword [rsp + 0x48], rsi
movzx r8d, dx
mov qword [rsp + 0x50], rdi
mov rdi, qword [rbx + 0x30]
movsxd rcx, dword [rdi + 0x3c]
add rcx, rdi
movzx ebx, word [rcx + 0x14]
movzx r11d, word [rcx + 6]
add rbx, rcx
cmp dx, r11w
jae 0x140001250
lea rsi, [0x140003348]
movzx eax, r8w
lea rcx, [rax + rax*4]
mov rax, rdx
lea r10, [rcx*8]
lea r9, [r10 + rbx]
nop word [rax + rax]
movzx ecx, byte [r9 + rax + 0x18]
inc rax
cmp cl, byte [rsi + rax - 1]
jne 0x1400011cd
cmp rax, 6
jne 0x140001150
mov r8d, dword [rbx + r10 + 0x24]
mov r9d, dword [rbx + r10 + 0x20]
add r8, rdi
je 0x140001250
cmp r9d, 0x50
jb 0x140001250
add r9d, 0xffffffb0
je 0x140001250
nop dword [rax]
mov ecx, edx
add rcx, r8
cmp dword [rcx], 0xb8d18b4c
jne 0x1400011c1
cmp dword [rcx + 0x10], 0xb8d18b4c
jne 0x1400011c1
cmp dword [rcx + 0x20], 0xb8d18b4c
jne 0x1400011c1
cmp dword [rcx + 0x30], 0xb8d18b4c
jne 0x1400011c1
cmp dword [rcx + 0x40], 0xb8d18b4c
je 0x1400011dd
inc edx
cmp edx, r9d
jb 0x140001190
jmp 0x140001250
inc r8w
cmp r8w, r11w
jb 0x140001133
jmp 0x140001250
mov ebx, dword [rcx + 0x44]
mov edi, dword [rcx + 4]
mov esi, dword [rcx + 0x14]
mov ebp, dword [rcx + 0x34]
test ebx, ebx
je 0x140001250
mov edx, edi
lea rcx, str.___NtOpenFile_syscall_number..............:__02x_n
call fcn.140001010
mov edx, esi
lea rcx, str.___NtCreateSection_syscall_number.........:__02x_n
call fcn.140001010
mov edx, ebp
lea rcx, str.___NtOpenSection_syscall_number...........:__02x_n
call fcn.140001010
mov edx, ebx
lea rcx, str.___NtMapViewOfSection_syscall_number......:__02x_n_n
call fcn.140001010
xor ecx, ecx
mov edx, pe_nt_image_headers64
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rcx, rax
test rax, rax
jne 0x140001274
lea rcx, str.____Cannot_allocate_memory_for_syscals_stubs._n
call fcn.140001010
xor eax, eax
mov rsi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400019e0
add rsp, 0x30
pop rbx
ret
mov dword [rax], 0xb8d18b4c
lea r9, [rsp + 0x20]
mov word [rax + 8], 0x50f
mov edx, pe_nt_image_headers64
mov byte [rax + 0xa], 0xc3
mov r8d, 0x20
mov dword [rax + 4], edi
add rax, 0x40
mov qword [0x140005630], rcx
mov dword [rax], 0xb8d18b4c
mov word [rax + 8], 0x50f
mov byte [rax + 0xa], 0xc3
mov dword [rax + 4], esi
mov qword [0x140005628], rax
lea rax, [rcx + 0xc0]
mov dword [rcx + 0x80], 0xb8d18b4c
mov word [rcx + 0x88], 0x50f
mov byte [rcx + 0x8a], 0xc3
mov dword [rcx + 0x84], ebp
mov dword [rax], 0xb8d18b4c
mov word [rax + 8], 0x50f
mov byte [rax + 0xa], 0xc3
mov dword [rax + 4], ebx
mov qword [0x140005620], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, 1
jmp 0x140001252