Function at 0x1800a65d0
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 [0x18049d0e0]
xor rax, rsp
mov qword [rbp - 1], rax
mov r12, qword [rbp + 0x7f]
mov r15, rdx
lea rdx, [rbp - 0x39]
mov r13, r9
mov r14, r8
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x1800a661d
mov eax, 0x200
jmp 0x1800a6884
mov r8d, dword [rbp - 0x39]
mov r9d, r8d
and r9d, 1
mov qword [rsp + 0xb0], rbx
mov eax, r8d
mov qword [rsp + 0xa8], rsi
mov ecx, r9d
or ecx, 2
and al, 2
mov eax, r8d
cmove ecx, r9d
mov edx, ecx
or edx, 4
and al, 4
cmove edx, ecx
mov ecx, r8d
mov eax, edx
or eax, 0x10
and ecx, 0x10
cmove eax, edx
mov edx, eax
or edx, 0x20
and r8b, 0x20
cmove edx, eax
test ecx, ecx
je 0x1800a6678
bts edx, 0x1e
jmp 0x1800a667c
bts edx, 0x1f
bts edx, 0x18
mov rcx, rdi
mov ebx, edx
bts ebx, 0x17
test r9d, r9d
cmovne ebx, edx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov ecx, ebx
cmp eax, 0x28
jbe 0x1800a6775
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x5d]
mov qword [rsp + 0x20], 0
mov r8d, 2
lea rdx, [rbp - 0x61]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
lea edx, [r9 + 0x24]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x5d]
mov qword [rsp + 0x20], 0
mov r8d, 4
lea rdx, [rbp - 0x59]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
mov ecx, ebx
cmp word [rbp - 0x61], ax
jne 0x1800a6775
mov edx, dword [rbp - 0x59]
lea eax, [rdx + 0x34]
cmp esi, eax
jbe 0x1800a6775
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp - 0x5d]
mov qword [rsp + 0x20], 0
mov r8d, 4
lea rdx, [rbp - 0x51]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rbp - 0x51]
cmp eax, 0x5a4d
je 0x1800a676f
cmp eax, 0x454e
je 0x1800a676f
cmp eax, 0x454c
je 0x1800a676f
mov ecx, ebx
cmp eax, 0x4550
jne 0x1800a6775
mov ecx, ebx
bts ecx, 0x16
mov rbx, qword [rsp + 0xb0]
test r15, r15
je 0x1800a6785
mov dword [r15], ecx
test r14, r14
je 0x1800a678d
mov dword [r14], esi
mov rcx, qword [rbp - 0x25]
mov rsi, qword [rsp + 0xa8]
test r13, r13
je 0x1800a6815
mov r8, qword [rbp - 0x2d]
movabs r10, 0xfe624e212ac18000
add r8, r10
movabs r9, 0xd6bf94d5e57a42bd
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 dword [r13], edx
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 dword [r13 + 4], edx
add r8, r10
imul r8
add rdx, r8
sar rdx, 0x17
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov dword [r13 + 8], edx
test r12, r12
je 0x1800a6882
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 ecx, word [rbp - 0x49]
and ax, 0xf
sub cx, 0x3c
shl cx, 4
or cx, ax
movzx eax, word [rbp - 0x43]
and eax, 0x1f
shl cx, 5
movzx edx, cx
movzx ecx, word [rbp - 0x3f]
or edx, eax
movzx eax, word [rbp - 0x41]
and cx, 0x3f
shl ax, 6
or cx, ax
shl edx, 0x10
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 [r12], edx
xor eax, eax
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.1800b80c0
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret