Function at 0x1400027f0
Capabilities:
Access pe header
Map section object
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push r12
push r14
push r15
lea rbp, [rsp - 0x3f0]
sub rsp, 0x4f0
xor r12d, r12d
mov r14, r9
mov qword [r8], r12
mov rsi, r8
mov qword [r9], r12
movzx r15d, dl
lea r9, [rsp + 0x78]
mov qword [rbp + 0x430], r12
xor r8d, r8d
lea rdx, [rsp + 0x68]
call qword [sym.imp.ntdll.dll_RtlDosPathNameToRelativeNtPathName_U_WithStatus]
mov ebx, eax
test eax, eax
js 0x140002a88
movzx ecx, word [rsp + 0x78]
lea rdx, [rsp + 0x68]
mov dword [rsp + 0x50], r12d
lea r9, [rbp - 0x38]
mov qword [rsp + 0x48], r12
lea r8, [rbp - 0x68]
test cx, cx
mov dword [rsp + 0x40], 0x60
mov dword [rsp + 0x38], 1
lea rcx, [rbp + 0x430]
xorps xmm0, xmm0
mov dword [rsp + 0x30], 1
mov eax, r12d
mov dword [rsp + 0x28], 0x80
cmovne rax, qword [rbp - 0x78]
mov qword [rbp - 0x60], rax
lea rax, [rsp + 0x78]
cmove rax, rdx
mov dword [rbp - 0x68], gethostbyname
mov edx, 0x120089
mov qword [rbp - 0x58], rax
mov dword [rbp - 0x50], 0x40
movdqu xmmword [rbp - 0x48], xmm0
mov qword [rsp + 0x20], r12
call qword [sym.imp.ntdll.dll_NtCreateFile]
mov ebx, eax
xor edx, edx
mov rax, qword gs:[0x30]
mov r8, qword [rsp + 0x70]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
lea rcx, [rsp + 0x78]
call qword [sym.imp.ntdll.dll_RtlReleaseRelativeName]
test ebx, ebx
js 0x140002a88
mov qword [rsp + 0x520], rdi
mov edi, r12d
mov qword [rbp + 0x438], r12
test r15b, r15b
je 0x140002999
mov rcx, qword [rbp + 0x430]
lea rax, [rbp - 0x10]
mov qword [rsp + 0x40], r12
xor r9d, r9d
mov qword [rsp + 0x38], r12
xor r8d, r8d
mov dword [rsp + 0x30], 0x400
xor edx, edx
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x28]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtReadFile]
mov ebx, eax
test eax, eax
jns 0x140002961
lea rcx, str.NtReadFile:_0x_08X_n
jmp 0x140002a40
lea r9, [rsp + 0x60]
mov r8d, 0x400
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [sym.imp.ntdll.dll_RtlImageNtHeaderEx]
test eax, eax
js 0x140002a68
mov rax, qword [rsp + 0x60]
mov ecx, 0x20b
cmp word [rax + 0x18], cx
jne 0x140002996
mov rdi, qword [rax + 0x30]
jmp 0x140002999
mov edi, dword [rax + 0x34]
mov rax, qword [rbp + 0x430]
lea rcx, [rbp + 0x438]
mov qword [rsp + 0x30], rax
xor r9d, r9d
mov dword [rsp + 0x28], 0x1000000
xor r8d, r8d
mov edx, 0xf0004
mov dword [rsp + 0x20], 2
call qword [sym.imp.ntdll.dll_NtCreateSection]
mov ebx, eax
test eax, eax
jns 0x1400029dc
lea rcx, str.NtCreateSection:_0x_08X_n
jmp 0x140002a40
mov rcx, qword [rbp + 0x438]
xor r9d, r9d
mov dword [rsp + 0x48], 2
mov r8, rsi
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x38], 2
mov qword [rsp + 0x30], r14
lea rdx, [r9 - 1]
mov qword [rsi], rdi
mov qword [rsp + 0x28], r12
mov qword [r14], r12
mov qword [rsp + 0x20], r12
call qword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov ebx, eax
cmp eax, 0x40000003
jne 0x140002a35
test r15b, r15b
je 0x140002a30
cmp qword [rsi], rdi
jne 0x140002a47
mov ebx, r12d
jmp 0x140002a47
test eax, eax
jns 0x140002a47
lea rcx, str.NtMapViewOfSection:_0x_08X_n
mov edx, eax
call fcn.140002ab0
mov rcx, qword [rbp + 0x430]
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rbp + 0x438]
test rcx, rcx
je 0x140002a66
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, ebx
mov rdi, qword [rsp + 0x520]
mov rbx, qword [rsp + 0x528]
add rsp, 0x4f0
pop r15
pop r14
pop r12
pop rsi
pop rbp
ret
mov edx, ebx
lea rcx, str.NtCreateFile:_0x_08X_n
call fcn.140002ab0
mov eax, ebx
jmp 0x140002a70