Function at 0x140045898
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xd0
mov rax, qword [0x1400841b0]
xor rax, rsp
mov qword [rbp + 0xf], rax
mov r12, qword [rbp + 0x7f]
mov rsi, rcx
mov qword [rbp - 0x71], r8
xor ecx, ecx
mov rdi, rdx
xor eax, eax
xchg dword [0x140085714], eax
xchg dword [0x140085718], ecx
and dword [rbp - 0x79], 0
lea rcx, [rbp - 0x69]
xor edx, edx
mov rbx, r9
lea r8d, [rdx + 0x20]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
call fcn.1400499f0
mov rcx, qword [rsi + 0x30]
mov r15, rax
mov r14d, dword [rbp - 0x71]
mov dword [rbp - 0x59], ebx
shr rbx, 0x20
mov dword [rbp - 0x55], ebx
lea rbx, [rsi + 0x28]
mov qword [rbp - 0x51], rcx
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
nop dword [rax + rax]
mov cl, byte [rsi + 0x20]
test cl, cl
je 0x140045950
mov ecx, 0x323
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
test rbx, rbx
je 0x140045996
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
nop dword [rax + rax]
jmp 0x140045996
mov rcx, qword [rsi + 8]
lea rax, [rbp - 0x69]
lea r9, [rbp - 0x79]
mov qword [rsp + 0x20], rax
mov r8d, r14d
mov rdx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
setne dil
test rbx, rbx
je 0x14004598d
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
nop dword [rax + rax]
test dil, dil
jne 0x140045bc2
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
je 0x140045a4d
cmp eax, 0x3e5
je 0x140045a4d
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov dword [rsp + 0x30], ecx
call fcn.1400097d0
mov ecx, 4
mov r8, rax
cmp dword [rax], ecx
jbe 0x140045a2f
and dword [rbp - 0x15], 0
lea rax, str.Failed_to_read_file_for_hashing
and dword [rbp - 5], 0
lea edx, [rcx + 4]
and dword [rbp + 0xb], 0
mov qword [rbp - 0x21], rax
lea rax, [rbp - 0x71]
mov qword [rbp - 0x11], rax
lea rax, [rsp + 0x30]
mov qword [rbp - 1], rax
mov dword [rbp - 0x19], 0x40
mov dword [rbp - 9], edx
mov dword [rbp + 7], ecx
lea rax, [rbp - 0x41]
mov qword [rsp + 0x28], rax
lea rdx, [0x14006ed69]
lea eax, [rcx + 1]
mov rcx, r8
mov dword [rsp + 0x20], eax
call fcn.1400011b0
mov eax, 1
xchg dword [0x140085714], eax
mov ecx, dword [rsp + 0x30]
xchg dword [0x140085718], ecx
mov eax, dword [rsp + 0x30]
jmp 0x140045bd8
mov eax, 2
xchg dword [0x140085714], eax
and dword [rbp - 0x7d], 0
mov r9d, dword [r15 + 8]
lea r8, [rbp - 0x7d]
mov rcx, rsi
lea rdx, [rbp - 0x69]
call fcn.140045694
test al, al
jne 0x140045bb2
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov edx, eax
cmp eax, 0x102
je 0x140045ab2
movzx eax, dx
mov ecx, 3
xchg dword [0x140085714], ecx
or eax, 0x80070000
test edx, edx
cmovle eax, edx
mov ecx, eax
xchg dword [0x140085718], ecx
jmp 0x140045bd8
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
nop dword [rax + rax]
mov al, byte [rsi + 0x20]
mov edi, 0x80070000
test al, al
je 0x140045af4
mov ecx, 0x323
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
test rbx, rbx
je 0x140045b23
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
nop dword [rax + rax]
jmp 0x140045b23
mov rcx, qword [rsi + 8]
call qword [sym.imp.api_ms_win_core_io_l1_1_1.dll_CancelIo]
nop dword [rax + rax]
test eax, eax
setne r14b
test rbx, rbx
je 0x140045b1e
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
nop dword [rax + rax]
test r14b, r14b
jne 0x140045b66
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, edi
test eax, eax
cmovle ebx, eax
cmp ebx, 0x80070323
je 0x140045b55
mov r8d, 0x80070323
lea rcx, str.Common
mov edx, ebx
call fcn.14003d144
mov ecx, 4
xchg dword [0x140085714], ecx
xchg dword [0x140085718], ebx
or r9d, 0xffffffff
lea r8, [rbp - 0x7d]
lea rdx, [rbp - 0x69]
mov rcx, rsi
call fcn.140045694
test al, al
jne 0x140045bab
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx edx, ax
or edx, edi
test eax, eax
cmovle edx, eax
mov eax, 5
xchg dword [0x140085714], eax
mov ecx, edx
mov eax, edx
xchg dword [0x140085718], ecx
jmp 0x140045bd8
mov eax, 6
jmp 0x140045bb7
mov eax, 7
xchg dword [0x140085714], eax
mov ecx, dword [rbp - 0x7d]
jmp 0x140045bd0
mov edx, 8
xchg dword [0x140085714], edx
mov ecx, dword [rbp - 0x79]
mov eax, ecx
mov qword [r12], rax
xor eax, eax
mov rcx, qword [rbp + 0xf]
xor rcx, rsp
call fcn.14004ddf0
add rsp, 0xd0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret