Function at 0x140003038
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r15
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [0x140025020]
xor rax, rsp
mov qword [rbp - 0x10], rax
and dword [rdx], 0
mov rdi, rdx
lea rdx, [rbp - 0x30]
mov rsi, rcx
call fcn.14000279c
test eax, eax
jns 0x14000308b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
movzx eax, ax
or eax, 0x80070000
test ecx, ecx
cmovle eax, ecx
jmp 0x140003232
mov rbx, qword [rbp - 0x30]
or r15, 0xffffffffffffffff
and qword [rsp + 0x28], 0
mov r9, rbx
and dword [rbp - 0x1c], 0
xor edx, edx
and dword [rbp - 0x20], 0
mov rcx, rsi
and qword [rbp - 0x18], 0
lea r8d, [r15 + 3]
shr r9, 0x20
mov qword [rbp - 0x28], r15
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r10, rax
mov qword [rbp - 0x28], rax
lea rcx, [rax + 1]
test rcx, 0xfffffffffffffffe
je 0x1400030fe
mov eax, ebx
lea edx, [r15 + 5]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rbp - 0x18], rax
mov rdx, rax
test rax, rax
jne 0x14000311b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, qword [rbp - 0x18]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1400031d2
mov eax, 0x5a4d
cmp word [rdx], ax
jne 0x1400031cd
movsxd rcx, dword [rdx + 0x3c]
cmp dword [rcx + rdx], 0x4550
jne 0x1400031cd
movzx eax, word [rcx + rdx + 0x18]
mov r8d, 0x10b
sub ax, r8w
mov r8d, 0xfeff
test r8w, ax
jne 0x1400031cd
mov eax, dword [rcx + rdx + 0x28]
mov dword [rdi], eax
mov rdx, qword [rbp - 0x18]
test rdx, rdx
je 0x140003173
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
xor edx, edx
mov qword [rbp - 0x18], rdx
mov rcx, qword [rbp - 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400031a0
cmp dword [rbp - 0x20], 0
je 0x14000318f
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x140003195
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [rbp - 0x18]
mov rcx, r15
mov qword [rbp - 0x28], rcx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400031c9
cmp dword [rbp - 0x20], 0
je 0x1400031b8
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x1400031be
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [rbp - 0x18]
mov rcx, r15
mov qword [rbp - 0x28], rcx
xor ebx, ebx
jmp 0x1400031d6
mov ebx, 0x80070241
mov rcx, qword [rbp - 0x28]
test rdx, rdx
je 0x1400031ed
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
and qword [rbp - 0x18], 0
mov rcx, qword [rbp - 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140003212
cmp dword [rbp - 0x20], 0
je 0x140003205
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x14000320b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r15
mov qword [rbp - 0x28], rcx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140003230
cmp dword [rbp - 0x20], 0
je 0x14000322a
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x140003230
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140004200
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop rdi
pop rbp
ret