Function at 0x140016960
Capabilities:
Check if file exists

Disassembly:
push rbp
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x2f0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x268], 0xfffffffffffffffe
mov rsi, rcx
test r8, r8
je 0x140016b01
js 0x140016cca
mov r14, r8
mov rdi, rdx
movzx eax, byte [0x1400461e1]
mov edx, 1
mov rcx, r8
call fcn.140004e90
test rax, rax
je 0x140016ccf
mov qword [rbp + 0x258], rax
mov rcx, rax
mov rdx, rdi
mov r8, r14
call fcn.140033b80
movzx eax, byte [0x1400461e1]
mov edx, 1
mov rcx, r14
call fcn.140004e90
test rax, rax
mov qword [rbp + 0x248], r14
je 0x140016cdc
mov rbx, rax
mov rcx, rax
mov rdx, rdi
mov r8, r14
call fcn.140033b80
mov qword [rbp - 0x58], r14
mov qword [rbp - 0x50], rbx
mov qword [rbp - 0x48], r14
mov byte [rbp - 0x40], 0
lea rdx, str.fatal_runtime_error:_I_O_error:_operation_failed_to_complete_synchronously_n
lea rcx, [rbp - 0x58]
mov r8d, 1
call case.0x140010334.36
mov rax, qword [rbp - 0x58]
mov qword [rbp + 0x250], rax
mov rdx, qword [rbp - 0x50]
mov r8, qword [rbp - 0x48]
mov byte [rbp + 0x266], 1
lea rcx, [rbp + 0x210]
mov qword [rbp + 0x238], rdx
call fcn.140021050
mov rax, qword [rbp + 0x210]
mov r14, qword [rbp + 0x218]
movabs rdi, 0x8000000000000000
cmp rax, rdi
je 0x140016ab3
mov rcx, qword [rbp + 0x220]
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], r14
mov qword [rbp - 0x48], rcx
mov byte [rbp + 0x266], 1
lea rcx, [rbp + 0x1f8]
lea rdx, [rbp - 0x58]
mov r8b, 1
call fcn.140019280
mov r15, qword [rbp + 0x1f8]
mov r14, qword [rbp + 0x200]
cmp r15, rdi
jne 0x140016b2a
mov qword [rsi], r14
mov dword [rsi + 0x10], 2
mov dil, 1
mov rbx, qword [rbp + 0x248]
mov rdx, qword [rbp + 0x250]
test rdx, rdx
je 0x140016ae5
mov r8d, 1
mov rcx, qword [rbp + 0x238]
call fcn.140004ea0
test dil, dil
je 0x140016b15
mov r8d, 1
mov rcx, qword [rbp + 0x258]
mov rdx, rbx
call fcn.140004ea0
jmp 0x140016b15
movabs rax, 0x300000002
mov qword [rsi], rax
mov dword [rsi + 0x10], 2
mov rax, rsi
add rsp, 0x2f0
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
ret
lea rdi, [rbp - 0x58]
mov r8d, 0x250
mov rcx, rdi
xor edx, edx
call fcn.140034300
mov rcx, r14
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x140016c0d
movzx eax, byte [0x1400461e1]
mov ecx, 0x30
mov edx, 8
call fcn.140004e90
test rax, rax
mov rbx, qword [rbp + 0x248]
je 0x140016cf2
mov rdi, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], rbx
mov rax, qword [rbp + 0x258]
mov qword [rdi + 0x18], rax
mov qword [rdi + 0x20], rbx
mov byte [rdi + 0x28], 0
lea rcx, [rsi + 0x14]
lea rdx, [rbp - 0x58]
mov r8d, 0x250
call fcn.140033b80
mov qword [rsi], rdi
mov qword [rsi + 8], r12
mov dword [rsi + 0x10], 1
test r15, r15
je 0x140016be0
add r15, r15
mov r8d, 2
mov rcx, r14
mov rdx, r15
call fcn.140004ea0
mov rdx, qword [rbp + 0x250]
test rdx, rdx
je 0x140016bfe
mov r8d, 1
mov rcx, qword [rbp + 0x238]
call fcn.140004ea0
cmp r12, 0xffffffffffffffff
jne 0x140016b15
jmp 0x140016aea
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov rbx, qword [rbp + 0x248]
jne 0x140016caa
movzx eax, byte [0x1400461e1]
mov ecx, 0x30
mov edx, 8
call fcn.140004e90
test rax, rax
je 0x140016d18
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], rbx
mov rcx, qword [rbp + 0x258]
mov qword [rax + 0x18], rcx
mov qword [rax + 0x20], rbx
mov byte [rax + 0x28], 0
mov qword [rsi], rax
mov qword [rsi + 8], 0xffffffffffffffff
mov dword [rsi + 0x10], 0
test r15, r15
je 0x140016c93
add r15, r15
mov r8d, 2
mov rcx, r14
mov rdx, r15
call fcn.140004ea0
xor edi, edi
mov rdx, qword [rbp + 0x250]
test rdx, rdx
jne 0x140016ad3
jmp 0x140016ae5
shl rax, 0x20
or rax, 2
mov qword [rsi], rax
mov dword [rsi + 0x10], 2
test r15, r15
jne 0x140016bcc
jmp 0x140016be0
call fcn.14002a380
mov ecx, 1
mov rdx, r14
call fcn.140035290
mov byte [rbp + 0x267], 1
mov ecx, 1
mov rdx, r14
call fcn.140035290
jmp 0x140016d35
mov qword [rbp + 0x228], r12
mov qword [rbp + 0x240], r15
mov qword [rbp + 0x230], r14
mov ecx, 8
mov edx, 0x30
call fcn.140035290
jmp 0x140016d35
mov qword [rbp + 0x240], r15
mov qword [rbp + 0x230], r14
mov ecx, 8
mov edx, 0x30
call fcn.140035290
ud2