Function at 0x14000aa7c
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.140004dcc
lea rcx, [rbp - 1]
call fcn.1400027fc
nop
xor r8d, r8d
mov rdx, qword [rdi]
lea rcx, [rbp - 0x29]
call fcn.140005020
test al, al
je 0x14000ad19
cmp dword [rsi + 0x60], 2
je 0x14000ada2
cmp dword [rsi + 0x60], ebx
jne 0x14000abe4
mov rcx, rdi
call fcn.1400034a4
lea edx, [rax + 1]
mov r8, rdi
lea rcx, [rbp - 0x39]
call fcn.1400025f4
nop
lea r8, [rbp - 1]
lea rdx, [rbp - 0x39]
lea rcx, [rbp - 0x49]
call fcn.140002a5c
nop
mov rcx, qword [rbp - 0x39]
call fcn.1400372fc
mov rax, qword [rbp - 0x11]
mov qword [rbp + 0x77], rax
mov r11, qword [rsi + 0x70]
mov rax, qword [r11]
mov r10, qword [rax + 0x28]
mov al, byte [rsi + 0x55]
lea rcx, [rsi + 0x118]
neg al
sbb r9, r9
and r9, rcx
mov al, byte [rsi + 0x10b]
lea rdx, [rsi + 0x100]
neg al
sbb r8, r8
and r8, rdx
mov rax, qword [rsi + 0xa8]
lea rcx, [rbp + 0x6f]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], r9
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x29]
lea r8, [rbp + 0x77]
mov rdx, qword [rbp - 0x49]
mov rcx, r11
call r10
test eax, eax
je 0x14000ab88
mov ebx, eax
jmp 0x14000abc6
mov ecx, dword [rbp + 0x6f]
test ecx, ecx
je 0x14000abdb
sub ecx, 1
je 0x14000abd4
sub ecx, 1
je 0x14000abc6
sub ecx, 1
je 0x14000abbf
sub ecx, 1
je 0x14000abb6
cmp ecx, 1
je 0x14000abaf
mov ebx, 0x80004005
jmp 0x14000abc6
mov ebx, 0x80004004
jmp 0x14000abc6
mov dword [rsi + 0x60], 3
jmp 0x14000abdb
mov dword [rsi + 0x60], 2
mov rcx, qword [rbp - 0x49]
call fcn.1400372fc
jmp 0x14000ada2
mov dword [rsi + 0x60], 1
mov rcx, qword [rbp - 0x49]
call fcn.1400372fc
cmp dword [rsi + 0x60], 3
jne 0x14000ac29
mov rcx, rdi
call fcn.140008274
test al, al
jne 0x14000ac1d
mov r8, rdi
lea rdx, str.Cannot_create_file_with_auto_name
mov rcx, rsi
call fcn.14000c52c
test eax, eax
je 0x14000ac13
mov ebx, eax
jmp 0x14000ada2
mov ebx, 0x80004005
jmp 0x14000ada2
mov byte [rsi + 0x1f0], 1
jmp 0x14000ad9f
cmp dword [rsi + 0x60], 4
jne 0x14000acab
mov rdx, rdi
lea rcx, [rbp - 0x49]
call fcn.1400026bc
nop
lea rcx, [rbp - 0x49]
call fcn.140008274
test al, al
jne 0x14000ac67
mov r8, rdi
lea rdx, str.Cannot_create_file_with_auto_name
mov rcx, rsi
call fcn.14000c52c
mov ebx, 0x80004005
test eax, eax
cmovne ebx, eax
jmp 0x14000aca1
mov rdx, qword [rbp - 0x49]
mov rcx, qword [rdi]
call fcn.140004cd4
test al, al
jne 0x14000aca6
call fcn.140005aa0
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x49]
lea r8, str.Cannot_rename_existing_file
mov edx, eax
mov rcx, rsi
call fcn.14000c460
test eax, eax
mov ebx, eax
jne 0x14000aca1
mov ebx, 0x80004005
jmp 0x14000abc6
jmp 0x14000ad96
mov eax, dword [rbp - 9]
shr eax, 4
mov rcx, qword [rdi]
test al, 1
je 0x14000acce
call fcn.140004ce8
test al, al
jne 0x14000ad9f
lea rdx, str.Cannot_delete_output_folder
jmp 0x14000ad01
call fcn.140004e94
test al, al
je 0x14000ad9f
mov rcx, qword [rdi]
call fcn.140004aac
test al, al
jne 0x14000ad9f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14000ad9f
lea rdx, str.Cannot_delete_output_file
mov r8, rdi
mov rcx, rsi
call fcn.14000c63c
test eax, eax
je 0x14000ada2
jmp 0x14000ac0c
mov rcx, qword [rdi]
call fcn.140005ed0
mov esi, eax
test eax, eax
js 0x14000ad9f
lea edx, [rsi + 1]
mov rcx, qword [rdi]
cmp word [rcx + rdx*2], bx
je 0x14000ad9f
mov rdx, rdi
lea rcx, [rbp - 0x49]
call fcn.1400026bc
nop
cmp esi, dword [rbp - 0x41]
jae 0x14000ad50
mov dword [rbp - 0x41], esi
mov rax, qword [rbp - 0x49]
mov word [rax + rsi*2], bx
lea rcx, [rbp + 0xf]
call fcn.140004dcc
lea rcx, [rbp + 0x37]
call fcn.1400027fc
nop
xor r8d, r8d
mov rdx, qword [rbp - 0x49]
lea rcx, [rbp + 0xf]
call fcn.140005020
test al, al
je 0x14000ad8c
mov edx, dword [rbp + 0x2f]
test dl, 1
je 0x14000ad8c
and edx, 0xfffffffe
mov rcx, qword [rbp - 0x49]
call fcn.140004d88
nop
mov rcx, qword [rbp + 0x37]
call fcn.1400372fc
nop
mov rcx, qword [rbp - 0x49]
call fcn.1400372fc
mov byte [r14], bl
mov rcx, qword [rbp - 1]
call fcn.1400372fc
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