Function at 0x140001080
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode
Terminate process

Disassembly:
push rbx
push r15
sub rsp, 0xa8
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov eax, 0x5a4d
mov r15, rdx
mov rbx, rcx
cmp word [rdx], ax
je 0x1400010be
lea rcx, str.Invalid_file_n
call fcn.140001020
jmp 0x140001400
mov qword [rsp + 0xd8], rsi
mov eax, 0x8664
movsxd rsi, dword [rdx + 0x3c]
add rsi, r15
cmp word [rsi + 4], ax
je 0x1400010e9
lea rcx, str.Invalid_platform_n
call fcn.140001020
jmp 0x1400013f8
lea rcx, str.File_ok_n
mov qword [rsp + 0x90], r14
call fcn.140001020
mov r8d, dword [rsi + 0x50]
xor edx, edx
mov r9d, 0x3000
mov dword [rsp + 0x20], 4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r14, rax
test rax, rax
jne 0x14000113b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Target_process_memory_allocation_failed__ex__0x_X_n
call fcn.140001020
jmp 0x1400013f0
lea rax, [rsp + 0x80]
mov qword [rsp + 0x98], r12
xor r12d, r12d
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x80], r12d
mov rdx, r14
mov r8d, dword [rsi + 0x50]
mov rcx, rbx
lea r9d, [r12 + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov r9d, 0x1000
mov qword [rsp + 0x40], rax
mov r8, r15
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdx, r14
mov qword [rsp + 0x48], rax
mov rcx, rbx
mov rax, qword [sym.imp.KERNEL32.dll_RtlAddFunctionTable]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], 1
mov qword [rsp + 0x78], 1
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140001201
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Cant_write_file_header_0x_X_n
call fcn.140001020
mov r9d, 0x8000
xor r8d, r8d
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
jmp 0x1400013e8
mov qword [rsp + 0xd0], rbp
mov ebp, r12d
mov qword [rsp + 0xa0], rdi
movzx edi, word [rsi + 0x14]
add rdi, 0x2c
cmp word [rsi + 6], r12w
je 0x14000125c
add rdi, rsi
mov eax, dword [rdi - 4]
test eax, eax
je 0x14000124e
mov r8d, dword [rdi]
mov r9d, eax
mov edx, dword [rdi - 8]
add r8, r15
add rdx, r14
mov qword [rsp + 0x20], r12
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x14000129d
movzx eax, word [rsi + 6]
inc ebp
add rdi, 0x28
cmp ebp, eax
jne 0x140001226
xor edx, edx
mov dword [rsp + 0x20], 4
mov r9d, 0x3000
mov rcx, rbx
lea r8d, [rdx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rdi, rax
test rax, rax
jne 0x1400012b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Target_process_mapping_allocation_failed__ex__0x_X_n
call fcn.140001020
mov rdx, r14
jmp 0x1400013c6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Cant_map_sections:_0x_x_n
call fcn.140001020
mov rdx, r14
jmp 0x1400013c6
mov r9d, 0x40
mov qword [rsp + 0x20], r12
lea r8, [rsp + 0x40]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x14000130a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Cant_write_mapping_0x_X_n
call fcn.140001020
mov r9d, 0x8000
xor r8d, r8d
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rdx, rdi
jmp 0x1400013c6
xor edx, edx
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8d, 0x1000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rsi, rax
test rax, rax
jne 0x14000135f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Memory_shellcode_allocation_failed__ex__0x_X_n
call fcn.140001020
mov r9d, 0x8000
xor r8d, r8d
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rdx, rdi
jmp 0x1400013c6
mov r9d, 0x1000
mov qword [rsp + 0x20], r12
lea r8, [0x1400014e0]
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x14000141d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Cant_write_shellcode_0x_X_n
call fcn.140001020
mov r9d, 0x8000
xor r8d, r8d
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov r9d, 0x8000
xor r8d, r8d
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rdx, rsi
mov r9d, 0x8000
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rdi, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0xd0]
mov r12, qword [rsp + 0x98]
mov r14, qword [rsp + 0x90]
mov rsi, qword [rsp + 0xd8]
xor al, al
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.140003bd0
add rsp, 0xa8
pop r15
pop rbx
ret
mov rdx, r14
lea rcx, str.Mapped_DLL_at__p_n
call fcn.140001020
mov rdx, rdi
lea rcx, str.Mapping_info_at__p_n
call fcn.140001020
mov rdx, rsi
lea rcx, str.Shell_code_at__p_n
call fcn.140001020
lea rcx, str.Data_allocated_n
call fcn.140001020
mov qword [rsp + 0x30], r12
mov r9, rsi
mov dword [rsp + 0x28], r12d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test rax, rax
jne 0x14000148f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Thread_creation_failed_0x_X_n
jmp 0x140001394
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, rsi
lea rcx, str.Thread_created_at:__p__waiting_for_return..._n
call fcn.140001020
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x140005758]
call fcn.140001a10
mov rcx, rax
lea rdx, [0x140001e90]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3