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

Disassembly:
push rbp
push rbx
push rsi
push r12
push r14
push r15
lea rbp, [rsp - 0x418]
sub rsp, 0x518
mov rax, qword [0x1800c2840]
xor rax, rsp
mov qword [rbp + 0x400], rax
xor r12d, r12d
mov r15, r9
mov qword [r8], r12
mov rsi, r8
mov qword [r9], r12
movzx r14d, dl
lea r9, [rbp - 0x78]
mov qword [rsp + 0x60], r12
xor r8d, r8d
lea rdx, [rsp + 0x78]
call qword [sym.imp.ntdll.dll_RtlDosPathNameToRelativeNtPathName_U_WithStatus]
mov ebx, eax
test eax, eax
js 0x180001b87
movzx ecx, word [rbp - 0x78]
lea rdx, [rsp + 0x78]
mov dword [rsp + 0x50], r12d
lea r9, [rbp - 0x28]
mov qword [rsp + 0x48], r12
lea r8, [rbp - 0x58]
test cx, cx
mov dword [rsp + 0x40], 0x60
mov dword [rsp + 0x38], 1
lea rcx, [rsp + 0x60]
xorps xmm0, xmm0
mov dword [rsp + 0x30], 1
mov eax, r12d
mov dword [rsp + 0x28], 0x80
cmovne rax, qword [rbp - 0x68]
mov qword [rbp - 0x50], rax
lea rax, [rbp - 0x78]
cmove rax, rdx
mov dword [rbp - 0x58], 0x30
mov edx, 0x120089
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x40], 0x40
movdqu xmmword [rbp - 0x38], 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 [rbp - 0x80]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
lea rcx, [rbp - 0x78]
call qword [sym.imp.ntdll.dll_RtlReleaseRelativeName]
test ebx, ebx
js 0x180001b87
mov qword [rsp + 0x510], rdi
mov edi, r12d
mov qword [rsp + 0x68], r12
test r14b, r14b
je 0x180001a9a
mov rcx, qword [rsp + 0x60]
lea rax, [rbp]
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 - 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtReadFile]
mov ebx, eax
test eax, eax
jns 0x180001a62
lea rcx, str.NtReadFile:_0x_08X_n
jmp 0x180001b3b
lea r9, [rsp + 0x70]
mov r8d, 0x400
lea rdx, [rbp]
xor ecx, ecx
call qword [sym.imp.ntdll.dll_RtlImageNtHeaderEx]
test eax, eax
js 0x180001b5f
mov rax, qword [rsp + 0x70]
mov ecx, 0x20b
cmp word [rax + 0x18], cx
jne 0x180001a97
mov rdi, qword [rax + 0x30]
jmp 0x180001a9a
mov edi, dword [rax + 0x34]
mov rax, qword [rsp + 0x60]
lea rcx, [rsp + 0x68]
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 0x180001ad9
lea rcx, str.NtCreateSection:_0x_08X_n
jmp 0x180001b3b
mov rcx, qword [rsp + 0x68]
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], r15
lea rdx, [r9 - 1]
mov qword [rsi], rdi
mov qword [rsp + 0x28], r12
mov qword [r15], r12
mov qword [rsp + 0x20], r12
call qword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov ebx, eax
cmp eax, 0x40000003
jne 0x180001b30
test r14b, r14b
je 0x180001b2b
cmp qword [rsi], rdi
jne 0x180001b42
mov ebx, r12d
jmp 0x180001b42
test eax, eax
jns 0x180001b42
lea rcx, str.NtMapViewOfSection:_0x_08X_n
mov edx, eax
call fcn.180001bb0
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x180001b5d
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, ebx
mov rdi, qword [rsp + 0x510]
mov rcx, qword [rbp + 0x400]
xor rcx, rsp
call fcn.1800101f0
add rsp, 0x518
pop r15
pop r14
pop r12
pop rsi
pop rbx
pop rbp
ret
mov edx, ebx
lea rcx, str.NtCreateFile:_0x_08X_n
call fcn.180001bb0
mov eax, ebx
jmp 0x180001b67