Function at 0x140042730
Capabilities:
Access pe header
Get file attributes
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xe0
mov rax, qword [0x14002a380]
xor rax, rsp
mov qword [rsp + 0xd8], rax
mov dword [rsp + 0x60], 0
mov qword [rsp + 0x78], 0
lea rax, [rsp + 0x98]
mov rdi, rax
xor eax, eax
mov ecx, 0x30
rep stosb byte [rdi], al
lea rax, [rsp + 0xc8]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
lea rax, [rsp + 0x80]
mov rdi, rax
xor eax, eax
mov ecx, 0x18
rep stosb byte [rdi], al
cmp qword [rsp + 0xf0], 0
je 0x1400427c1
cmp qword [rsp + 0xf8], 0
je 0x1400427c1
mov dword [rsp + 0x64], 0
jmp 0x1400427c9
mov dword [rsp + 0x64], 1
cmp dword [rsp + 0x64], 0
je 0x1400427f7
xor r9d, r9d
mov r8d, 0x64a
lea rdx, [0x140047100]
lea rcx, [0x140047a50]
call qword [sym.imp.ntoskrnl.exe_RtlAssert]
mov dword [rsp + 0x68], 0
jmp 0x1400427ff
mov dword [rsp + 0x68], 1
cmp qword [rsp + 0xf0], 0
je 0x140042815
cmp qword [rsp + 0xf8], 0
jne 0x14004283a
lea r9, [0x140047a70]
lea r8, [0x140047a90]
xor edx, edx
mov ecx, 0x4d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov eax, 0xc000000d
jmp 0x140042abe
mov dword [rsp + 0x98], 0x30
mov qword [rsp + 0xa0], 0
mov dword [rsp + 0xb0], 0x200
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0xa8], rax
mov qword [rsp + 0xb8], 0
mov qword [rsp + 0xc0], 0
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0x20
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xc8]
lea r8, [rsp + 0x98]
mov edx, 0x100001
lea rcx, [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ZwCreateFile]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jge 0x140042922
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0x20], rax
lea r9, [0x140047a70]
lea r8, [0x140046e40]
xor edx, edx
mov ecx, 0x4d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov eax, dword [rsp + 0x60]
jmp 0x140042abe
mov dword [rsp + 0x20], 5
mov r9d, 0x18
lea r8, [rsp + 0x80]
lea rdx, [rsp + 0xc8]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ZwQueryInformationFile]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jl 0x14004297c
mov r8d, 0x4b555341
mov rdx, qword [rsp + 0x88]
mov ecx, 0x100
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool2]
mov rcx, qword [rsp + 0xf8]
mov qword [rcx], rax
jmp 0x1400429ac
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0x20], rax
lea r9, [0x140047a70]
lea r8, [0x140046e80]
xor edx, edx
mov ecx, 0x4d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0xf8]
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ZwReadFile]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jl 0x140042a54
mov rax, qword [rsp + 0xf8]
mov rcx, qword [rax]
call qword [sym.imp.ntoskrnl.exe_RtlImageNtHeader]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
jne 0x140042a52
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0x20], rax
lea r9, [0x140047a70]
lea r8, [0x140046ec0]
xor edx, edx
mov ecx, 0x4d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov dword [rsp + 0x60], 0xc000007b
jmp 0x140042a84
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0x20], rax
lea r9, [0x140047a70]
lea r8, [0x140046f00]
xor edx, edx
mov ecx, 0x4d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
cmp dword [rsp + 0x60], 0
jge 0x140042aba
mov rax, qword [rsp + 0xf8]
cmp qword [rax], 0
je 0x140042aba
mov edx, 0x4b555341
mov rax, qword [rsp + 0xf8]
mov rcx, qword [rax]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov eax, dword [rsp + 0x60]
mov rcx, qword [rsp + 0xd8]
xor rcx, rsp
call fcn.140021990
add rsp, 0xe0
pop rdi
ret