Function at 0x411954
Capabilities:
Check if file exists

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0xe0
mov qword [rsp + 0x98], 0xfffffffffffffffe
mov rbp, r8
mov rdi, rdx
mov rsi, rcx
mov byte [r8], 1
lea rcx, [rsp + 0x60]
call fcn.004068d4
lea rcx, [rsp + 0x88]
call fcn.00402700
nop
xor r8d, r8d
mov rdx, qword [rdi]
lea rcx, [rsp + 0x60]
call fcn.00407028
xor ebx, ebx
cmp al, bl
je 0x411cd5
mov eax, dword [rsi + 0xa4]
cmp eax, 2
jne 0x4119bd
jmp 0x411cc1
cmp eax, ebx
jne 0x411b23
mov rcx, rdi
call fcn.00402cdc
lea r8d, [rax + 1]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call fcn.0041061c
nop
lea r8, [rsp + 0x88]
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.0040263c
nop
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_free
mov r11, qword [rsp + 0x78]
mov qword [rsp + 0x120], r11
mov rcx, qword [rsi + 0x58]
mov r10, qword [rsi + 0xc8]
mov r11, qword [rcx]
mov al, byte [rsi + 0x178]
lea rdx, [rsi + 0x170]
neg al
sbb r9, r9
and r9, rdx
mov al, byte [rsi + 0x15b]
lea rdx, [rsi + 0x150]
neg al
sbb r8, r8
and r8, rdx
lea rax, [rsp + 0x118]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r9
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x20], r10
lea r9, [rsp + 0x60]
lea r8, [rsp + 0x120]
mov rdx, qword [rsp + 0x40]
call qword [r11 + 0x28]
mov r12d, eax
cmp eax, ebx
je 0x411a90
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_free
nop
mov ebx, r12d
jmp 0x411cc1
mov ecx, dword [rsp + 0x118]
cmp ecx, ebx
je 0x411b19
dec ecx
je 0x411b0f
dec ecx
je 0x411aff
dec ecx
je 0x411ae5
dec ecx
je 0x411ad9
dec ecx
je 0x411ac4
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_free
nop
mov ebx, 0x80004005
jmp 0x411cc1
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_free
nop
mov ebx, 0x80004004
jmp 0x411cc1
mov dword [rsi + 0xa4], 3
jmp 0x411b19
mov dword [rsi + 0xa4], 2
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_free
nop
jmp 0x411cc1
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_free
nop
jmp 0x411cc1
mov dword [rsi + 0xa4], 1
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_free
mov eax, dword [rsi + 0xa4]
cmp eax, 3
jne 0x411b6d
mov rcx, rdi
call fcn.0040dfcc
cmp al, bl
jne 0x411b61
mov r8, rdi
lea rdx, str.Cannot_create_file_with_auto_name
mov rcx, rsi
call fcn.004114c8
cmp eax, ebx
je 0x411b57
mov ebx, eax
jmp 0x411cc1
mov ebx, 0x80004005
jmp 0x411cc1
mov byte [rsi + 0x2c0], 1
jmp 0x411d7f
cmp eax, 4
jne 0x411c3e
mov rdx, rdi
lea rcx, [rsp + 0x50]
call fcn.0040288c
nop
lea rcx, [rsp + 0x50]
call fcn.0040dfcc
cmp al, bl
jne 0x411bd1
mov r8, rdi
lea rdx, str.Cannot_create_file_with_auto_name
mov rcx, rsi
call fcn.004114c8
mov edi, eax
cmp eax, ebx
je 0x411bbc
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_free
nop
mov ebx, edi
jmp 0x411cc1
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_free
nop
mov ebx, 0x80004005
jmp 0x411cc1
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rdi]
call fcn.00405898
cmp al, bl
jne 0x411c2f
call fcn.00407d1c
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x50]
lea r8, str.Cannot_rename_existing_file
mov edx, eax
mov rcx, rsi
call fcn.00411648
mov edi, eax
cmp eax, ebx
je 0x411c1a
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_free
nop
mov ebx, edi
jmp 0x411cc1
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_free
nop
mov ebx, 0x80004005
jmp 0x411cc1
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_free
jmp 0x411d7f
mov eax, dword [rsp + 0x80]
shr eax, 4
test al, 1
je 0x411c78
mov rcx, qword [rdi]
call fcn.004057f0
cmp al, bl
jne 0x411d7f
mov r8, rdi
lea rdx, str.Cannot_delete_output_folder
mov rcx, rsi
call fcn.00411550
cmp eax, ebx
je 0x411c76
mov ebx, eax
jmp 0x411cc1
jmp 0x411cc1
mov rcx, qword [rdi]
call fcn.004078a0
cmp al, bl
je 0x411d7f
mov rcx, qword [rdi]
call fcn.00405bdc
cmp al, bl
jne 0x411d7f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x411d7f
mov r8, rdi
lea rdx, str.Cannot_delete_output_file
mov rcx, rsi
call fcn.00411550
cmp eax, ebx
je 0x411cc1
mov ebx, eax
jmp 0x411cc1
mov rcx, qword [rsp + 0x88]
call sub.msvcrt.dll_free
mov eax, ebx
jmp 0x411d91
mov rcx, qword [rdi]
call fcn.0040982c
mov esi, eax
cmp eax, ebx
jl 0x411d7f
mov r8, qword [rdi]
lea ecx, [rsi + 1]
cmp word [r8 + rcx*2], bx
je 0x411d7f
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.0040288c
nop
cmp esi, dword [rsp + 0x48]
jae 0x411d19
mov dword [rsp + 0x48], esi
mov rax, qword [rsp + 0x40]
mov word [rax + rsi*2], bx
lea rcx, [rsp + 0xa0]
call fcn.004068d4
lea rcx, [rsp + 0xc8]
call fcn.00402700
nop
xor r8d, r8d
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0xa0]
call fcn.00407028
cmp al, bl
je 0x411d67
mov edx, dword [rsp + 0xc0]
test dl, 1
je 0x411d67
and edx, 0xfffffffe
mov rcx, qword [rsp + 0x40]
call fcn.00405734
nop
mov rcx, qword [rsp + 0xc8]
call sub.msvcrt.dll_free
nop
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_free
mov byte [rbp], bl
mov rcx, qword [rsp + 0x88]
call sub.msvcrt.dll_free
xor eax, eax
add rsp, 0xe0
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret