Function at 0x18013ff20
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get common file path
Get file size
Read file on windows
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x1c0
mov qword [rsp + 0x98], 0xfffffffffffffffe
mov rax, qword [0x180208090]
xor rax, rsp
mov qword [rsp + 0x1b0], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, qword [rsp + 0x1e8]
mov qword [rsp + 0x20], rcx
mov r9d, dword [rsp + 0x1e0]
mov r8, qword [rsp + 0x1d8]
mov rdx, qword [rsp + 0x1d0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
jne 0x1801402b2
cmp qword [0x18020e780], 0
jne 0x18013fffa
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [0x18020e7b0], rax
lea rdx, str.ZwProtectVirtualMemory
mov rcx, qword [0x18020e7b0]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x18020e780], rax
cmp qword [0x18020e780], 0
jne 0x18013fffa
lea rdx, str.ZwProtectVirtualMemory
mov rcx, qword [0x18020e7b0]
call fcn.180149220
mov qword [0x18020e780], rax
cmp qword [0x18020e798], 0
jne 0x1801401dc
cmp qword [0x18020e780], 0
je 0x1801401dc
lea rax, [rsp + 0xa0]
mov rdi, rax
xor eax, eax
mov ecx, 0x105
rep stosb byte [rdi], al
mov edx, 0x104
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov dword [rsp + 0x44], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea rdx, [rsp + 0x44]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_IsWow64Process]
cmp dword [rsp + 0x44], 0
je 0x180140077
lea rdx, str.system32_ntdll.dll
lea rcx, [rsp + 0xa0]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
jmp 0x18014008c
lea rdx, str.system32_ntdll.dll
lea rcx, [rsp + 0xa0]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
lea rcx, [rsp + 0xa0]
call fcn.1801402e0
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0xffffffffffffffff
je 0x1801401dc
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
mov r9d, 0x40
mov r8d, 0x1000
mov edx, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x1801401d1
mov dword [rsp + 0x60], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1801401ba
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x68]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
add rax, 0x108
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x70]
mov ecx, dword [rcx + 0x14]
sub rax, rcx
mov qword [rsp + 0x90], rax
mov rax, qword [0x18020e780]
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
sub rax, qword [0x18020e7b0]
sub rax, qword [rsp + 0x90]
mov qword [0x18020e798], rax
jmp 0x1801401d1
mov eax, dword [rsp + 0x40]
mov r8d, 0x4000
mov edx, eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [0x18020e798], 0
je 0x1801402b2
call fcn.18009ac70
movzx eax, al
test eax, eax
je 0x18014020a
mov rax, qword [0x18020e798]
mov rcx, qword [0x18020e780]
mov ecx, dword [rcx + 6]
mov dword [rax + 6], ecx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, qword [rsp + 0x1e8]
mov qword [rsp + 0x20], rcx
mov r9d, dword [rsp + 0x1e0]
lea r8, [rsp + 0x1d8]
lea rdx, [rsp + 0x1d0]
mov rcx, rax
call qword [0x18020e798]
cdqe
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
jne 0x180140256
mov eax, 1
jmp 0x1801402b6
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.RtlNtStatusToDosError
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0
je 0x1801402a1
mov ecx, dword [rsp + 0x78]
call qword [rsp + 0x80]
mov dword [rsp + 0x64], eax
mov ecx, dword [rsp + 0x64]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1801402ac
mov ecx, 5
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1801402b6
mov eax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x1b0]
xor rcx, rsp
call fcn.1800d8050
add rsp, 0x1c0
pop rdi
ret