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

Disassembly:
mov qword [rsp + 0x18], rbx
mov dword [rsp + 0x20], r9d
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x1a0]
sub rsp, 0x2a0
xor esi, esi
xor r14b, r14b
mov qword [rsp + 0x50], rsi
mov r15, r8
mov rdi, rdx
mov rbx, rcx
test rdx, rdx
je 0x140091eba
test r8, r8
je 0x140091eba
mov word [r8], si
mov rcx, qword [rcx + 8]
cmp rcx, 0xffffffffffffffff
je 0x140091ae1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], 0xffffffffffffffff
xor r9d, r9d
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov rcx, rdi
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 8], rax
cmp rax, 0xffffffffffffffff
je 0x140091eba
xorps xmm0, xmm0
mov dword [rsp + 0x40], esi
xor eax, eax
mov edi, esi
movups xmmword [rsp + 0x70], xmm0
mov dword [rbp - 0x80], eax
nop dword [rax]
mov rcx, qword [rbx + 8]
lea rdx, [rbp - 0x70]
mov r8d, 0x40
mov eax, edi
sub r8d, edi
mov dword [rbp + 0x1e8], esi
add rdx, rax
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 0x1e8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140091b73
mov eax, dword [rbp + 0x1e8]
test eax, eax
je 0x140091b73
add edi, eax
cmp edi, 0x40
jb 0x140091b30
mov eax, edi
lock add qword [0x1401f4d70], rax
mov rcx, qword [rbx + 8]
cmp edi, 0x40
jne 0x140091ea2
mov eax, 0x5a4d
cmp word [rbp - 0x70], ax
jne 0x140091ea2
cmp rcx, 0xffffffffffffffff
jne 0x140091ba1
jmp 0x140091bd9
movsxd rax, dword [rbp - 0x34]
lea r8, [rsp + 0x5c]
mov edx, eax
mov qword [rsp + 0x58], rax
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x58], eax
cmp eax, 0xffffffff
jne 0x140091bd4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, 0xffffffffffffffff
test eax, eax
jne 0x140091bd9
mov rcx, qword [rsp + 0x58]
movsxd rax, dword [rbp - 0x34]
cmp rcx, rax
jne 0x140091ea2
cmp qword [rbx + 8], 0xffffffffffffffff
je 0x140091ea2
mov edi, esi
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rbx + 8]
lea rdx, [rsp + 0x40]
mov r8d, 4
mov eax, edi
sub r8d, edi
mov dword [rbp + 0x1d8], esi
add rdx, rax
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 0x1d8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140091c44
mov eax, dword [rbp + 0x1d8]
test eax, eax
je 0x140091c44
add edi, eax
cmp edi, 4
jb 0x140091c00
mov eax, edi
lock add qword [0x1401f4d70], rax
cmp edi, 4
jne 0x140091ea2
cmp dword [rsp + 0x40], 0x4550
jne 0x140091ea2
cmp qword [rbx + 8], 0xffffffffffffffff
je 0x140091ea2
mov edi, esi
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rbx + 8]
lea rdx, [rsp + 0x70]
mov r8d, shutdown
mov eax, edi
sub r8d, edi
mov dword [rsp + 0x44], esi
add rdx, rax
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x44]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140091cbe
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x140091cbe
add edi, eax
cmp edi, 0x14
jb 0x140091c80
mov eax, edi
lock add qword [0x1401f4d70], rax
cmp edi, 0x14
jne 0x140091ea2
movzx edi, word [rsp + 0x70]
mov qword [rsp + 0x2d0], r12
mov r12d, 0x14c
cmp di, r12w
je 0x140091cf8
mov eax, 0x8664
cmp di, ax
jne 0x140091e9a
xor edx, edx
lea rcx, [rbp - 0x30]
mov r8d, 0xe0
call fcn.14014e180
xor edx, edx
lea rcx, [rbp + 0xb0]
mov r8d, 0xf0
call fcn.14014e180
mov rcx, qword [rbx + 8]
cmp di, r12w
jne 0x140091dcf
cmp rcx, 0xffffffffffffffff
je 0x140091d58
mov r9d, 1
mov qword [rsp + 0x60], rsi
lea r8, [rsp + 0x64]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x60], eax
cmp eax, 0xffffffff
jne 0x140091d58
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rbx + 8], 0xffffffffffffffff
je 0x140091e9a
mov edi, esi
nop word [rax + rax]
mov rcx, qword [rbx + 8]
lea rdx, [rbp - 0x30]
mov r8d, 0xe0
mov eax, edi
sub r8d, edi
mov dword [rsp + 0x48], esi
add rdx, rax
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140091db0
mov eax, dword [rsp + 0x48]
test eax, eax
je 0x140091db0
add edi, eax
cmp edi, 0xe0
jb 0x140091d70
mov eax, edi
lock add qword [0x1401f4d70], rax
cmp edi, 0xe0
jne 0x140091e9a
lea rsi, [rbp + 0x50]
jmp 0x140091e6c
cmp rcx, 0xffffffffffffffff
je 0x140091dfc
mov r9d, 1
mov qword [rsp + 0x68], rsi
lea r8, [rsp + 0x6c]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x68], eax
cmp eax, 0xffffffff
jne 0x140091dfc
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rbx + 8], 0xffffffffffffffff
je 0x140091e9a
mov edi, esi
nop dword [rax]
mov rcx, qword [rbx + 8]
lea rdx, [rbp + 0xb0]
mov r8d, 0xf0
mov eax, edi
sub r8d, edi
mov dword [rsp + 0x4c], esi
add rdx, rax
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140091e53
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x140091e53
add edi, eax
cmp edi, 0xf0
jb 0x140091e10
mov eax, edi
lock add qword [0x1401f4d70], rax
cmp edi, 0xf0
jne 0x140091e9a
lea rsi, [rbp + 0x140]
mov ecx, 2
lea rdi, [rsp + 0x50]
rep movsd dword [rdi], dword [rsi]
cmp dword [rsp + 0x50], 0
je 0x140091e9a
cmp dword [rsp + 0x54], 0
je 0x140091e9a
mov r8, r15
lea rdx, [rsp + 0x50]
mov rcx, rbx
call fcn.140090e50
movzx r14d, al
mov r12, qword [rsp + 0x2d0]
mov rcx, qword [rbx + 8]
cmp rcx, 0xffffffffffffffff
je 0x140091eba
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], 0xffffffffffffffff
mov rbx, qword [rsp + 0x2e0]
movzx eax, r14b
add rsp, 0x2a0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret