Function at 0x1400095f0
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0x98
xor esi, esi
movzx ebx, byte [rcx + 0x52]
xor r13d, r13d
mov qword [rsp + 0x68], r9
xor r12d, r12d
mov qword [rsp + 0x80], rdx
mov rbp, r8
mov qword [rsp + 0x50], rcx
lea r14d, [rbx + 1]
mov byte [rsp + 0x30], 0
xor edi, edi
xor r15d, r15d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [rsp + 0x38], esi
mov dword [rsp + 0x60], edi
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x40], r15
mov dword [rsp + 0x48], ebx
mov bpl, byte [rsp + 0x30]
mov rsi, qword [rsp + 0x80]
mov rdi, qword [rsp + 0x68]
xor dl, dl
lea rbx, [r12 + r12*2]
shl rbx, 6
lea rbx, [rsi + rbx + 0x40]
cmp dword [rbx], 0
jne 0x1400097c6
mov edx, dword [rdi + 0x28c]
cmp edx, 1
je 0x140009a50
cmp edx, 2
jne 0x140009a4a
lea rcx, [rsp + 0x34]
cmp rcx, qword [rdi + 0x30]
je 0x140009a3b
mov eax, 4
mov r15, rcx
mov dword [rsp + 0x88], r13d
mov dword [rsp + 0x90], r14d
mov qword [rsp + 0x80], rsi
mov rsi, rax
mov rdx, qword [rdi + 0x38]
cmp rdx, rsi
cmovae rdx, rsi
mov r13d, edx
test r13, r13
je 0x140009717
mov r14, qword [rdi + 0x28]
mov dword [r14], 1
mov dword [r14 + 4], r13d
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rdi + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [r14 + 8]
test eax, eax
jle 0x140009a0c
mov rcx, r15
mov r8, r13
mov rdx, qword [rdi + 0x30]
call fcn.140021e60
add r15, r13
sub rsi, r13
jne 0x1400096c2
mov r13d, dword [rsp + 0x88]
xor r15d, r15d
mov r14d, dword [rsp + 0x90]
mov rsi, qword [rsp + 0x80]
mov r8d, dword [rsp + 0x34]
test r8, r8
je 0x1400097b6
mov rcx, rdi
mov rdx, qword [rbx + 0x18]
call fcn.140009c10
test eax, eax
jl 0x1400099e3
mov dword [rbx], 1
lea r9, [r12 + r12*2]
shl r9, 6
mov dword [rbx + 4], r13d
cmp dword [r9 + rsi + 0x20], 0
jne 0x1400097a4
mov edx, dword [r9 + rsi + 0x24]
cmp r13d, edx
jne 0x1400097a4
mov r8d, dword [rsp + 0x48]
mov rcx, qword [r9 + rsi + 0x30]
mov dword [r9 + rsi + 0x20], 1
mov qword [r9 + rsi + 0x18], rbx
lea edx, [rdx + r8 + 1]
mov dword [r9 + rsi + 0x24], edx
call qword [sym.imp.KERNEL32.dll_SetEvent]
inc r13d
inc r12d
cmp r12d, r14d
cmovae r12, r15
jmp 0x140009660
cmp r13d, dword [rsp + 0x60]
je 0x140009a06
mov bpl, 1
jmp 0x1400097d5
inc dl
add rbx, 0x30
cmp dl, 2
jb 0x14000966f
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x68], rdi
mov dword [rsp + 0x88], r13d
mov rbx, qword [rsp + 0x40]
mov r12d, dword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdx, qword [rsp + 0x78]
mov ecx, r14d
xor r8d, r8d
mov r9d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov r13d, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea r15, [r13 + r13*2]
shl r15, 6
cmp dword [r15 + rsi + 0x20], 0
jne 0x14000987b
mov r9d, dword [r15 + rsi + 0x24]
xor dl, dl
lea r8, [rsi + r15 + 0x40]
cmp dword [r8], 1
jne 0x140009870
cmp r9d, dword [r8 + 4]
jne 0x140009870
mov rcx, qword [r15 + rsi + 0x30]
lea edx, [r9 + r12 + 1]
mov dword [r15 + rsi + 0x20], 1
mov dword [r15 + rsi + 0x24], edx
mov qword [r15 + rsi + 0x18], r8
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x14000987b
inc dl
add r8, 0x30
cmp dl, 2
jl 0x14000983f
cmp r13d, ebx
jne 0x1400099bb
mov qword [rsp + 0x70], r15
mov rax, rsi
mov r13d, dword [rsp + 0x60]
mov ecx, r14d
mov edi, dword [rsp + 0x88]
xor edx, edx
mov r12, qword [rsp + 0x68]
xor r10b, r10b
lea r9, [rbx + rbx*2]
shl r9, 6
mov r8, rdx
add r9, rax
cmp dword [r8 + r9 + 0x40], 2
jne 0x140009986
cmp r13d, dword [r8 + r9 + 0x44]
jne 0x140009986
mov dword [r8 + r9 + 0x40], 0
lea r10, [rbx + rbx*2]
shl r10, 6
mov esi, dword [r8 + r9 + 0x4c]
mov r14d, dword [r8 + r9 + 0x48]
mov r15, qword [r10 + rax + 0x10]
test rsi, rsi
je 0x14000996d
mov dword [rsp + 0x90], ecx
mov qword [rsp + 0x80], rax
mov rdx, r14
mov rax, r14
and rdx, 0xffffff
mov r8, rdx
neg r8
add r8, 0x1000000
cmp r8, rsi
mov r9d, dword [r15 + 0x8f8]
cmovae r8, rsi
shr rax, 0x18
add r14, r8
sub rsi, r8
mov r10, qword [r15 + rax*8 + 0x488]
mov rax, r14
sub rax, r9
jns 0x140009a9f
add rdx, r10
mov rcx, r12
call fcn.140009af0
test eax, eax
jl 0x1400099e3
test rsi, rsi
jne 0x1400098fe
mov ecx, dword [rsp + 0x90]
xor edx, edx
mov rax, qword [rsp + 0x80]
inc r13d
inc ebx
cmp ebx, ecx
cmovae rbx, rdx
test bpl, bpl
je 0x1400098a2
jmp 0x140009a7d
nop dword [rax]
inc r10b
add r8, 0x30
cmp r10b, 2
jb 0x1400098b3
mov dword [rsp + 0x88], edi
mov rsi, rax
mov qword [rsp + 0x68], r12
mov r14d, ecx
mov dword [rsp + 0x60], r13d
mov r12d, dword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
test bpl, bpl
jne 0x1400097f6
mov qword [rsp + 0x40], rbx
xor r15d, r15d
mov r12, qword [rsp + 0x58]
mov r13d, dword [rsp + 0x88]
mov rdi, qword [rsp + 0x68]
jmp 0x140009660
mov esi, eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
add rsp, 0x98
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov esi, dword [rsp + 0x38]
jmp 0x1400099e5
jge 0x140009717
mov r13d, dword [rsp + 0x88]
xor r15d, r15d
mov r14d, dword [rsp + 0x90]
mov rsi, qword [rsp + 0x80]
mov r8d, dword [rsp + 0x34]
test eax, eax
jl 0x1400099e3
jmp 0x14000973f
mov rcx, rdi
mov edx, 4
call fcn.140009ab0
jmp 0x140009a2d
xor eax, eax
dec eax
jmp 0x1400099e3
mov r10, rsp
lea rdx, [rsp + 0x34]
mov rcx, qword [rdi + 0x290]
lea r9, [rdx - 4]
mov r8d, 4
mov qword [r10 + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x30]
jmp 0x140009a2d
cmp r13d, edi
jne 0x1400098a2
mov qword [rsp + 0x80], rax
mov rdx, rax
mov rax, qword [rsp + 0x70]
mov esi, dword [rax + rdx + 0x28]
jmp 0x1400099e5
mov r14, rax
jmp 0x140009944