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

Disassembly:
push rbp
push rdi
push r12
push r13
lea rbp, [rsp - 0x8c8]
sub rsp, 0x9c8
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rbp + 0x8b0], rax
movsxd rdi, dword [0x14000507c]
lea r13, [0x140005040]
mov r8d, 0x400
lea rdx, [rbp + 0x4b0]
xor ecx, ecx
add rdi, r13
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp dword [rdi], reloc.api_ms_win_crt_stdio_l1_1_0.dll___p__commode
jne 0x14000136b
xorps xmm1, xmm1
mov dword [rbp + 0x440], 0x68
xor eax, eax
lea rcx, [rbp + 0x4b0]
mov qword [rsp + 0x60], rax
xor r12d, r12d
mov dword [rbp + 0x4a4], eax
xorps xmm0, xmm0
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor r8d, r8d
lea rax, [rbp + 0x440]
xor edx, edx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], r12d
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rbp + 0x444], xmm1
movups xmmword [rbp + 0x454], xmm1
movups xmmword [rbp + 0x464], xmm1
movups xmmword [rbp + 0x474], xmm1
movups xmmword [rbp + 0x484], xmm1
movups xmmword [rbp + 0x494], xmm1
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x14000135f
mov rcx, qword [rsp + 0x58]
lea rdx, [rsp + 0x70]
mov dword [rbp - 0x60], 0x10000b
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x140001353
mov rdx, qword [rbp - 8]
lea r9d, [r12 + 8]
mov rcx, qword [rsp + 0x50]
lea r8, [rsp + 0x68]
add rdx, 0x10
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x140001164
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.140001480
lea rdx, [0x140001650]
mov rcx, rax
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 0x140001332
mov r8d, dword [rdi + 0x50]
mov r9d, 0x3000
mov rdx, qword [rdi + 0x30]
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0xa00], r14
mov qword [rsp + 0x9c0], r15
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r14, rax
test rax, rax
jne 0x1400011a6
lea rdx, str.Failed_to_allocate_memory_in_target_process.
jmp 0x1400011cb
mov r9d, dword [rdi + 0x54]
mov r8, r13
mov rcx, qword [rsp + 0x50]
mov rdx, r14
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x1400011f1
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.140001480
lea rdx, [0x140001650]
mov rcx, rax
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 0x140001322
mov qword [rsp + 0x9f0], rbx
mov ebx, r12d
mov qword [rsp + 0x9f8], rsi
cmp r12w, word [rdi + 6]
jae 0x14000125a
mov rsi, r12
nop
movsxd rcx, dword [0x14000507c]
add rcx, rsi
mov qword [rsp + 0x20], r12
mov r8d, dword [rcx + r13 + 0x11c]
mov edx, dword [rcx + r13 + 0x114]
add r8, r13
mov r9d, dword [rcx + r13 + 0x118]
add rdx, r14
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001289
movzx eax, word [rdi + 6]
inc ebx
add rsi, 0x28
cmp ebx, eax
jl 0x140001210
mov rdx, qword [rbp - 8]
lea r8, [rdi + 0x30]
mov rcx, qword [rsp + 0x50]
add rdx, 0x10
mov r9d, 8
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x1400012b3
lea rdx, str.Failed_to_write_image_base_to_target_process.
jmp 0x1400012f1
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_write_section
call fcn.140001480
mov edx, ebx
mov rcx, rax
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]
mov rcx, rax
lea rdx, str._to_target_process.
jmp 0x1400012f8
mov eax, dword [rdi + 0x28]
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
add rax, r14
mov qword [rbp - 0x10], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x1400012da
lea rdx, str.Failed_to_set_thread_context.
jmp 0x1400012f1
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x14000134f
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.140001480
lea rdx, [0x140001650]
mov rcx, rax
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 rsi, qword [rsp + 0x9f8]
mov rbx, qword [rsp + 0x9f0]
mov r14, qword [rsp + 0xa00]
mov r15, qword [rsp + 0x9c0]
mov rcx, qword [rbp + 0x8b0]
xor rcx, rsp
call fcn.1400016a0
add rsp, 0x9c8
pop r13
pop r12
pop rdi
pop rbp
ret
xor eax, eax
jmp 0x140001312
lea rdx, str.Failed_to_get_thread_context.
jmp 0x14000113e
lea rdx, str.Failed_to_create_process.
jmp 0x14000113e
lea rdx, str.Invalid_PE_signature.
jmp 0x14000113e