Function at 0x40a8d3
Capabilities:
Check if file exists

Disassembly:
push ebp
sub esp, 0x54
mov eax, 0x42a888
call fcn.00427a54
sub esp, 0x38
mov eax, dword [ebp + 0x64]
push ebx
push esi
mov esi, ecx
lea ecx, [ebp]
push edi
mov dword [ebp + 0x54], esi
mov byte [eax], 1
call fcn.00403cc3
lea ecx, [ebp + 0x28]
call fcn.0040227e
mov edi, dword [ebp + 0x60]
lea ecx, [ebp]
xor ebx, ebx
push ebx
mov dword [ebp - 4], ebx
push dword [edi]
call fcn.00403eb5
test al, al
je 0x40ab2f
cmp dword [esi + 0x64], 2
je 0x40abb1
cmp dword [esi + 0x64], ebx
jne 0x40aa0d
mov ecx, edi
call fcn.00402a8d
inc eax
mov ecx, edi
push eax
lea eax, [ebp + 0x38]
push eax
call fcn.00408ad0
lea ecx, [ebp + 0x28]
mov byte [ebp - 4], 1
push ecx
mov edx, eax
lea ecx, [ebp + 0x48]
call fcn.0040242e
push dword [ebp + 0x38]
mov byte [ebp - 4], 3
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
mov edi, dword [ebp + 0x54]
lea eax, [ebp + 0x44]
pop ecx
push eax
mov eax, dword [ebp + 0x54]
xor ecx, ecx
mov esi, dword [esi + 0x34]
add eax, 0xd0
cmp byte [edi + 0xd8], cl
cmovne ecx, eax
mov eax, edi
mov edx, dword [esi]
add eax, 0xb8
push ecx
xor ecx, ecx
cmp byte [edi + 0xc6], cl
cmovne ecx, eax
mov eax, edi
push ecx
push dword [eax + 0x6c]
lea eax, [ebp]
push eax
lea eax, [ebp + 0x18]
push eax
push dword [ebp + 0x48]
push esi
call dword [edx + 0x14]
mov edi, dword [ebp + 0x60]
test eax, eax
je 0x40a9a0
mov ebx, eax
jmp 0x40a9e4
mov eax, dword [ebp + 0x44]
sub eax, ebx
je 0x40a9fe
sub eax, 1
je 0x40a9f2
sub eax, 1
je 0x40a9e4
sub eax, 1
je 0x40a9da
sub eax, 1
je 0x40a9ce
sub eax, 1
je 0x40a9c7
mov ebx, 0x80004005
jmp 0x40a9e4
mov ebx, 0x80004004
jmp 0x40a9e4
mov esi, dword [ebp + 0x54]
mov dword [esi + 0x64], 3
jmp 0x40aa01
mov eax, dword [ebp + 0x54]
mov dword [eax + 0x64], 2
push dword [ebp + 0x48]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
jmp 0x40abb1
mov esi, dword [ebp + 0x54]
mov dword [esi + 0x64], 1
jmp 0x40aa01
mov esi, dword [ebp + 0x54]
push dword [ebp + 0x48]
mov byte [ebp - 4], bl
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
cmp dword [esi + 0x64], 3
jne 0x40aa4b
mov ecx, edi
call fcn.0040679c
test al, al
jne 0x40aa3f
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.0040c2e7
mov ebx, eax
test ebx, ebx
jne 0x40abb1
mov ebx, 0x80004005
jmp 0x40abb1
mov byte [esi + 0x174], 1
jmp 0x40abac
cmp dword [esi + 0x64], 4
jne 0x40aac7
push edi
lea ecx, [ebp + 0x48]
call fcn.004021bd
lea ecx, [ebp + 0x48]
mov byte [ebp - 4], 4
call fcn.0040679c
test al, al
jne 0x40aa86
push edi
push str.Cannot_create_file_with_auto_name
mov ecx, esi
call fcn.0040c2e7
test eax, eax
mov ebx, 0x80004005
cmovne ebx, eax
jmp 0x40a9e4
mov edx, dword [ebp + 0x48]
mov ecx, dword [edi]
call fcn.00403bb0
test al, al
jne 0x40aaba
call fcn.00404715
push edi
lea ecx, [ebp + 0x48]
push ecx
push str.Cannot_rename_existing_file
push eax
mov ecx, esi
call fcn.0040c23b
mov ebx, eax
test ebx, ebx
jne 0x40a9e4
jmp 0x40a9c0
push dword [ebp + 0x48]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
jmp 0x40abab
mov eax, dword [ebp + 0x20]
mov ecx, dword [edi]
shr eax, 4
test al, 1
je 0x40aae8
call fcn.00403bbe
test al, al
jne 0x40abac
push edi
push str.Cannot_delete_output_folder
jmp 0x40ab19
call fcn.00403db2
test al, al
je 0x40abac
mov ecx, dword [edi]
call fcn.00403adb
test al, al
jne 0x40abac
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40abac
push edi
push str.Cannot_delete_output_file
mov ecx, esi
call fcn.0040c348
test eax, eax
je 0x40abb1
mov ebx, eax
jmp 0x40abb1
mov ecx, dword [edi]
call fcn.00404b63
mov esi, eax
test esi, esi
js 0x40abac
mov ecx, dword [edi]
cmp word [ecx + esi*2 + 2], bx
je 0x40abac
push edi
lea ecx, [ebp + 0x48]
call fcn.004021bd
mov byte [ebp - 4], 5
cmp esi, dword [ebp + 0x4c]
jae 0x40ab63
mov eax, dword [ebp + 0x48]
xor ecx, ecx
mov dword [ebp + 0x4c], esi
mov word [eax + esi*2], cx
lea ecx, [ebp - 0x44]
call fcn.00403cc3
lea ecx, [ebp - 0x1c]
call fcn.0040227e
push ebx
push dword [ebp + 0x48]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 6
call fcn.00403eb5
test al, al
je 0x40ab9a
mov edx, dword [ebp - 0x24]
test dl, 1
je 0x40ab9a
mov ecx, dword [ebp + 0x48]
and edx, 0xfffffffe
call fcn.00403c14
push dword [ebp - 0x1c]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
push dword [ebp + 0x48]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
pop ecx
mov eax, dword [ebp + 0x64]
mov byte [eax], bl
push dword [ebp + 0x28]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x58]
pop ebp
ret 8