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

Disassembly:
push rdi
push r14
sub rsp, 0x88
mov rax, qword [0x140115080]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov eax, 0x5a4d
mov rdi, rdx
mov r14, rcx
cmp word [rdx], ax
je 0x1400586f5
lea rcx, str.Invalid_file_n
call fcn.140058650
mov rcx, rdi
call fcn.1400e44b0
xor al, al
jmp 0x140058a70
mov qword [rsp + 0xb8], rbp
mov eax, 0x8664
movsxd rbp, dword [rdx + 0x3c]
add rbp, rdi
cmp word [rbp + 4], ax
je 0x14005872a
lea rcx, str.Invalid_platform_n
call fcn.140058650
mov rcx, rdi
call fcn.1400e44b0
xor al, al
jmp 0x140058a68
lea rcx, str.File_ok_n
mov qword [rsp + 0x70], r15
call fcn.140058650
mov r8d, dword [rbp + 0x50]
xor edx, edx
mov r9d, 0x3000
mov dword [rsp + 0x20], 0x40
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r15, rax
test rax, rax
jne 0x140058783
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Target_process_memory_allocation_failed__ex__0x_X_n
call fcn.140058650
mov rcx, rdi
call fcn.1400e44b0
xor al, al
jmp 0x140058a63
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov r9d, 0x1000
mov qword [rsp + 0x40], rax
mov r8, rdi
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdx, r15
mov qword [rsp + 0x78], r12
mov rcx, r14
xor r12d, r12d
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x1400587e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Cant_write_file_header_0x_X_n
call fcn.140058650
xor al, al
jmp 0x140058a5e
mov qword [rsp + 0xb0], rbx
movzx ebx, word [rbp + 0x14]
mov qword [rsp + 0x80], rsi
add rbx, 0x2c
mov esi, r12d
cmp word [rbp + 6], si
je 0x140058846
add rbx, rbp
nop word [rax + rax]
mov eax, dword [rbx - 4]
test eax, eax
je 0x140058838
mov r8d, dword [rbx]
mov r9d, eax
mov edx, dword [rbx - 8]
add r8, rdi
add rdx, r15
mov qword [rsp + 0x20], r12
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x14005888e
movzx eax, word [rbp + 6]
inc esi
add rbx, 0x28
cmp esi, eax
jne 0x140058810
xor edx, edx
mov dword [rsp + 0x20], 4
mov r9d, 0x3000
mov rcx, r14
lea r8d, [rdx + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rsi, rax
test rax, rax
jne 0x1400588c6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Target_process_mapping_allocation_failed__ex__0x_X_n
call fcn.140058650
mov rcx, rdi
call fcn.1400e44b0
xor al, al
jmp 0x140058a4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Cant_map_sections:_0x_x_n
call fcn.140058650
mov rcx, rdi
call fcn.1400e44b0
mov r9d, 0x8000
xor r8d, r8d
mov rdx, r15
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
jmp 0x140058a4e
mov r9d, reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], r12
lea r8, [rsp + 0x40]
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140058909
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Cant_write_mapping_0x_X_n
call fcn.140058650
mov rcx, rdi
call fcn.1400e44b0
xor al, al
jmp 0x140058a4e
xor edx, edx
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8d, 0x1000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rbx, rax
test rax, rax
jne 0x140058961
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Memory_shellcode_allocation_failed__ex__0x_X_n
call fcn.140058650
mov r9d, 0x8000
xor r8d, r8d
mov rdx, r15
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rdx, rsi
jmp 0x140058a18
mov r9d, 0x1000
mov qword [rsp + 0x20], r12
lea r8, [0x140058a90]
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x1400589a6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Cant_write_shellcode_0x_X_n
call fcn.140058650
mov rcx, rdi
call fcn.1400e44b0
xor al, al
jmp 0x140058a4e
lea rcx, str.Data_allocated_n
call fcn.140058650
mov qword [rsp + 0x30], r12
mov r9, rbx
mov dword [rsp + 0x28], r12d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test rax, rax
jne 0x140058a36
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Thread_creation_failed_0x_X_n
call fcn.140058650
mov r9d, 0x8000
xor r8d, r8d
mov rdx, r15
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov r9d, 0x8000
xor r8d, r8d
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rdx, rbx
xor r8d, r8d
mov r9d, 0x8000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, rdi
call fcn.1400e44b0
xor al, al
jmp 0x140058a4e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, rbx
lea rcx, str.Thread_created_at:__p__waiting_for_return..._n
call fcn.140058650
mov rsi, qword [rsp + 0x80]
mov rbx, qword [rsp + 0xb0]
mov r12, qword [rsp + 0x78]
mov r15, qword [rsp + 0x70]
mov rbp, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400e4490
add rsp, 0x88
pop r14
pop rdi
ret