Function at 0x1401770b0
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 rax, qword [0x1403c9cb8]
xor rax, rsp
mov qword [rbp + 0xc0], rax
and qword [r9], 0
xor eax, eax
mov rdi, qword [rbp + 0x140]
mov r14, r8
mov qword [rbp - 0x50], r9
mov rbx, rdx
mov qword [rbp - 0x68], rdx
mov r12, rcx
mov qword [rsp + 0x38], rcx
test r8, r8
je 0x140177795
and dword [rsp + 0x40], eax
mov rcx, rdi
mov dword [rsp + 0x30], eax
xor r15d, r15d
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
call qword [case.0x14002a211.0]
mov rcx, qword [rdi]
mov dword [rsp + 0x58], eax
mov rax, qword [rcx + 0x28]
mov rcx, rdi
call qword [case.0x14002a211.0]
mov rcx, qword [rdi]
mov qword [rsp + 0x50], rax
mov rax, qword [rcx + 0x18]
mov rcx, rdi
call qword [case.0x14002a211.0]
mov edx, 0x10000
test eax, eax
je 0x14017715a
movzx ecx, bx
sub edx, ecx
mov eax, edx
mov ecx, r14d
cmp rax, r14
mov rsi, r14
cmovb ecx, edx
mov eax, ecx
sub rsi, rax
mov dword [rsp + 0x48], ecx
add rsi, 0x1ffff
mov eax, 4
shr rsi, 0x10
mov rcx, rdi
cmp esi, eax
cmovg esi, eax
mov rax, qword [rdi]
mov rax, qword [rax + 0x20]
call qword [case.0x14002a211.0]
test eax, eax
jne 0x1401771a4
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.0x14002a211.0]
mov ebx, eax
test eax, eax
js 0x140177740
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x30]
call qword [case.0x14002a211.0]
mov ebx, eax
test eax, eax
js 0x140177740
xor r12d, r12d
movsxd rax, esi
and qword [rbp - 0x70], r12
xor r13d, r13d
mov qword [rbp - 0x80], rax
test esi, esi
jle 0x140177711
lea rax, [rbp - 4]
mov qword [rsp + 0x78], rax
lea rcx, [rbp - 0x40]
lea rax, [rbp - 8]
mov qword [rbp - 0x58], rcx
mov qword [rsp + 0x70], rax
lea rbx, [rbp + 0x14]
lea rax, [rbp - 0x20]
mov qword [rbp - 0x60], rbx
mov qword [rsp + 0x68], rax
lea rcx, [rbp]
lea rax, [rbp + 8]
mov qword [rbp - 0x78], rcx
mov qword [rsp + 0x60], rax
lea rsi, [rbp + 0x10]
test r14, r14
je 0x140177474
cmp r15d, r13d
jne 0x1401772a8
and dword [rcx + 0x14], 0
mov r9d, 0x1f0003
and qword [rcx], 0
xor r8d, r8d
xor ecx, ecx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateEventExW]
mov rcx, qword [rbp - 0x78]
mov qword [rcx], rax
test rax, rax
jne 0x14017728b
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
jne 0x14017773b
mov rbx, qword [rbp - 0x60]
mov rcx, qword [rbp - 0x78]
mov rdx, qword [rbp - 0x58]
inc r15d
mov rax, qword [rcx]
add rcx, 0x38
mov qword [rbp - 0x78], rcx
mov qword [rdx], rax
add rdx, 8
mov qword [rbp - 0x58], rdx
cmp dword [rsp + 0x58], 0
je 0x1401772be
mov ecx, dword [rsp + 0x48]
and dword [rsp + 0x58], 0
mov eax, ecx
mov dword [rsi], ecx
jmp 0x1401772ce
mov ecx, 0x10000
mov eax, r14d
cmp r14, rcx
cmova eax, ecx
mov dword [rsi], eax
mov r8, qword [rsp + 0x50]
sub r14, rax
mov rax, qword [rdi]
mov edx, r13d
mov rcx, rdi
mov rax, qword [rax + 8]
call qword [case.0x14002a211.0]
mov edx, dword [rsi]
mov r9, qword [rbp - 0x68]
mov r8, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x60]
and dword [rsp + 0x44], 0
mov qword [rcx], rax
mov rcx, qword [rsp + 0x68]
mov qword [rcx], r8
add r8, rdx
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0x50], r8
mov r8, qword [rsp + 0x78]
mov dword [rcx], r9d
mov rcx, r9
shr rcx, 0x20
add r9, rdx
mov dword [r8], ecx
mov r8d, edx
mov qword [rbp - 0x68], r9
mov rdx, rax
lea r9, [rbp - 0x18]
movsxd rcx, r13d
imul rcx, rcx, 0x38
mov qword [rbp - 0x48], rcx
add rcx, r9
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x44]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14017737d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x14017746a
inc dword [rsp + 0x30]
mov dword [rbx], 1
jmp 0x1401773a7
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x14002a211.0]
test eax, eax
je 0x1401773bd
test r12, r12
je 0x1401773bd
mov rcx, qword [rbp + r12*8 - 0x40]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [rbx], 2
mov rax, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x70]
mov r8, qword [rsp + 0x68]
mov r9, qword [rsp + 0x60]
jmp 0x140177425
mov eax, dword [rsi]
cmp dword [rsp + 0x44], eax
jne 0x14017746a
mov rax, qword [rdi]
lea rdx, [rbp - 0x20]
add rdx, qword [rbp - 0x48]
mov rcx, rdi
mov r8, qword [rbp - 0x50]
mov rax, qword [rax + 0x10]
call qword [case.0x14002a211.0]
mov ebx, eax
test eax, eax
js 0x14017773b
mov r9, qword [rsp + 0x60]
dec r13d
mov r8, qword [rsp + 0x68]
sub r9, 0x38
mov rdx, qword [rsp + 0x70]
sub r8, 0x38
mov rax, qword [rsp + 0x78]
sub rdx, 0x38
mov rbx, qword [rbp - 0x60]
sub rax, 0x38
sub rbx, 0x38
dec r12
sub rsi, 0x38
add r9, 0x38
add r8, 0x38
add rdx, 0x38
mov qword [rsp + 0x60], r9
add rax, 0x38
mov qword [rsp + 0x68], r8
add rbx, 0x38
mov qword [rsp + 0x70], rdx
inc r13d
mov qword [rsp + 0x78], rax
inc r12
mov qword [rbp - 0x60], rbx
add rsi, 0x38
cmp r12, qword [rbp - 0x80]
jge 0x140177474
mov rcx, qword [rbp - 0x78]
jmp 0x140177232
mov ebx, 0x80004005
jmp 0x14017773b
cmp r15d, r13d
je 0x140177494
dec r15d
movsxd rax, r15d
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 0x140177711
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x14002a211.0]
mov r13, qword [rbp - 0x70]
test eax, eax
je 0x1401774fe
imul rax, r13, 0x38
cmp dword [rbp + rax + 0x14], 1
jne 0x1401774fe
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x30]
call qword [case.0x14002a211.0]
mov ebx, eax
test eax, eax
js 0x14017773b
mov rcx, qword [rbp + r13*8 - 0x40]
xor r8d, r8d
or edx, 0xffffffff
call fcn.14003f088
test eax, eax
jne 0x14017746a
mov esi, dword [rsp + 0x40]
cmp esi, 0xffffffff
jne 0x140177532
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x30]
call qword [case.0x14002a211.0]
mov ebx, eax
test eax, eax
js 0x14017773b
and dword [rsp + 0x20], 0
lea rdx, [rbp - 0x40]
or r9d, 0xffffffff
xor r8d, r8d
mov ecx, r15d
call fcn.14003efd4
mov esi, eax
mov rcx, qword [rsp + 0x38]
lea rdx, [rbp - 0x18]
and dword [rsp + 0x44], 0
lea r8, [rsp + 0x44]
movsxd rax, esi
xor r9d, r9d
imul r12, rax, 0x38
mov qword [rbp - 0x80], rax
add rdx, r12
mov dword [rbp + r12 + 0x14], 2
call fcn.14004577c
test al, al
jne 0x140177584
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
jne 0x14017773b
mov eax, dword [rbp + r12 + 0x10]
cmp dword [rsp + 0x44], eax
jne 0x14017746a
mov rax, qword [rdi]
mov rcx, rdi
mov ebx, dword [rsp + 0x30]
dec ebx
mov dword [rsp + 0x30], ebx
mov rax, qword [rax + 0x20]
call qword [case.0x14002a211.0]
test eax, eax
je 0x1401775bb
cmp dword [rsp + 0x40], esi
jne 0x14017770a
cmp dword [rbp + r12 + 0x14], 2
jne 0x14017770a
mov r12, qword [rbp - 0x80]
mov r8, qword [rbp - 0x50]
lea rdx, [rbp - 0x20]
movsxd rax, esi
imul rcx, rax, 0x38
mov rax, qword [rdi]
mov qword [rbp - 0x80], rcx
add rdx, rcx
mov rcx, rdi
mov rax, qword [rax + 0x10]
call qword [case.0x14002a211.0]
mov ebx, eax
test eax, eax
js 0x14017773b
inc dword [rsp + 0x40]
inc r13
imul rbx, r12, 0x38
movsxd rax, r15d
mov qword [rbp - 0x70], r13
and dword [rbp + rbx + 0x14], 0
cmp r13, rax
jne 0x140177623
and dword [rsp + 0x40], 0
xor r13d, r13d
mov qword [rbp - 0x70], r13
test r14, r14
je 0x1401776f0
mov r8, qword [rsp + 0x50]
mov ecx, 0x10000
cmp r14, rcx
mov eax, r14d
mov edx, esi
cmova eax, ecx
mov ecx, eax
mov rax, qword [rdi]
sub r14, rcx
mov dword [rbp + rbx + 0x10], ecx
mov rcx, rdi
mov rax, qword [rax + 8]
call qword [case.0x14002a211.0]
mov edx, dword [rbp + rbx + 0x10]
lea r9, [rbp - 0x18]
mov r8, qword [rbp - 0x68]
mov rcx, qword [rsp + 0x50]
mov qword [rbp + rbx - 0x20], rcx
add rcx, rdx
mov qword [rsp + 0x50], rcx
mov rcx, r8
shr rcx, 0x20
mov dword [rbp + rbx - 4], ecx
mov rcx, qword [rbp - 0x80]
add rcx, r9
mov dword [rbp + rbx - 8], r8d
add r8, rdx
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x38]
xor r9d, r9d
mov qword [rbp - 0x68], r8
mov r8d, edx
mov rdx, rax
mov qword [rbp + rbx + 8], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1401776dd
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x14017746a
mov dword [rbp + rbx + 0x14], 1
mov ebx, dword [rsp + 0x30]
inc ebx
mov dword [rsp + 0x30], ebx
jmp 0x1401776f4
mov rcx, qword [rbp + r12*8 - 0x40]
mov dword [rbp + rbx + 0x14], 2
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov ebx, dword [rsp + 0x30]
mov esi, dword [rsp + 0x40]
mov r12, r13
imul rax, r13, 0x38
cmp dword [rbp + rax + 0x14], 2
je 0x1401775cb
test ebx, ebx
jmp 0x14017749a
test r14, r14
jne 0x14017746a
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x28]
call qword [case.0x14002a211.0]
sub rax, qword [rsp + 0x50]
mov ebx, 0x80004005
neg rax
sbb eax, eax
and ebx, eax
mov r12, qword [rsp + 0x38]
xor r14d, r14d
movsxd rsi, r15d
test r15d, r15d
jle 0x140177793
lea rdi, [rbp]
cmp dword [rdi + 0x14], 1
jne 0x140177778
and dword [rsp + 0x48], 0
lea rdx, [rbp - 0x18]
movsxd rax, r14d
lea r8, [rsp + 0x48]
imul rcx, rax, 0x38
mov r9b, 1
add rdx, rcx
mov rcx, r12
call fcn.14004577c
mov rcx, qword [rdi]
test rcx, rcx
je 0x140177786
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc r14d
add rdi, 0x38
sub rsi, 1
jne 0x14017774f
mov eax, ebx
mov rcx, qword [rbp + 0xc0]
xor rcx, rsp
call fcn.14020ed60
add rsp, 0x1d8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret