Function at 0x140066710
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rsi, rdx
mov rdi, rcx
lea r14, [rcx + 0x70]
lea r15, [rcx + 0x78]
mov r9d, dword [rcx + 0x78]
test r9d, r9d
je 0x1400667a7
mov rax, qword [r14]
dec r9d
mov dword [r15], r9d
lea rcx, [rax + 1]
mov qword [r14], rcx
movzx ebp, byte [rax]
test r9d, r9d
je 0x1400667bc
mov rax, qword [r14]
dec r9d
mov dword [r15], r9d
lea rcx, [rax + 1]
mov qword [r14], rcx
movzx eax, byte [rax]
shl eax, 8
add ebp, eax
test r9d, r9d
je 0x1400667d2
mov rax, qword [r14]
dec r9d
mov dword [r15], r9d
lea rcx, [rax + 1]
mov qword [r14], rcx
movzx eax, byte [rax]
shl eax, 0x10
add ebp, eax
test r9d, r9d
je 0x1400667e8
mov rax, qword [r14]
dec r9d
mov dword [r15], r9d
lea rcx, [rax + 1]
mov qword [r14], rcx
movzx eax, byte [rax]
shl eax, 0x18
add eax, ebp
mov dword [rsi], eax
xor ebx, ebx
jmp 0x1400667f9
mov ebp, 0xffffffff
cmp dword [rdi + 0x60], 0
jne 0x1400667bc
cmp dword [rdi + 0x3c], 0
je 0x1400669a4
cmp dword [rdi + 0x60], 0
jne 0x1400667cc
cmp dword [rdi + 0x3c], 0
je 0x140066903
add ebp, 0xffffff00
cmp dword [rdi + 0x60], 0
jne 0x1400667e2
cmp dword [rdi + 0x3c], 0
je 0x140066884
add ebp, 0xffff0000
mov ebx, 0xffffffff
cmp dword [rdi + 0x60], 0
jne 0x1400667f9
cmp dword [rdi + 0x3c], 0
je 0x14006680c
mov eax, ebx
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsp + 0x20], rsi
mov r12d, dword [rdi + 0x14]
mov r13, qword [rdi + 0x20]
mov dword [rdi + 0x78], 0
xor r9d, r9d
mov rsi, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
nop word [rax + rax]
mov ecx, dword [rdi + 4]
mov edx, r9d
add rdx, r13
mov r8d, r12d
sub r8d, r9d
call rsi
test eax, eax
jle 0x140066976
mov r9d, dword [r15]
add r9d, eax
mov dword [r15], r9d
mov r8d, r12d
sub r8d, r9d
jbe 0x140066989
mov ecx, dword [rdi + 4]
mov edx, r9d
add rdx, r13
call rsi
test eax, eax
jle 0x140066976
mov r9d, dword [r15]
add r9d, eax
mov dword [r15], r9d
cmp r9d, r12d
jb 0x140066830
jmp 0x140066989
mov ebx, dword [rdi + 0x14]
mov r12, qword [rdi + 0x20]
mov dword [rdi + 0x78], 0
xor r9d, r9d
mov r13, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
nop dword [rax]
mov ecx, dword [rdi + 4]
mov edx, r9d
add rdx, r12
mov r8d, ebx
sub r8d, r9d
call r13
test eax, eax
jle 0x140066a0f
mov r9d, dword [r15]
add r9d, eax
mov dword [r15], r9d
mov r8d, ebx
sub r8d, r9d
jbe 0x1400668ed
mov ecx, dword [rdi + 4]
mov edx, r9d
add rdx, r12
call r13
test eax, eax
jle 0x140066a0f
mov r9d, dword [r15]
add r9d, eax
mov dword [r15], r9d
cmp r9d, ebx
jb 0x1400668a0
mov rax, qword [rdi + 0x20]
mov qword [rdi + 0x70], rax
test r9d, r9d
jne 0x14006676f
jmp 0x1400667e2
mov ebx, dword [rdi + 0x14]
mov r12, qword [rdi + 0x20]
mov dword [rdi + 0x78], 0
xor r9d, r9d
mov r13, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
nop dword [rax + rax]
mov ecx, dword [rdi + 4]
mov edx, r9d
add rdx, r12
mov r8d, ebx
sub r8d, r9d
call r13
test eax, eax
jle 0x140066a38
mov r9d, dword [r15]
add r9d, eax
mov dword [r15], r9d
mov r8d, ebx
sub r8d, r9d
jbe 0x140066a4b
mov ecx, dword [rdi + 4]
mov edx, r9d
add rdx, r12
call r13
test eax, eax
jle 0x140066a38
mov r9d, dword [r15]
add r9d, eax
mov dword [r15], r9d
cmp r9d, ebx
jb 0x140066920
jmp 0x140066a4b
test eax, eax
js 0x140066a8a
mov dword [rdi + 0x3c], 1
mov r9d, dword [rdi + 0x78]
mov rax, qword [rdi + 0x20]
mov qword [rdi + 0x70], rax
test r9d, r9d
mov rsi, qword [rsp + 0x20]
jne 0x14006678c
jmp 0x1400667f9
mov ebx, dword [rdi + 0x14]
mov r12, qword [rdi + 0x20]
mov dword [rdi + 0x78], 0
xor r9d, r9d
mov r13, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
nop dword [rax]
mov ecx, dword [rdi + 4]
mov edx, r9d
add rdx, r12
mov r8d, ebx
sub r8d, r9d
call r13
test eax, eax
jle 0x140066a61
mov r9d, dword [r15]
add r9d, eax
mov dword [r15], r9d
mov r8d, ebx
sub r8d, r9d
jbe 0x140066a74
mov ecx, dword [rdi + 4]
mov edx, r9d
add rdx, r12
call r13
test eax, eax
jle 0x140066a61
mov r9d, dword [r15]
add r9d, eax
mov dword [r15], r9d
cmp r9d, ebx
jb 0x1400669c0
jmp 0x140066a74
test eax, eax
js 0x140066ab2
mov dword [rdi + 0x3c], 1
mov r9d, dword [rdi + 0x78]
mov rax, qword [rdi + 0x20]
mov qword [rdi + 0x70], rax
test r9d, r9d
jne 0x14006676f
jmp 0x1400667e2
test eax, eax
js 0x140066ae9
mov dword [rdi + 0x3c], 1
mov r9d, dword [rdi + 0x78]
mov rax, qword [rdi + 0x20]
mov qword [rdi + 0x70], rax
test r9d, r9d
jne 0x140066752
jmp 0x1400667cc
test eax, eax
js 0x140066b20
mov dword [rdi + 0x3c], 1
mov r9d, dword [rdi + 0x78]
mov rax, qword [rdi + 0x20]
mov qword [rdi + 0x70], rax
test r9d, r9d
jne 0x14006673a
jmp 0x1400667bc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov ebx, 0xffffffff
mov rcx, rdi
mov edx, 0xffffffff
mov r8, rax
call fcn.140056740
jmp 0x1400667f9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rcx, rdi
mov edx, 0xffffffff
mov r8, rax
call fcn.140056740
mov r9d, dword [rdi + 0x78]
mov eax, 0xffff0000
add ebp, eax
test r9d, r9d
jne 0x140066789
jmp 0x1400667e8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rcx, rdi
mov edx, 0xffffffff
mov r8, rax
call fcn.140056740
mov r9d, dword [rdi + 0x78]
mov eax, 0xffffff00
add ebp, eax
test r9d, r9d
jne 0x14006676c
jmp 0x1400667d2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov ebp, 0xffffffff
mov rcx, rdi
mov edx, 0xffffffff
mov r8, rax
call fcn.140056740
mov r9d, dword [rdi + 0x78]
test r9d, r9d
jne 0x14006674f
jmp 0x1400667bc