Function at 0x140001540
Capabilities:
Create thread
Inject dll
Inject thread

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x90
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
call dbg.__main
cmp dword [rbp + 0x10], 2
jg 0x1400015b6
lea rax, str.Usage:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
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 rcx, rax
mov rax, qword [rbp + 0x18]
mov rax, qword [rax]
mov rdx, 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 rcx, rax
lea rax, str.__target_process_name___dll_path_
mov rdx, 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 rcx, rax
mov rax, qword [0x140004580]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov eax, 1
jmp 0x1400019f6
mov rax, qword [rbp + 0x18]
mov rax, qword [rax + 8]
mov qword [rbp - 8], rax
mov rax, qword [rbp + 0x18]
mov rax, qword [rax + 0x10]
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 8]
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.USER32.dll_FindWindowA]
call rax
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
jne 0x140001623
lea rax, str.Failed_to_find_target_process.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
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 rcx, rax
mov rax, qword [0x140004580]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov eax, 1
jmp 0x1400019f6
lea rdx, [rbp - 0x44]
mov rax, qword [rbp - 0x18]
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
call rax
mov eax, dword [rbp - 0x44]
mov r8d, eax
mov edx, 0
mov ecx, 0x1fffff
mov rax, qword [sym.imp.KERNEL32.dll_OpenProcess]
call rax
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x140001690
lea rax, str.Failed_to_open_target_process.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
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 rcx, rax
mov rax, qword [0x140004580]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov eax, 1
jmp 0x1400019f6
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.strlen
lea rdx, [rax + 1]
mov rax, qword [rbp - 0x20]
mov dword [rsp + 0x20], 4
mov r9d, 0x1000
mov r8, rdx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call rax
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
jne 0x140001716
lea rax, str.Failed_to_allocate_memory_in_target_process.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
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 rcx, rax
mov rax, qword [0x140004580]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x1400019f6
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.strlen
lea r8, [rax + 1]
mov rcx, qword [rbp - 0x10]
mov rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x20]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
test eax, eax
sete al
test al, al
je 0x1400017bb
lea rax, str.Failed_to_write_DLL_path_to_target_process.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
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 rcx, rax
mov rax, qword [0x140004580]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x20]
mov r9d, 0x8000
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
call rax
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x1400019f6
lea rax, str.kernel32.dll
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
mov qword [rbp - 0x30], rax
cmp qword [rbp - 0x30], 0
jne 0x14000183e
lea rax, str.Failed_to_get_handle_to_kernel32.dll.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
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 rcx, rax
mov rax, qword [0x140004580]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x20]
mov r9d, 0x8000
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
call rax
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x1400019f6
mov rax, qword [rbp - 0x30]
lea rdx, str.LoadLibraryA
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp - 0x38], rax
cmp qword [rbp - 0x38], 0
jne 0x1400018c5
lea rax, str.Failed_to_get_address_of_LoadLibraryA_function.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
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 rcx, rax
mov rax, qword [0x140004580]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x20]
mov r9d, 0x8000
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
call rax
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x1400019f6
mov rcx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x20]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov rdx, qword [rbp - 0x28]
mov qword [rsp + 0x20], rdx
mov r9, rcx
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
call rax
mov qword [rbp - 0x40], rax
cmp qword [rbp - 0x40], 0
jne 0x140001971
lea rax, str.Failed_to_create_remote_thread.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
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 rcx, rax
mov rax, qword [0x140004580]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x20]
mov r9d, 0x8000
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
call rax
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x1400019f6
mov rax, qword [rbp - 0x40]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
lea rax, str.DLL_loaded_successfully_in_target_process.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cout]
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 rcx, rax
mov rax, qword [0x140004580]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp - 0x40]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x20]
mov r9d, 0x8000
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
call rax
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
add rsp, 0x90
pop rbp
ret