Function at 0x140001070
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov r12, qword [rcx + 0x18]
add r12, 0x20
xor ebp, ebp
mov r14, qword [r12]
mov rdi, qword [r14 + 0x40]
test rdi, rdi
je 0x14000111e
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [rdi + rbx*2], bp
jne 0x1400010c6
inc rbx
lea r15, [rbx + rbx]
mov rcx, r15
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov rsi, rax
test rax, rax
je 0x140001121
mov qword [rsp + 0x38], rbp
mov r9d, ebx
mov qword [rsp + 0x30], rbp
mov r8, rdi
mov dword [rsp + 0x28], r15d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x140001121
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rsi, rbp
lea rdx, str.ntdll.dll
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x140001147
mov r14, qword [r14]
cmp r14, r12
jne 0x1400010b6
mov r14, rbp
jmp 0x140001150
mov r14, qword [r14 + 0x20]
test r14, r14
jne 0x14000115c
lea rcx, str.____Error:_Failed_to_locate_ntdll_base
call fcn.140001010
movsxd rax, dword [r14 + 0x3c]
mov ebx, ebp
mov r15d, dword [rax + r14 + 0x88]
add r15, r14
mov edi, dword [r15 + 0x20]
mov esi, dword [r15 + 0x24]
add rdi, r14
mov r13d, dword [r15 + 0x1c]
add rsi, r14
add r13, r14
cmp dword [r15 + 0x18], ebx
jbe 0x1400011c1
nop dword [rax + rax]
movzx eax, word [rsi]
lea rdx, str.NtQuerySystemInformation
mov ecx, dword [rdi]
add rcx, r14
mov r12d, dword [r13 + rax*4]
add r12, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
je 0x1400011c4
inc ebx
add rdi, 4
add rsi, 2
cmp ebx, dword [r15 + 0x18]
jb 0x140001190
mov r12, rbp
xor edx, edx
mov qword [0x140005660], r12
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], ebp
xor r8d, r8d
mov dword [rsp + 0x44], ebp
lea ecx, [rdx + 0x39]
call r12
mov ebx, dword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x14000121f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error:__HeapAlloc__failed_with:__d_n
call fcn.140001010
jmp 0x1400012bb
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x44]
mov rdx, rbx
mov ecx, 0x39
call qword [0x140005660]
test eax, eax
je 0x14000124f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error:__NtQuerySystemInformation__failed_with:__d_n
call fcn.140001010
mov rdi, rbx
lea r8, str.notepad.exe
nop dword [rax]
cmp word [rbx + 0x38], bp
je 0x1400012f6
mov rdx, qword [rbx + 0x40]
mov rax, rbp
movzx ecx, word [rdx + rax*2]
cmp cx, word [r8 + rax*2]
jne 0x1400012f6
movzx ecx, word [rdx + rax*2 + 2]
cmp cx, word [r8 + rax*2 + 2]
jne 0x1400012f6
add rax, 2
cmp rax, 0xc
jne 0x140001271
mov r8d, dword [rbx + 0x50]
xor edx, edx
mov ecx, 0x1fffff
mov ebp, r8d
call qword [sym.imp.KERNEL32.dll_OpenProcess]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, ebp
lea rcx, str.___Found__notepad.exe__with_PID:__d
call fcn.140001010
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140001320
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov eax, dword [rbx]
test eax, eax
je 0x1400012a7
add rbx, rax
jmp 0x140001260