Function at 0x1400df96c
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xd8]
sub rsp, 0x1d8
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov rax, qword [0x1401cd010]
xor rax, rsp
mov qword [rbp + 0xc0], rax
mov qword [rbp - 0x58], r9
mov r12, r8
mov rbx, rdx
mov qword [rbp - 0x78], rdx
mov qword [rbp - 0x70], rcx
mov rdi, qword [rbp + 0x140]
and qword [r9], 0
xor eax, eax
test r8, r8
je 0x1400e00b7
xor r14d, r14d
mov dword [rsp + 0x30], eax
and dword [rsp + 0x40], eax
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x18]
call qword [case.0x1400ee2b6.0]
mov dword [rsp + 0x54], eax
mov rcx, qword [rdi]
mov rax, qword [rcx + 0x28]
mov rcx, rdi
call qword [case.0x1400ee2b6.0]
mov r13, rax
mov qword [rsp + 0x48], rax
mov rcx, qword [rdi]
mov rax, qword [rcx + 0x18]
mov rcx, rdi
call qword [case.0x1400ee2b6.0]
mov edx, 0x10000
test eax, eax
je 0x1400dfa1e
movzx ecx, bx
sub edx, ecx
mov eax, edx
mov ecx, r12d
cmp rax, r12
cmovb ecx, edx
mov dword [rsp + 0x50], ecx
mov eax, ecx
mov rsi, r12
sub rsi, rax
add rsi, 0x1ffff
shr rsi, 0x10
mov eax, 4
cmp esi, eax
cmovg esi, eax
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x1400ee2b6.0]
test eax, eax
jne 0x1400dfa68
mov eax, 0x40
cmp esi, eax
cmovg esi, eax
mov rax, qword [rdi]
mov edx, esi
mov rcx, rdi
mov rax, qword [rax]
call qword [case.0x1400ee2b6.0]
mov ebx, eax
mov dword [rsp + 0x38], eax
test eax, eax
js 0x1400e0054
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x30]
call qword [case.0x1400ee2b6.0]
mov ebx, eax
mov dword [rsp + 0x38], eax
test eax, eax
js 0x1400e0054
xor r15d, r15d
movsxd rax, esi
mov qword [rsp + 0x78], rax
test esi, esi
jle 0x1400e001d
xor r13d, r13d
lea rsi, [rbp + 0x10]
lea rbx, [rbp + 0x14]
mov qword [rbp - 0x68], rbx
lea rax, [rbp - 4]
mov qword [rsp + 0x70], rax
lea rax, [rbp - 8]
mov qword [rsp + 0x68], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x60], rax
lea rax, [rbp + 8]
mov qword [rsp + 0x58], rax
lea rcx, [rbp - 0x48]
mov qword [rbp - 0x60], rcx
lea rcx, [rbp]
mov qword [rbp - 0x80], rcx
test r12, r12
je 0x1400dfd47
cmp r14d, r15d
jne 0x1400dfb75
and dword [rcx + 0x14], 0
and qword [rcx], 0
mov r9d, 0x1f0003
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventExW]
mov rcx, qword [rbp - 0x80]
mov qword [rcx], rax
test rax, rax
jne 0x1400dfb58
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov dword [rsp + 0x38], ebx
test ebx, ebx
jne 0x1400e0054
mov rbx, qword [rbp - 0x68]
mov rcx, qword [rbp - 0x80]
mov rax, qword [rcx]
mov rdx, qword [rbp - 0x60]
mov qword [rdx], rax
inc r14d
add rcx, 0x38
mov qword [rbp - 0x80], rcx
add rdx, 8
mov qword [rbp - 0x60], rdx
cmp dword [rsp + 0x54], 0
je 0x1400dfb8b
and dword [rsp + 0x54], 0
mov ecx, dword [rsp + 0x50]
mov eax, ecx
mov dword [rsi], ecx
jmp 0x1400dfb9b
mov eax, r12d
mov ecx, 0x10000
cmp r12, rcx
cmova eax, ecx
mov dword [rsi], eax
sub r12, rax
mov rax, qword [rdi]
mov r8, qword [rsp + 0x48]
mov edx, r15d
mov rcx, rdi
mov rax, qword [rax + 8]
call qword [case.0x1400ee2b6.0]
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rax
mov rcx, qword [rsp + 0x60]
mov r8, qword [rsp + 0x48]
mov qword [rcx], r8
mov edx, dword [rsi]
add r8, rdx
mov qword [rsp + 0x48], r8
mov rcx, qword [rsp + 0x68]
mov r9, qword [rbp - 0x78]
mov dword [rcx], r9d
mov rcx, r9
shr rcx, 0x20
mov r8, qword [rsp + 0x70]
mov dword [r8], ecx
add r9, rdx
mov qword [rbp - 0x78], r9
and dword [rsp + 0x44], 0
movsxd rcx, r15d
imul rcx, rcx, 0x38
mov qword [rsp + 0x38], rcx
lea r9, [rbp - 0x18]
add rcx, r9
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x44]
mov r8d, edx
mov rdx, rax
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400dfc4a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400dfd3d
mov dword [rbx], 1
inc dword [rsp + 0x30]
jmp 0x1400dfc74
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x1400ee2b6.0]
test eax, eax
je 0x1400dfc8a
test r13, r13
je 0x1400dfc8a
mov rcx, qword [rbp + r13*8 - 0x48]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [rbx], 2
mov rax, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x68]
mov r8, qword [rsp + 0x60]
mov r9, qword [rsp + 0x58]
jmp 0x1400dfcf7
mov eax, dword [rsi]
cmp dword [rsp + 0x44], eax
jne 0x1400dfd3d
mov rax, qword [rdi]
lea rdx, [rbp - 0x20]
add rdx, qword [rsp + 0x38]
mov r8, qword [rbp - 0x58]
mov rcx, rdi
mov rax, qword [rax + 0x10]
call qword [case.0x1400ee2b6.0]
mov ebx, eax
mov dword [rsp + 0x38], eax
test eax, eax
js 0x1400e0054
dec r15d
dec r13
mov r9, qword [rsp + 0x58]
sub r9, 0x38
mov r8, qword [rsp + 0x60]
sub r8, 0x38
mov rdx, qword [rsp + 0x68]
sub rdx, 0x38
mov rax, qword [rsp + 0x70]
sub rax, 0x38
mov rbx, qword [rbp - 0x68]
sub rbx, 0x38
sub rsi, 0x38
inc r15d
inc r13
add r9, 0x38
mov qword [rsp + 0x58], r9
add r8, 0x38
mov qword [rsp + 0x60], r8
add rdx, 0x38
mov qword [rsp + 0x68], rdx
add rax, 0x38
mov qword [rsp + 0x70], rax
add rbx, 0x38
mov qword [rbp - 0x68], rbx
add rsi, 0x38
cmp r13, qword [rsp + 0x78]
jge 0x1400dfd47
mov rcx, qword [rbp - 0x80]
jmp 0x1400dfafb
mov ebx, 0x80004005
jmp 0x1400e0050
cmp r14d, r15d
je 0x1400dfd67
dec r14d
movsxd rax, r14d
imul rbx, rax, 0x38
mov rcx, qword [rbp + rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
and qword [rbp + rbx], 0
mov eax, dword [rsp + 0x30]
test eax, eax
jle 0x1400e0018
xor esi, esi
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x1400ee2b6.0]
test eax, eax
je 0x1400dfdeb
imul rax, rsi, 0x38
cmp dword [rbp + rax + 0x14], 1
jne 0x1400dfdeb
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x30]
call qword [case.0x1400ee2b6.0]
mov ebx, eax
mov dword [rsp + 0x38], eax
test eax, eax
js 0x1400e0054
mov rbx, qword [rbp + rsi*8 - 0x48]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x1401d3be0]
sete r9b
xor r8d, r8d
or edx, 0xffffffff
mov rcx, rbx
call fcn.1400e7978
test eax, eax
jne 0x1400dfd3d
nop dword [rax]
mov r15d, dword [rsp + 0x40]
cmp r15d, 0xffffffff
jne 0x1400dfe21
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x30]
call qword [case.0x1400ee2b6.0]
mov ebx, eax
mov dword [rsp + 0x38], eax
test eax, eax
js 0x1400e0054
and dword [rsp + 0x20], 0
or r9d, 0xffffffff
lea rdx, [rbp - 0x48]
mov ecx, r14d
call fcn.1400e7b18
mov r15d, eax
movsxd rax, r15d
mov qword [rsp + 0x78], rax
imul r13, rax, 0x38
mov dword [rbp + r13 + 0x14], 2
and dword [rsp + 0x44], 0
lea rdx, [rbp - 0x18]
add rdx, r13
xor r9d, r9d
lea r8, [rsp + 0x44]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x1400dfe78
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov dword [rsp + 0x38], ebx
test ebx, ebx
jne 0x1400e0054
mov eax, dword [rbp + r13 + 0x10]
cmp dword [rsp + 0x44], eax
jne 0x1400dfd3d
mov ebx, dword [rsp + 0x30]
dec ebx
mov dword [rsp + 0x30], ebx
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x1400ee2b6.0]
test eax, eax
je 0x1400dfeb0
cmp dword [rsp + 0x40], r15d
jne 0x1400e0010
cmp dword [rbp + r13 + 0x14], 2
jne 0x1400e0010
mov r13, qword [rsp + 0x78]
mov rax, qword [rdi]
movsxd rcx, r15d
imul rcx, rcx, 0x38
mov qword [rsp + 0x78], rcx
lea rdx, [rbp - 0x20]
add rdx, rcx
mov r8, qword [rbp - 0x58]
mov rcx, rdi
mov rax, qword [rax + 0x10]
call qword [case.0x1400ee2b6.0]
mov ebx, eax
mov dword [rsp + 0x38], eax
test eax, eax
js 0x1400e0054
imul rbx, r13, 0x38
and dword [rbp + rbx + 0x14], 0
lea rcx, [rsi + 1]
xor esi, esi
movsxd r8, r14d
cmp rcx, r8
cmovne rsi, rcx
mov eax, dword [rsp + 0x40]
inc eax
xor edx, edx
cmp rcx, r8
cmovne edx, eax
mov dword [rsp + 0x40], edx
test r12, r12
je 0x1400dfff7
mov eax, r12d
mov ecx, 0x10000
cmp r12, rcx
cmova eax, ecx
mov ecx, eax
mov dword [rbp + rbx + 0x10], ecx
sub r12, rcx
mov rax, qword [rdi]
mov r8, qword [rsp + 0x48]
mov edx, r15d
mov rcx, rdi
mov rax, qword [rax + 8]
call qword [case.0x1400ee2b6.0]
mov qword [rbp + rbx + 8], rax
mov rcx, qword [rsp + 0x48]
mov qword [rbp + rbx - 0x20], rcx
mov edx, dword [rbp + rbx + 0x10]
add rcx, rdx
mov qword [rsp + 0x48], rcx
mov r8, qword [rbp - 0x78]
mov dword [rbp + rbx - 8], r8d
mov rcx, r8
shr rcx, 0x20
mov dword [rbp + rbx - 4], ecx
add r8, rdx
mov qword [rbp - 0x78], r8
mov rcx, qword [rsp + 0x78]
lea r9, [rbp - 0x18]
add rcx, r9
mov qword [rsp + 0x20], rcx
xor r9d, r9d
mov r8d, edx
mov rdx, rax
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400dffe0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400dfd3d
mov dword [rbp + rbx + 0x14], 1
mov ebx, dword [rsp + 0x30]
inc ebx
mov dword [rsp + 0x30], ebx
mov edx, dword [rsp + 0x40]
jmp 0x1400dfffb
mov dword [rbp + rbx + 0x14], 2
mov rcx, qword [rbp + r13*8 - 0x48]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov edx, dword [rsp + 0x40]
mov ebx, dword [rsp + 0x30]
mov r15d, edx
mov r13, rsi
imul rax, rsi, 0x38
cmp dword [rbp + rax + 0x14], 2
je 0x1400dfec1
test ebx, ebx
jg 0x1400dfd75
mov r13, qword [rsp + 0x48]
test r12, r12
jne 0x1400dfd3d
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x28]
call qword [case.0x1400ee2b6.0]
sub rax, r13
neg rax
sbb eax, eax
mov ebx, 0x80004005
and ebx, eax
nop word [rax + rax]
mov dword [rsp + 0x38], ebx
xor r15d, r15d
movsxd rsi, r14d
test r14d, r14d
jle 0x1400e00b5
lea rdi, [rbp]
mov rbx, qword [rbp - 0x70]
cmp dword [rdi + 0x14], 1
jne 0x1400e0095
and dword [rsp + 0x50], 0
movsxd rax, r15d
imul rcx, rax, 0x38
lea rdx, [rbp - 0x18]
add rdx, rcx
mov r9d, 1
lea r8, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
nop
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400e00a4
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
inc r15d
add rdi, 0x38
sub rsi, 1
jne 0x1400e0067
mov ebx, dword [rsp + 0x38]
mov eax, ebx
mov rcx, qword [rbp + 0xc0]
xor rcx, rsp
call fcn.14012aa20
nop
add rsp, 0x1d8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret