Function at 0x1400163dc
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.140007f7c
lea rcx, [rbp - 1]
call fcn.140002a00
nop
xor r8d, r8d
mov rdx, qword [rdi]
lea rcx, [rbp - 0x29]
call fcn.140008258
test al, al
je 0x140016676
cmp dword [rsi + 0x68], 2
je 0x1400166ff
cmp dword [rsi + 0x68], ebx
jne 0x140016541
mov rcx, rdi
call fcn.140003ea4
lea edx, [rax + 1]
mov r8, rdi
lea rcx, [rbp - 0x39]
call fcn.140002728
nop
lea r8, [rbp - 1]
lea rdx, [rbp - 0x39]
lea rcx, [rbp - 0x49]
call fcn.140002d48
nop
mov rcx, qword [rbp - 0x39]
call fcn.14005af1c
mov rax, qword [rbp - 0x11]
mov qword [rbp + 0x77], rax
mov r10, qword [rsi + 0x78]
mov r11, qword [r10]
mov al, byte [rsi + 0x5b]
lea rcx, [rsi + 0x160]
neg al
sbb r9, r9
and r9, rcx
mov al, byte [rsi + 0x153]
lea rdx, [rsi + 0x148]
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 + 0xc8]
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 0x1400164e5
mov ebx, eax
jmp 0x140016523
mov ecx, dword [rbp + 0x6f]
test ecx, ecx
je 0x140016538
sub ecx, 1
je 0x140016531
sub ecx, 1
je 0x140016523
sub ecx, 1
je 0x14001651c
sub ecx, 1
je 0x140016513
cmp ecx, 1
je 0x14001650c
mov ebx, 0x80004005
jmp 0x140016523
mov ebx, 0x80004004
jmp 0x140016523
mov dword [rsi + 0x68], 3
jmp 0x140016538
mov dword [rsi + 0x68], 2
mov rcx, qword [rbp - 0x49]
call fcn.14005af1c
jmp 0x1400166ff
mov dword [rsi + 0x68], 1
mov rcx, qword [rbp - 0x49]
call fcn.14005af1c
cmp dword [rsi + 0x68], 3
jne 0x140016586
mov rcx, rdi
call fcn.14000ed00
test al, al
jne 0x14001657a
mov r8, rdi
lea rdx, str.Cannot_create_file_with_auto_name
mov rcx, rsi
call fcn.140019900
test eax, eax
je 0x140016570
mov ebx, eax
jmp 0x1400166ff
mov ebx, 0x80004005
jmp 0x1400166ff
mov byte [rsi + 0x298], 1
jmp 0x1400166fc
cmp dword [rsi + 0x68], 4
jne 0x140016608
mov rdx, rdi
lea rcx, [rbp - 0x49]
call fcn.140002860
nop
lea rcx, [rbp - 0x49]
call fcn.14000ed00
test al, al
jne 0x1400165c4
mov r8, rdi
lea rdx, str.Cannot_create_file_with_auto_name
mov rcx, rsi
call fcn.140019900
mov ebx, 0x80004005
test eax, eax
cmovne ebx, eax
jmp 0x1400165fe
mov rdx, qword [rbp - 0x49]
mov rcx, qword [rdi]
call fcn.1400079e8
test al, al
jne 0x140016603
call fcn.14000930c
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x49]
lea r8, str.Cannot_rename_existing_file
mov edx, eax
mov rcx, rsi
call fcn.140019834
test eax, eax
mov ebx, eax
jne 0x1400165fe
mov ebx, 0x80004005
jmp 0x140016523
jmp 0x1400166f3
mov eax, dword [rbp - 9]
shr eax, 4
mov rcx, qword [rdi]
test al, 1
je 0x14001662b
call fcn.140007b08
test al, al
jne 0x1400166fc
lea rdx, str.Cannot_delete_output_folder
jmp 0x14001665e
call fcn.1400080cc
test al, al
je 0x1400166fc
mov rcx, qword [rdi]
call fcn.1400075d4
test al, al
jne 0x1400166fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1400166fc
lea rdx, str.Cannot_delete_output_file
mov r8, rdi
mov rcx, rsi
call fcn.140019964
test eax, eax
je 0x1400166ff
jmp 0x140016569
mov rcx, qword [rdi]
call fcn.14000a290
mov esi, eax
test eax, eax
js 0x1400166fc
lea edx, [rsi + 1]
mov rcx, qword [rdi]
cmp word [rcx + rdx*2], bx
je 0x1400166fc
mov rdx, rdi
lea rcx, [rbp - 0x49]
call fcn.140002860
nop
cmp esi, dword [rbp - 0x41]
jae 0x1400166ad
mov dword [rbp - 0x41], esi
mov rax, qword [rbp - 0x49]
mov word [rax + rsi*2], bx
lea rcx, [rbp + 0xf]
call fcn.140007f7c
lea rcx, [rbp + 0x37]
call fcn.140002a00
nop
xor r8d, r8d
mov rdx, qword [rbp - 0x49]
lea rcx, [rbp + 0xf]
call fcn.140008258
test al, al
je 0x1400166e9
mov edx, dword [rbp + 0x2f]
test dl, 1
je 0x1400166e9
and edx, 0xfffffffe
mov rcx, qword [rbp - 0x49]
call fcn.140007ec8
nop
mov rcx, qword [rbp + 0x37]
call fcn.14005af1c
nop
mov rcx, qword [rbp - 0x49]
call fcn.14005af1c
mov byte [r14], bl
mov rcx, qword [rbp - 1]
call fcn.14005af1c
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