Function at 0x140001700
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Enumerate pe sections
Resume thread
Use process replacement

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xa40
mov rax, qword [0x140008208]
xor rax, rsp
mov qword [rsp + 0xa30], rax
mov rax, qword [rsp + 0xa50]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0xa50]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
mov r8d, 0x400
lea rdx, [rsp + 0x630]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov rax, qword [rsp + 0x58]
cmp dword [rax], 0x4550
jne 0x140001c22
lea rax, [rsp + 0xd0]
mov rdi, rax
xor eax, eax
mov ecx, 0x18
rep stosb byte [rdi], al
lea rax, [rsp + 0x5c0]
mov rdi, rax
xor eax, eax
mov ecx, 0x68
rep stosb byte [rdi], al
mov dword [rsp + 0x5c0], 0x68
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x5c0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x630]
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x140001bf0
mov dword [rsp + 0x120], 0x10000b
lea rdx, [rsp + 0xf0]
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x140001bbe
mov rax, qword [rsp + 0x178]
add rax, 0x10
mov qword [rsp + 0x20], 0
mov r9d, 8
lea r8, [rsp + 0xe8]
mov rdx, rax
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x140001891
lea rdx, str.Failed_to_read_process_memory.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001060
mov qword [rsp + 0x78], rax
lea rdx, [0x140001490]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 0xffffffff
jmp 0x140001c57
mov rax, qword [rsp + 0x58]
mov eax, dword [rax + 0x50]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8d, eax
mov rax, qword [rsp + 0x58]
mov rdx, qword [rax + 0x30]
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
jne 0x140001908
lea rdx, str.Failed_to_allocate_memory_in_target_process.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001060
mov qword [rsp + 0x80], rax
lea rdx, [0x140001490]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 0xffffffff
jmp 0x140001c57
mov rax, qword [rsp + 0x58]
mov eax, dword [rax + 0x54]
mov qword [rsp + 0x20], 0
mov r9d, eax
mov r8, qword [rsp + 0xa50]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140001975
lea rdx, str.Failed_to_write_headers_to_target_process.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001060
mov qword [rsp + 0x88], rax
lea rdx, [0x140001490]
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 0xffffffff
jmp 0x140001c57
mov dword [rsp + 0x50], 0
jmp 0x140001989
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x58]
movzx eax, word [rax + 6]
cmp dword [rsp + 0x50], eax
jge 0x140001a83
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0xa50]
add rcx, rax
mov rax, rcx
movsxd rcx, dword [rsp + 0x50]
imul rcx, rcx, 0x28
lea rax, [rax + rcx + 0x108]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
mov eax, dword [rax + 0x10]
mov rcx, qword [rsp + 0x68]
mov ecx, dword [rcx + 0x14]
mov rdx, qword [rsp + 0xa50]
add rdx, rcx
mov rcx, rdx
mov rdx, qword [rsp + 0x68]
mov edx, dword [rdx + 0xc]
mov rdi, qword [rsp + 0x60]
add rdi, rdx
mov rdx, rdi
mov qword [rsp + 0x20], 0
mov r9d, eax
mov r8, rcx
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140001a7e
lea rdx, str.Failed_to_write_section
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001060
mov qword [rsp + 0x90], rax
mov edx, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
lea rdx, str._to_target_process.
mov rcx, rax
call fcn.140001060
mov qword [rsp + 0x98], rax
lea rdx, [0x140001490]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 0xffffffff
jmp 0x140001c57
jmp 0x14000197f
mov rax, qword [rsp + 0x58]
add rax, 0x30
mov rcx, qword [rsp + 0x178]
add rcx, 0x10
mov qword [rsp + 0x20], 0
mov r9d, 8
mov r8, rax
mov rdx, rcx
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140001af9
lea rdx, str.Failed_to_write_image_base_to_target_process.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001060
mov qword [rsp + 0xa0], rax
lea rdx, [0x140001490]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 0xffffffff
jmp 0x140001c57
mov rax, qword [rsp + 0x58]
mov eax, dword [rax + 0x28]
mov rcx, qword [rsp + 0x60]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x170], rax
lea rdx, [rsp + 0xf0]
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x140001b68
lea rdx, str.Failed_to_set_thread_context.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001060
mov qword [rsp + 0xa8], rax
lea rdx, [0x140001490]
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 0xffffffff
jmp 0x140001c57
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x140001bb5
lea rdx, str.Failed_to_resume_thread.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001060
mov qword [rsp + 0xb0], rax
lea rdx, [0x140001490]
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 0xffffffff
jmp 0x140001c57
xor eax, eax
jmp 0x140001c57
lea rdx, str.Failed_to_get_thread_context.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001060
mov qword [rsp + 0xb8], rax
lea rdx, [0x140001490]
mov rcx, qword [rsp + 0xb8]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x140001c20
lea rdx, str.Failed_to_create_process.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001060
mov qword [rsp + 0xc0], rax
lea rdx, [0x140001490]
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x140001c52
lea rdx, str.Invalid_PE_signature.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001060
mov qword [rsp + 0xc8], rax
lea rdx, [0x140001490]
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 0xffffffff
mov rcx, qword [rsp + 0xa30]
xor rcx, rsp
call fcn.140001f10
add rsp, 0xa40
pop rdi
ret