Function at 0x1400093f8
Capabilities:
Get file size
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], r12
push rbp
push r14
push r15
lea rbp, [rax - 0x38]
sub rsp, 0x120
mov rax, qword [0x14006f5c0]
xor rax, rsp
mov qword [rbp + 0x10], rax
lea rcx, [rsp + 0x78]
call fcn.1400047d0
test eax, eax
je 0x14000943b
or eax, 0xffffffff
jmp 0x14000985f
and qword [rsp + 0x40], 0
lea rcx, [rsp + 0x40]
call fcn.140004874
test eax, eax
jne 0x14000984a
call fcn.14000482c
mov r14d, 3
cmp eax, 1
jne 0x14000951d
and dword [rsp + 0x28], 0
lea r8, str.BootBootStat.dat
and qword [rsp + 0x20], 0
or r9d, 0xffffffff
xor edx, edx
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
mov ebx, eax
lea edx, [rax - 1]
call qword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov rdi, rax
test rax, rax
je 0x1400094c4
mov dword [rsp + 0x28], ebx
lea r8, str.BootBootStat.dat
or r9d, 0xffffffff
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
jne 0x14000988e
test rdi, rdi
je 0x140009897
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
je 0x14000950d
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x48]
and qword [rsp + 0x48], 0
mov rdx, rdi
call qword [sym.imp.OLEAUT32.dll_VarBstrCmp]
test eax, eax
js 0x1400098a2
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rbx, qword [rsp + 0x48]
jmp 0x140009512
mov rbx, qword [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x14000953c
cmp eax, 2
jne 0x14000984a
lea rdx, str.EFIMicrosoftBootBootStat.dat
lea rcx, [rsp + 0x40]
call fcn.14001a550
mov rbx, qword [rsp + 0x40]
and qword [rsp + 0x30], 0
xor r9d, r9d
mov dword [rsp + 0x28], 0x2000000
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x20], r14d
lea r12d, [r9 + 5]
mov r8d, r12d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14000982b
lea rdx, [rsp + 0x68]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14000982b
cmp qword [rsp + 0x68], 0x1000000
jg 0x14000982b
mov ecx, dword [rsp + 0x68]
call qword [sym.imp.msvcrt.dll_malloc]
mov r14, rax
test rax, rax
je 0x14000982b
and qword [rbp + 8], 0
lea rax, fcn.1400129f0
mov qword [rbp - 0x70], rax
lea rdx, [rbp - 0x30]
lea rax, [rbp - 0x70]
mov qword [rbp - 0x68], r14
lea rcx, [rbp - 0x70]
mov qword [rbp - 0x38], rax
call fcn.1400129f0
mov rcx, qword [rbp - 0x38]
mov qword [rbp + 8], rax
test rcx, rcx
je 0x1400095f5
mov rax, qword [rcx]
lea rdx, [rbp - 0x70]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov r8d, dword [rsp + 0x68]
lea r9, [rsp + 0x70]
and qword [rsp + 0x20], 0
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400097f4
mov rax, qword [rsp + 0x68]
cmp dword [rsp + 0x70], eax
jne 0x1400097f4
mov r8d, dword [r14]
xor edx, edx
mov qword [rsp + 0x60], rdx
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
sub r8d, 2
je 0x140009728
sub r8d, 1
je 0x1400096b7
cmp r8d, 1
je 0x140009699
mov rcx, qword [rsp + 0x50]
or r14d, 0xffffffff
test rcx, rcx
je 0x1400097f8
sub rdx, rcx
mov rax, rcx
and rdx, 0xfffffffffffffff8
cmp rdx, 0x1000
jb 0x14000968f
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400098aa
call fcn.14003b3dc
jmp 0x1400097f8
lea r8, [rsp + 0x50]
mov edx, eax
mov rcx, r14
call fcn.1400092a0
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x58]
jmp 0x1400097a0
mov r15d, dword [r14 + 4]
cmp r15d, dword [r14 + 0xc]
jae 0x1400096ad
mov ecx, dword [r14 + 8]
cmp r15d, ecx
jae 0x1400096ad
mov rax, qword [rsp + 0x58]
mov r8d, r15d
add r8, r14
mov qword [rsp + 0x48], r8
cmp dword [r8 + 0x18], 0
je 0x1400097a0
add r15d, dword [r8 + 0x18]
cmp r15d, ecx
jae 0x14000971d
cmp rdx, rax
je 0x140009701
mov qword [rax], r8
add rax, 8
mov qword [rsp + 0x58], rax
jmp 0x14000971d
lea r8, [rsp + 0x48]
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140011dbc
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x58]
mov ecx, dword [r14 + 8]
cmp r15d, ecx
jb 0x1400096cf
jmp 0x1400097a0
mov r15d, dword [r14 + 4]
cmp r15d, dword [r14 + 0xc]
jae 0x140009795
mov ecx, dword [r14 + 8]
cmp r15d, ecx
jae 0x140009795
mov rax, qword [rsp + 0x58]
mov r8d, r15d
add r8, r14
mov qword [rsp + 0x48], r8
cmp dword [r8 + 0x18], 0
je 0x14000979a
add r15d, dword [r8 + 0x18]
cmp r15d, ecx
jae 0x14000978a
cmp rdx, rax
je 0x14000976e
mov qword [rax], r8
add rax, 8
mov qword [rsp + 0x58], rax
jmp 0x14000978a
lea r8, [rsp + 0x48]
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140011dbc
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x58]
mov ecx, dword [r14 + 8]
cmp r15d, ecx
jb 0x140009740
jmp 0x14000979a
mov rax, qword [rsp + 0x58]
mov r12d, 2
mov rcx, qword [rsp + 0x50]
sub rax, rcx
sar rax, 3
jmp 0x1400097b9
mov r8, qword [rcx + rax*8]
cmp dword [r8 + 0x24], 0x11
je 0x1400097c7
dec rax
cmp rax, 0xffffffffffffffff
jne 0x1400097ae
jmp 0x140009656
mov rax, qword [r8 + 0x28]
cmp rax, qword [rsp + 0x78]
jne 0x140009656
mov rax, qword [r8 + 0x30]
cmp rax, qword [rbp - 0x80]
jne 0x140009656
xor r14d, r14d
cmp dword [r8 + 0x38], r12d
sete r14b
jmp 0x14000965a
or r14d, 0xffffffff
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x140009888
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x14000982f
mov rax, qword [rcx]
lea rdx, [rbp - 0x30]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
and qword [rbp + 8], 0
jmp 0x14000982f
or r14d, 0xffffffff
cmp rdi, 0xffffffffffffffff
je 0x140009853
mov rcx, rdi
call qword [fcn.140037368]
test eax, eax
jne 0x140009853
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140009853
mov rbx, qword [rsp + 0x40]
or r14d, 0xffffffff
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, r14d
mov rcx, qword [rbp + 0x10]
xor rcx, rsp
call fcn.1400408d0
lea r11, [rsp + 0x120]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov r12, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.1400398f8
int3
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, 0x8007000e
call fcn.140002198
int3
mov ecx, eax
call fcn.140002198
int3
call fcn.140042010
int3