Function at 0x14005cb20
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
mov rax, qword [0x1401e7e78]
xor rax, rsp
mov qword [rbp + 0x17], rax
xor r12d, r12d
mov rbx, rdx
mov r15, rcx
cmp byte [rcx + 4], r12b
je 0x14005cb63
mov rcx, qword [rdx + 0x48]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
xor ecx, ecx
mov dword [rbx + 0x74], 6
mov dword [rbp - 0x79], r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov al, byte [r15 + 4]
lea r13, [rbx + 0x50]
neg al
lea r9, [rbp - 0x79]
mov r8d, 0x80
lea rdx, [rbp - 0x69]
sbb rcx, rcx
and rcx, r13
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [r15 + 4], r12b
je 0x14005cc12
cmp eax, 0x6d
je 0x14005cbe2
test edi, edi
je 0x14005cbc1
mov edi, dword [rbp - 0x79]
test edi, edi
jne 0x14005cc20
lea r8, [rbp - 0x79]
mov rdx, rbx
mov rcx, r15
call fcn.14005dd70
cmp eax, 1
jne 0x14005cbdd
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14005cc1d
cmp eax, 2
jne 0x14005cbe9
mov dword [rbx + 0x40], 1
xor eax, eax
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140139b10
mov rbx, qword [rsp + 0x120]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
test edi, edi
jne 0x14005cc1d
cmp eax, 0xea
jne 0x14005cbe9
mov edi, dword [rbp - 0x79]
cmp edi, 4
jb 0x14005cbe9
cmp byte [r15 + 1], r12b
jne 0x14005cbe9
mov esi, dword [rbp - 0x69]
cmp esi, edi
ja 0x14005cc87
mov rax, qword [rbx + 0x198]
test rax, rax
je 0x14005cc4e
cmp dword [rbx + 0x194], edi
jae 0x14005cc6a
mov rcx, rax
call fcn.14012008c
mov ecx, edi
call fcn.140120104
mov qword [rbx + 0x198], rax
mov dword [rbx + 0x194], edi
test rax, rax
je 0x14005cbe9
mov edi, dword [rbp - 0x79]
mov r8d, edi
lea rdx, [rbp - 0x69]
mov rcx, rax
call fcn.14013b6b0
mov eax, dword [rbp - 0x79]
mov dword [rbx + 0x190], eax
jmp 0x14005cda4
cmp esi, 0x7fffffff
jae 0x14005cbe9
mov r14, qword [rbx + 0x198]
test r14, r14
je 0x14005ccaf
cmp dword [rbx + 0x194], esi
jae 0x14005ccd3
mov rcx, r14
call fcn.14012008c
mov rcx, rsi
call fcn.140120104
mov qword [rbx + 0x198], rax
mov r14, rax
mov dword [rbx + 0x194], esi
test rax, rax
je 0x14005cbe9
mov edi, dword [rbp - 0x79]
mov r8d, edi
lea rdx, [rbp - 0x69]
mov rcx, r14
call fcn.14013b6b0
mov edi, dword [rbp - 0x79]
add rdi, r14
sub esi, dword [rbp - 0x79]
test esi, esi
jle 0x14005cd9b
cmp byte [r15 + 4], r12b
je 0x14005cd03
mov rcx, qword [rbx + 0x48]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov al, byte [r15 + 4]
lea r9, [rbp - 0x79]
neg al
mov r8d, esi
mov rdx, rdi
sbb rcx, rcx
and rcx, r13
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [r15 + 4], 0
je 0x14005cd75
cmp eax, 0x6d
je 0x14005cbe2
test r12d, r12d
je 0x14005cd55
mov ecx, dword [rbp - 0x79]
test ecx, ecx
jne 0x14005cd84
lea r8, [rbp - 0x79]
mov rdx, rbx
mov rcx, r15
call fcn.14005dd70
cmp eax, 1
jne 0x14005cbe9
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14005cd81
test r12d, r12d
jne 0x14005cd81
cmp eax, 0xea
jne 0x14005cd93
mov ecx, dword [rbp - 0x79]
mov eax, ecx
sub esi, ecx
add rdi, rax
xor r12d, r12d
jmp 0x14005cceb
test esi, esi
jne 0x14005cbe9
sub edi, r14d
mov dword [rbx + 0x190], edi
mov eax, 1
jmp 0x14005cbeb