Function at 0x180012bc0
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push rbp
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xb8
mov rax, qword [0x1800438e8]
xor rax, rsp
mov qword [rbp - 1], rax
mov r14, qword [rbp + 0x7f]
mov r13, rdx
lea rdx, [rbp - 0x39]
mov r15, r9
mov r12, r8
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x180012c0d
mov eax, 0x200
jmp 0x180012e6c
mov eax, dword [rbp - 0x39]
mov qword [rsp + 0xb0], rbx
mov ecx, 1
mov edx, eax
mov ebx, 0
mov qword [rsp + 0xa8], rsi
and edx, 1
cmovne ebx, ecx
test al, 2
je 0x180012c39
or ebx, 2
test al, 4
je 0x180012c40
or ebx, 4
mov ecx, eax
and ecx, 0x10
je 0x180012c4a
or ebx, 0x10
test al, 0x20
je 0x180012c51
or ebx, 0x20
test ecx, ecx
je 0x180012c5b
bts ebx, 0x1e
jmp 0x180012c5f
bts ebx, 0x1f
bts ebx, 0x18
test edx, edx
jne 0x180012c6b
bts ebx, 0x17
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp eax, 0x28
jbe 0x180012d57
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x5d]
lea rdx, [rbp - 0x61]
mov r8d, 2
mov rcx, rdi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x24]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x5d]
lea rdx, [rbp - 0x59]
mov r8d, 4
mov rcx, rdi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r11d, 0x54ad
cmp word [rbp - 0x61], r11w
jne 0x180012d57
mov edx, dword [rbp - 0x59]
lea eax, [rdx + 0x34]
cmp esi, eax
jbe 0x180012d57
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x5d]
lea rdx, [rbp - 0x51]
mov r8d, 4
mov rcx, rdi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r11d, dword [rbp - 0x51]
cmp r11d, 0x5a4d
je 0x180012d53
cmp r11d, 0x454e
je 0x180012d53
cmp r11d, 0x454c
je 0x180012d53
cmp r11d, 0x4550
jne 0x180012d57
bts ebx, 0x16
test r13, r13
je 0x180012d60
mov dword [r13], ebx
mov rbx, qword [rsp + 0xb0]
test r12, r12
je 0x180012d71
mov dword [r12], esi
mov rcx, qword [rbp - 0x25]
mov rsi, qword [rsp + 0xa8]
test r15, r15
je 0x180012df8
mov r8, qword [rbp - 0x2d]
movabs r10, 0xfe624e212ac18000
movabs r9, 0xd6bf94d5e57a42bd
add r8, r10
mov rax, r9
imul r8
add rdx, r8
lea r8, [rcx + r10]
sar rdx, 0x17
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov rax, r9
mov qword [r15], rdx
imul r8
mov rax, r9
add rdx, r8
sar rdx, 0x17
mov r8, rdx
shr r8, 0x3f
add rdx, r8
mov r8, qword [rbp - 0x35]
mov qword [r15 + 8], rdx
add r8, r10
imul r8
add rdx, r8
sar rdx, 0x17
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [r15 + 0x10], rdx
test r14, r14
je 0x180012e6a
mov qword [rbp - 0x51], rcx
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 0x51]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movzx eax, word [rbp - 0x47]
movzx r11d, word [rbp - 0x49]
movzx ecx, word [rbp - 0x3f]
and ax, 0xf
sub r11w, 0x3c
shl r11w, 4
and cx, 0x3f
or r11w, ax
movzx eax, word [rbp - 0x43]
and eax, 0x1f
shl r11w, 5
movzx edx, r11w
or edx, eax
movzx eax, word [rbp - 0x41]
shl ax, 6
shl edx, 0x10
or cx, ax
shl cx, 5
movzx eax, cx
or edx, eax
movzx eax, word [rbp - 0x3d]
add ax, ax
and eax, 0x1f
or edx, eax
mov dword [r14], edx
xor eax, eax
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.18001be70
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret