Function at 0x1401289ec
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x100]
sub rsp, 0x200
mov rax, qword [0x1401e7e78]
xor rax, rsp
mov qword [rbp + 0xf0], rax
and dword [rdx], 0
mov r14, rcx
and dword [r8], 0
lea rcx, [rsp + 0x48]
or dword [r9], 0xffffffff
mov r12, r9
mov rsi, r8
mov rdi, rdx
xor r15b, r15b
call fcn.140120d54
and qword [rsp + 0x30], 0
xor r9d, r9d
and dword [rsp + 0x28], 0
mov edx, 0x80000000
mov rcx, r14
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140128b0f
test r14, r14
je 0x140128cbe
lea edx, [rax + 0x26]
mov rcx, r14
call fcn.14013a9b0
test rax, rax
je 0x140128cbe
mov rdx, r14
lea rcx, [rsp + 0x58]
call fcn.140127e1c
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140120e10
lea rcx, [rsp + 0x58]
call fcn.140120ddc
lea rcx, [rsp + 0x48]
call fcn.140120ef0
test al, al
je 0x140128cbe
lea rcx, [rsp + 0x48]
call fcn.140058574
and qword [rsp + 0x30], 0
lea r8d, [rbx + 2]
and dword [rsp + 0x28], 0
mov rcx, rax
xor r9d, r9d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140128cbe
lea rcx, [rsp + 0x48]
call fcn.140058574
mov r14, rax
xorps xmm0, xmm0
lea rcx, [rbp - 0x60]
xor eax, eax
xor edx, edx
movups xmmword [rsp + 0x68], xmm0
mov dword [rbp - 0x68], eax
movups xmmword [rsp + 0x78], xmm0
lea r8d, [rax + 0x40]
movups xmmword [rbp - 0x78], xmm0
call fcn.14013b230
and dword [rsp + 0x40], 0
lea rdx, [rsp + 0x68]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x140128b53
mov eax, dword [rsp + 0x68]
mov dword [r12], eax
mov rcx, r14
call fcn.140125bf4
mov r14, rax
test rax, rax
je 0x140128b97
mov rcx, rax
call fcn.140128cec
test al, al
je 0x140128b97
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rdi], 0xfe
call fcn.140123504
neg al
mov r15b, 1
sbb ecx, ecx
and ecx, 0x20
add ecx, 0x20
mov dword [rsi], ecx
jmp 0x140128cbe
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, 0x40
lea rdx, [rbp - 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140128cb5
mov eax, 0x5a4d
cmp word [rbp - 0x60], ax
je 0x140128bfd
test r14, r14
je 0x140128cb5
lea rdx, str..com
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x140128cb5
mov dword [rdi], 0xff
mov r15b, 1
mov dword [rsi], 0x10
jmp 0x140128cb5
mov edx, dword [rbp - 0x24]
xor r9d, r9d
mov dword [rdi], 0xff
xor r8d, r8d
mov rcx, rbx
mov dword [rsi], 0x10
mov r15b, 1
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x140128cb5
mov r14d, 0x108
lea rcx, [rbp - 0x20]
mov r8d, r14d
xor edx, edx
call fcn.14013b230
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, r14d
lea rdx, [rbp - 0x20]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140128cb5
cmp dword [rbp - 0x20], 0x4550
jne 0x140128c90
movzx eax, word [rbp - 8]
cmp eax, 0x10b
je 0x140128c82
cmp eax, 0x20b
jne 0x140128cb5
movzx eax, word [rbp + 0x3c]
mov dword [rdi], eax
mov dword [rsi], 0x40
jmp 0x140128cb5
movzx eax, word [rbp + 0x3c]
mov dword [rdi], eax
mov dword [rsi], 0x20
jmp 0x140128cb5
mov eax, 0x454e
cmp word [rbp - 0x20], ax
jne 0x140128cb5
mov cl, byte [rbp + 0x16]
sub cl, 2
mov dword [rsi], 0x20
and cl, 0xfd
neg cl
sbb ecx, ecx
neg ecx
add ecx, 2
mov dword [rdi], ecx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x48]
call fcn.140120ddc
mov al, r15b
mov rcx, qword [rbp + 0xf0]
xor rcx, rsp
call fcn.140139b10
add rsp, 0x200
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret