Function at 0x140009a00
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 edi, edi
movzx ebx, byte [rcx + 0x48]
xor r15d, r15d
mov qword [rsp + 0x60], r9
xor r14d, r14d
mov qword [rsp + 0x78], rdx
mov rsi, r8
mov qword [rsp + 0x50], rcx
lea ebp, [rbx + 1]
mov byte [rsp + 0x30], 0
xor r12d, r12d
xor r13d, r13d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [rsp + 0x38], edi
mov dword [rsp + 0x58], r12d
mov dword [rsp + 0x48], ebx
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x70], rsi
mov dil, byte [rsp + 0x30]
mov rbx, qword [rsp + 0x78]
mov r12, qword [rsp + 0x60]
xor dl, dl
lea rsi, [r14 + r14*2]
shl rsi, 6
lea rsi, [rbx + rsi + 0x40]
cmp dword [rsi], 0
jne 0x140009bd1
mov edx, dword [r12 + 0x28c]
cmp edx, 1
je 0x140009e63
cmp edx, 2
jne 0x140009e5d
lea rcx, [rsp + 0x34]
cmp rcx, qword [r12 + 0x30]
je 0x140009e4e
mov eax, 4
mov qword [rsp + 0x80], r14
mov r14, rcx
mov dword [rsp + 0x88], r15d
mov dword [rsp + 0x90], ebp
mov rbp, rax
mov qword [rsp + 0x78], rbx
mov rdx, qword [r12 + 0x38]
cmp rdx, rbp
cmovae rdx, rbp
mov ebx, edx
test rbx, rbx
je 0x140009b2d
mov r15, qword [r12 + 0x28]
mov dword [r15], 1
mov dword [r15 + 4], ebx
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [r12 + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [r15 + 8]
test eax, eax
jle 0x140009e1e
mov rcx, r14
mov r8, rbx
mov rdx, qword [r12 + 0x30]
call fcn.14001eff0
add r14, rbx
sub rbp, rbx
jne 0x140009ad4
mov r14, qword [rsp + 0x80]
mov r15d, dword [rsp + 0x88]
mov ebp, dword [rsp + 0x90]
mov rbx, qword [rsp + 0x78]
mov r8d, dword [rsp + 0x34]
test r8, r8
je 0x140009e09
mov rcx, r12
mov rdx, qword [rsi + 0x18]
call fcn.14000a460
test eax, eax
jl 0x140009de6
mov dword [rsi], 1
lea r9, [r14 + r14*2]
shl r9, 6
mov dword [rsi + 4], r15d
cmp dword [r9 + rbx + 0x20], 0
jne 0x140009bbf
mov edx, dword [r9 + rbx + 0x24]
cmp r15d, edx
jne 0x140009bbf
mov r8d, dword [rsp + 0x48]
mov rcx, qword [r9 + rbx + 0x30]
mov dword [r9 + rbx + 0x20], 1
mov qword [r9 + rbx + 0x18], rsi
lea edx, [rdx + r8 + 1]
mov dword [r9 + rbx + 0x24], edx
call qword [sym.imp.KERNEL32.dll_SetEvent]
inc r15d
inc r14d
cmp r14d, ebp
cmovae r14, r13
jmp 0x140009a6b
inc dl
add rsi, 0x30
cmp dl, 2
jb 0x140009a7a
mov qword [rsp + 0x80], r14
mov dword [rsp + 0x88], r15d
mov rsi, qword [rsp + 0x40]
mov r13d, dword [rsp + 0x48]
mov r12, qword [rsp + 0x50]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdx, qword [rsp + 0x70]
mov ecx, ebp
xor r8d, r8d
mov r9d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov r14d, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea r15, [r14 + r14*2]
shl r15, 6
cmp dword [r15 + rbx + 0x20], 0
jne 0x140009c82
mov r9d, dword [r15 + rbx + 0x24]
xor dl, dl
lea r8, [rbx + r15 + 0x40]
cmp dword [r8], 1
jne 0x140009c77
cmp r9d, dword [r8 + 4]
jne 0x140009c77
mov rcx, qword [r15 + rbx + 0x30]
lea edx, [r9 + r13 + 1]
mov dword [r15 + rbx + 0x20], 1
mov dword [r15 + rbx + 0x24], edx
mov qword [r15 + rbx + 0x18], r8
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x140009c82
inc dl
add r8, 0x30
cmp dl, 2
jl 0x140009c46
cmp r14d, esi
jne 0x140009dbb
mov qword [rsp + 0x68], r15
mov rax, rbx
mov r12d, dword [rsp + 0x88]
mov ecx, ebp
mov ebp, dword [rsp + 0x58]
xor edx, edx
mov r13, qword [rsp + 0x60]
xor r10b, r10b
lea r9, [rsi + rsi*2]
shl r9, 6
mov r8, rdx
add r9, rax
cmp dword [r8 + r9 + 0x40], 2
jne 0x140009d8c
cmp ebp, dword [r8 + r9 + 0x44]
jne 0x140009d8c
mov dword [r8 + r9 + 0x40], 0
lea r10, [rsi + rsi*2]
shl r10, 6
mov r14d, dword [r8 + r9 + 0x4c]
mov r15d, dword [r8 + r9 + 0x48]
mov rbx, qword [r10 + rax + 0x10]
test r14, r14
je 0x140009d6b
mov dword [rsp + 0x90], ecx
mov qword [rsp + 0x78], rax
mov rdx, r15
mov rax, r15
and rdx, 0xffffff
mov rcx, r13
mov r8, rdx
neg r8
add r8, 0x1000000
cmp r8, r14
mov r9d, dword [rbx + 0x960]
cmovae r8, r14
shr rax, 0x18
add r15, r8
mov r10, r15
sub r14, r8
sub r10, r9
mov r11, qword [rbx + rax*8 + 0x488]
cmovns r15, r10
add rdx, r11
call fcn.140009ef0
test eax, eax
jl 0x140009de6
test r14, r14
jne 0x140009d01
mov ecx, dword [rsp + 0x90]
xor edx, edx
mov rax, qword [rsp + 0x78]
inc ebp
inc esi
cmp esi, ecx
cmovae rsi, rdx
test dil, dil
je 0x140009ca8
cmp ebp, r12d
jne 0x140009ca8
jmp 0x140009e91
nop dword [rax]
inc r10b
add r8, 0x30
cmp r10b, 2
jb 0x140009cb9
mov dword [rsp + 0x88], r12d
mov rbx, rax
mov dword [rsp + 0x58], ebp
mov ebp, ecx
mov r13d, dword [rsp + 0x48]
mov r12, qword [rsp + 0x50]
test dil, dil
jne 0x140009bff
mov qword [rsp + 0x40], rsi
xor r13d, r13d
mov r14, qword [rsp + 0x80]
mov r15d, dword [rsp + 0x88]
mov r12, qword [rsp + 0x60]
jmp 0x140009a6b
mov edi, eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
add rsp, 0x98
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
cmp r15d, dword [rsp + 0x58]
je 0x140009e18
mov dil, 1
jmp 0x140009be0
mov edi, dword [rsp + 0x38]
jmp 0x140009de8
jge 0x140009b2d
mov r14, qword [rsp + 0x80]
mov r15d, dword [rsp + 0x88]
mov ebp, dword [rsp + 0x90]
mov rbx, qword [rsp + 0x78]
mov r8d, dword [rsp + 0x34]
test eax, eax
jl 0x140009de6
jmp 0x140009b56
mov rcx, r12
mov edx, 4
call fcn.140009eb0
jmp 0x140009e40
xor eax, eax
dec eax
jmp 0x140009de6
mov r10, rsp
lea rdx, [rsp + 0x34]
mov rcx, qword [r12 + 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 0x140009e40
mov qword [rsp + 0x78], rax
mov rdx, rax
mov rax, qword [rsp + 0x68]
mov edi, dword [rax + rdx + 0x28]
jmp 0x140009de8