Function at 0x140002dd4
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], 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
mov esi, edx
mov rdi, rcx
lea rdx, [rbp - 0x30]
call fcn.14000279c
test eax, eax
jns 0x140002e23
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
movzx eax, ax
or eax, 0x80070000
test ecx, ecx
cmovle eax, ecx
jmp 0x140003016
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, rdi
and qword [rbp - 0x18], 0
lea r8d, [r15 + 5]
shr r9, 0x20
mov qword [rbp - 0x28], r15
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rbp - 0x28], rax
lea rcx, [rax + 1]
test rcx, 0xfffffffffffffffe
je 0x140002f93
mov ebx, ebx
lea edx, [r15 + 7]
xor r9d, r9d
mov qword [rsp + 0x20], rbx
xor r8d, r8d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rbp - 0x18], rax
test rax, rax
je 0x140002f93
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002fb5
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002fb5
mov edx, 0x10b
cmp word [rcx + 0x18], dx
jne 0x140002ed5
cmp dword [rcx + 0x74], 4
jb 0x140002fb1
mov edx, 0x98
jmp 0x140002ef6
mov edx, 0x20b
cmp word [rcx + 0x18], dx
jne 0x140002fb5
cmp dword [rcx + 0x84], 4
jb 0x140002fb1
mov edx, 0xa8
cmp dword [rdx + rcx], 0
je 0x140002fb1
mov r8d, dword [rdx + rcx + 4]
test r8d, r8d
je 0x140002fb1
lea eax, [r8 + rsi]
mov dword [rdx + rcx + 4], eax
mov rdx, rbx
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.KERNEL32.dll_FlushViewOfFile]
test eax, eax
je 0x140002f93
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x140002f3b
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 0x140002f64
cmp dword [rbp - 0x20], 0
je 0x140002f57
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x140002f5d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r15
mov qword [rbp - 0x28], rcx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140002f86
cmp dword [rbp - 0x20], 0
je 0x140002f7c
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x140002f82
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x28], r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x140002fa9
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140002fab
xor ebx, ebx
mov rax, qword [rbp - 0x18]
jmp 0x140002fba
xor ebx, ebx
jmp 0x140002fba
mov ebx, 0x80070241
test rax, rax
je 0x140002fcd
mov rcx, rax
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 0x140002ff6
cmp dword [rbp - 0x20], 0
je 0x140002fe9
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x140002fef
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r15
mov qword [rbp - 0x28], rcx
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140003014
cmp dword [rbp - 0x20], 0
je 0x14000300e
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x140003014
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 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop rdi
pop rbp
ret