Function at 0x1401077b0
Capabilities:
Read file on windows

Disassembly:
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [0x14033d010]
xor rax, rsp
mov qword [rbp - 0x20], rax
cmp qword [rdx + 0x18], 0x10
mov r15, r9
mov r14, r8
mov qword [rbp - 0x40], 0
jb 0x1401077e3
mov rdx, qword [rdx]
mov qword [rsp + 0x80], rbx
lea r8, [0x1402adbfc]
lea rcx, [rbp - 0x40]
mov qword [rsp + 0x50], rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
test eax, eax
jne 0x140107843
mov rcx, qword [rbp - 0x40]
mov ebx, 2
mov r8d, ebx
xor edx, edx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov rcx, qword [rbp - 0x40]
xor r8d, r8d
xor edx, edx
mov edi, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
cmp edi, 0x18
jge 0x140107868
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor al, al
mov rdi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x80]
mov rcx, qword [rbp - 0x20]
xor rcx, rsp
call fcn.14022d970
add rsp, 0x60
pop r15
pop r14
pop rbp
ret
mov r9, qword [rbp - 0x40]
lea rcx, [rbp - 0x38]
mov edx, 1
mov qword [rsp + 0x58], rsi
lea r8d, [rdx + 0x17]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp byte [rbp - 0x38], 0xff
mov sil, 1
jne 0x1401078fa
cmp byte [rbp - 0x37], 0xd8
jne 0x1401078fa
cmp byte [rbp - 0x36], 0xff
jne 0x1401078fa
xor sil, sil
nop dword [rax]
movzx ecx, byte [rbp - 0x35]
lea eax, [rcx + 0x40]
test al, 0xf4
jne 0x1401078b0
cmp cl, 0xc8
jne 0x1401078f7
movzx ecx, byte [rbp - 0x34]
movzx eax, byte [rbp - 0x33]
add eax, ebx
shl ecx, 8
lea ebx, [rcx + 2]
add ebx, eax
lea eax, [rbx + 0xc]
cmp eax, edi
jg 0x1401078fa
mov rcx, qword [rbp - 0x40]
xor r8d, r8d
mov edx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov r9, qword [rbp - 0x40]
lea rcx, [rbp - 0x36]
mov edx, 1
lea r8d, [rdx + 0xb]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp byte [rbp - 0x36], 0xff
je 0x1401078a0
jmp 0x1401078fa
mov sil, 1
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test sil, sil
mov rsi, qword [rsp + 0x58]
je 0x140107843
movzx eax, byte [rbp - 0x38]
cmp al, 0xff
jne 0x140107954
cmp byte [rbp - 0x37], 0xd8
jne 0x140107843
cmp byte [rbp - 0x36], al
jne 0x140107843
movzx eax, byte [rbp - 0x30]
movzx ecx, byte [rbp - 0x31]
shl ecx, 8
add ecx, eax
movzx eax, byte [rbp - 0x2e]
mov dword [r15], ecx
movzx ecx, byte [rbp - 0x2f]
shl ecx, 8
add ecx, eax
mov al, 1
mov dword [r14], ecx
jmp 0x140107845
cmp al, 0x47
jne 0x140107993
cmp byte [rbp - 0x37], 0x49
jne 0x140107843
cmp byte [rbp - 0x36], 0x46
jne 0x140107843
movzx eax, byte [rbp - 0x32]
movzx ecx, byte [rbp - 0x31]
shl ecx, 8
add ecx, eax
movzx eax, byte [rbp - 0x30]
mov dword [r14], ecx
movzx ecx, byte [rbp - 0x2f]
shl ecx, 8
add ecx, eax
mov al, 1
mov dword [r15], ecx
jmp 0x140107845
cmp al, 0x89
jne 0x140107843
cmp byte [rbp - 0x37], 0x50
jne 0x140107843
cmp byte [rbp - 0x36], 0x4e
jne 0x140107843
cmp byte [rbp - 0x35], 0x47
jne 0x140107843
cmp byte [rbp - 0x34], 0xd
jne 0x140107843
cmp byte [rbp - 0x33], 0xa
jne 0x140107843
cmp byte [rbp - 0x32], 0x1a
jne 0x140107843
cmp byte [rbp - 0x31], 0xa
jne 0x140107843
cmp byte [rbp - 0x2c], 0x49
jne 0x140107843
cmp byte [rbp - 0x2b], 0x48
jne 0x140107843
cmp byte [rbp - 0x2a], 0x44
jne 0x140107843
cmp byte [rbp - 0x29], 0x52
jne 0x140107843
movzx eax, byte [rbp - 0x27]
movzx ecx, byte [rbp - 0x28]
shl ecx, 8
add ecx, eax
movzx eax, byte [rbp - 0x26]
shl ecx, 8
add ecx, eax
movzx eax, byte [rbp - 0x25]
shl ecx, 8
add ecx, eax
movzx eax, byte [rbp - 0x23]
mov dword [r14], ecx
movzx ecx, byte [rbp - 0x24]
shl ecx, 8
add ecx, eax
movzx eax, byte [rbp - 0x22]
shl ecx, 8
add ecx, eax
movzx eax, byte [rbp - 0x21]
shl ecx, 8
add ecx, eax
mov al, 1
mov dword [r15], ecx
jmp 0x140107845