Function at 0x140016644
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x47]
sub rsp, 0xd0
mov r14, r8
mov rdi, rdx
mov rsi, rcx
xor ebx, ebx
mov byte [r8], 1
lea rcx, [rbp - 0x29]
call fcn.140008084
lea rcx, [rbp - 1]
call fcn.1400029b0
nop
xor r8d, r8d
mov rdx, qword [rdi]
lea rcx, [rbp - 0x29]
call fcn.140008360
test al, al
je 0x1400168e1
cmp dword [rsi + 0x78], 2
je 0x14001696a
cmp dword [rsi + 0x78], ebx
jne 0x1400167ac
mov rcx, rdi
call fcn.140003f6c
lea edx, [rax + 1]
mov r8, rdi
lea rcx, [rbp - 0x39]
call fcn.1400026d8
nop
lea r8, [rbp - 1]
lea rdx, [rbp - 0x39]
lea rcx, [rbp - 0x49]
call fcn.140002cf8
nop
mov rcx, qword [rbp - 0x39]
call fcn.14005bd4c
mov rax, qword [rbp - 0x11]
mov qword [rbp + 0x77], rax
mov r10, qword [rsi + 0x88]
mov r11, qword [r10]
mov al, byte [rsi + 0x6d]
lea rcx, [rsi + 0x178]
neg al
sbb r9, r9
and r9, rcx
mov al, byte [rsi + 0x16b]
lea rdx, [rsi + 0x160]
neg al
sbb r8, r8
and r8, rdx
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r9
mov qword [rsp + 0x28], r8
mov rax, qword [rsi + 0xe0]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x29]
lea r8, [rbp + 0x77]
mov rdx, qword [rbp - 0x49]
mov rcx, r10
call qword [r11 + 0x28]
test eax, eax
je 0x140016750
mov ebx, eax
jmp 0x14001678e
mov ecx, dword [rbp + 0x6f]
test ecx, ecx
je 0x1400167a3
sub ecx, 1
je 0x14001679c
sub ecx, 1
je 0x14001678e
sub ecx, 1
je 0x140016787
sub ecx, 1
je 0x14001677e
cmp ecx, 1
je 0x140016777
mov ebx, 0x80004005
jmp 0x14001678e
mov ebx, 0x80004004
jmp 0x14001678e
mov dword [rsi + 0x78], 3
jmp 0x1400167a3
mov dword [rsi + 0x78], 2
mov rcx, qword [rbp - 0x49]
call fcn.14005bd4c
jmp 0x14001696a
mov dword [rsi + 0x78], 1
mov rcx, qword [rbp - 0x49]
call fcn.14005bd4c
cmp dword [rsi + 0x78], 3
jne 0x1400167f1
mov rcx, rdi
call fcn.14000ede0
test al, al
jne 0x1400167e5
mov r8, rdi
lea rdx, str.Cannot_create_file_with_auto_name
mov rcx, rsi
call fcn.140019c68
test eax, eax
je 0x1400167db
mov ebx, eax
jmp 0x14001696a
mov ebx, 0x80004005
jmp 0x14001696a
mov byte [rsi + 0x2b0], 1
jmp 0x140016967
cmp dword [rsi + 0x78], 4
jne 0x140016873
mov rdx, rdi
lea rcx, [rbp - 0x49]
call fcn.140002810
nop
lea rcx, [rbp - 0x49]
call fcn.14000ede0
test al, al
jne 0x14001682f
mov r8, rdi
lea rdx, str.Cannot_create_file_with_auto_name
mov rcx, rsi
call fcn.140019c68
mov ebx, 0x80004005
test eax, eax
cmovne ebx, eax
jmp 0x140016869
mov rdx, qword [rbp - 0x49]
mov rcx, qword [rdi]
call fcn.140007af0
test al, al
jne 0x14001686e
call fcn.140009448
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x49]
lea r8, str.Cannot_rename_existing_file
mov edx, eax
mov rcx, rsi
call fcn.140019b98
test eax, eax
mov ebx, eax
jne 0x140016869
mov ebx, 0x80004005
jmp 0x14001678e
jmp 0x14001695e
mov eax, dword [rbp - 9]
shr eax, 4
mov rcx, qword [rdi]
test al, 1
je 0x140016896
call fcn.140007c10
test al, al
jne 0x140016967
lea rdx, str.Cannot_delete_output_folder
jmp 0x1400168c9
call fcn.1400081d4
test al, al
je 0x140016967
mov rcx, qword [rdi]
call fcn.1400076fc
test al, al
jne 0x140016967
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x140016967
lea rdx, str.Cannot_delete_output_file
mov r8, rdi
mov rcx, rsi
call fcn.140019d7c
test eax, eax
je 0x14001696a
jmp 0x1400167d4
mov rcx, qword [rdi]
call fcn.14000a3dc
mov esi, eax
test eax, eax
js 0x140016967
lea edx, [rsi + 1]
mov rcx, qword [rdi]
cmp word [rcx + rdx*2], bx
je 0x140016967
mov rdx, rdi
lea rcx, [rbp - 0x49]
call fcn.140002810
nop
cmp esi, dword [rbp - 0x41]
jae 0x140016918
mov dword [rbp - 0x41], esi
mov rax, qword [rbp - 0x49]
mov word [rax + rsi*2], bx
lea rcx, [rbp + 0xf]
call fcn.140008084
lea rcx, [rbp + 0x37]
call fcn.1400029b0
nop
xor r8d, r8d
mov rdx, qword [rbp - 0x49]
lea rcx, [rbp + 0xf]
call fcn.140008360
test al, al
je 0x140016954
mov edx, dword [rbp + 0x2f]
test dl, 1
je 0x140016954
and edx, 0xfffffffe
mov rcx, qword [rbp - 0x49]
call fcn.140007fd0
nop
mov rcx, qword [rbp + 0x37]
call fcn.14005bd4c
nop
mov rcx, qword [rbp - 0x49]
call fcn.14005bd4c
mov byte [r14], bl
mov rcx, qword [rbp - 1]
call fcn.14005bd4c
mov eax, ebx
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret