Function at 0x1400014d4
Capabilities:
Create thread
Inject thread

Disassembly:
push rbp
push rdi
push rsi
sub rsp, 0x280
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x220], ecx
mov qword [rbp + 0x228], rdx
call dbg.__main
lea rax, [rbp - 0x30]
lea rdx, [0x140004210]
mov ecx, 0x3f
mov rdi, rax
mov rsi, rdx
rep movsq qword [rdi], qword [rsi]
mov rdx, rsi
mov rax, rdi
mov ecx, dword [rdx]
mov dword [rax], ecx
lea rax, [rax + 4]
lea rdx, [rdx + 4]
movzx ecx, word [rdx]
mov word [rax], cx
lea rax, [rax + 2]
lea rdx, [rdx + 2]
movzx ecx, byte [rdx]
mov byte [rax], cl
cmp dword [rbp + 0x220], 1
jg 0x140001565
mov rax, qword [rbp + 0x228]
mov rax, qword [rax]
mov rdx, rax
lea rax, str.____Usage:__s__PID__n
mov rcx, rax
call dbg.printf
mov eax, 1
jmp 0x14000187a
mov dword [rbp + 0x1fc], 0
mov rax, qword [rbp + 0x228]
add rax, 8
mov rax, qword [rax]
mov rcx, rax
call sym.atoi
mov dword [rbp + 0x1fc], eax
mov eax, dword [rbp + 0x1fc]
mov edx, eax
lea rax, str._i__Trying_to_open_a_handle_to_process:__ld_n
mov rcx, rax
call dbg.printf
mov qword [rbp + 0x1f0], 0
mov eax, dword [rbp + 0x1fc]
mov r8d, eax
mov edx, 0
mov ecx, 0x1fffff
mov rax, qword [sym.imp.KERNEL32.dll_OpenProcess]
call rax
mov qword [rbp + 0x1f0], rax
cmp qword [rbp + 0x1f0], 0
jne 0x1400015fe
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.____Error_getting_a_handle_to_the_process._Error:_0x_lx_n
mov rcx, rax
call dbg.printf
mov eax, 1
jmp 0x14000187a
lea rax, str.___Got_a_handle_to_the_process.
mov rcx, rax
call sym.puts
mov qword [rbp + 0x1e8], 0
mov qword [rbp + 0x1e0], 0x1ff
mov rdx, qword [rbp + 0x1e0]
mov rax, qword [rbp + 0x1f0]
mov dword [rsp + 0x20], 4
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 + 0x1e8], rax
mov rax, qword [rbp + 0x1e0]
mov rdx, rax
lea rax, str.___Allocated:__ld_bytes_with_rw_permissions._n
mov rcx, rax
call dbg.printf
mov rdx, qword [rbp + 0x1e0]
lea rax, [rbp - 0x30]
mov rcx, rax
call dbg.XOR(unsigned char*, unsigned long long)
mov qword [rbp + 0x1d8], rax
mov rcx, qword [rbp + 0x1e0]
mov rdx, qword [rbp + 0x1d8]
lea rax, [rbp - 0x30]
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov qword [rbp - 0x38], 0
mov r9, qword [rbp + 0x1e0]
lea r8, [rbp - 0x30]
mov rdx, qword [rbp + 0x1e8]
mov rax, qword [rbp + 0x1f0]
lea rcx, [rbp - 0x38]
mov qword [rsp + 0x20], rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
mov rax, qword [rbp - 0x38]
mov rdx, rax
lea rax, str.___Wrote__ld_bytes_n
mov rcx, rax
call dbg.printf
mov dword [rbp - 0x3c], 4
mov r8, qword [rbp + 0x1e0]
mov rdx, qword [rbp + 0x1e8]
mov rax, qword [rbp + 0x1f0]
lea rcx, [rbp - 0x3c]
mov qword [rsp + 0x20], rcx
mov r9d, 0x20
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
call rax
test eax, eax
sete al
test al, al
je 0x14000175a
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.____Error_changing_memory_permissions._Error:_0x_lx_n
mov rcx, rax
call dbg.printf
mov eax, 1
jmp 0x14000187a
mov qword [rbp + 0x1d0], 0
mov dword [rbp - 0x40], 0
mov rcx, qword [rbp + 0x1e8]
mov rax, qword [rbp + 0x1f0]
lea rdx, [rbp - 0x40]
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 [rbp + 0x1d0], rax
cmp qword [rbp + 0x1d0], 0
jne 0x1400017ec
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.____Couldnt_get_an_handle_to_the_thread._Error:__n
mov rcx, rax
call dbg.printf
mov eax, 1
jmp 0x14000187a
mov eax, dword [rbp - 0x40]
mov rdx, qword [rbp + 0x1f0]
mov r8, rdx
mov edx, eax
lea rax, str.___Got_a_handle_to_the_newly_created_thread___ld__n___0x_p_n_n
mov rcx, rax
call dbg.printf
lea rax, str._i__Waiting_for_thread_to_finish_executing
mov rcx, rax
call sym.puts
mov rax, qword [rbp + 0x1d0]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
lea rax, str._i__Thread_finished_executing__cleaning_up
mov rcx, rax
call sym.puts
mov rax, qword [rbp + 0x1d0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x1f0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
lea rax, str.___Finished
mov rcx, rax
call sym.puts
mov eax, 0
add rsp, 0x280
pop rsi
pop rdi
pop rbp
ret