Function at 0x40ad8d
Capabilities:
Check if file exists

Disassembly:
push 0x2a0
mov eax, 0x4909a5
call fcn.004543f8
xor eax, eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], al
sub esp, 0x18
xor ebx, ebx
mov ecx, esp
inc ebx
mov byte [ebp - 4], bl
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
lea eax, [ebp + 8]
push eax
call fcn.00402efd
call fcn.004040fd
add esp, 0x18
sub esp, 0x18
mov ecx, esp
test al, al
je 0x40adef
mov dword [ebp - 0x2ac], esp
push str.The_path_for_the_directory_to_check_was_empty_
call fcn.00402d51
mov byte [ebp - 4], 2
jmp 0x40ae55
lea eax, [ebp + 8]
xor edi, edi
push eax
mov dword [ecx + 0x10], edi
mov dword [ecx + 0x14], edi
call fcn.00402efd
lea ecx, [ebp - 0x40]
call fcn.004049c3
add esp, 0x18
lea ecx, [ebp - 0x28]
push eax
call fcn.00402d04
lea ecx, [ebp - 0x40]
call fcn.00402dd0
sub esp, 0x18
lea eax, [ebp - 0x28]
mov ecx, esp
push eax
mov dword [ecx + 0x10], edi
mov dword [ecx + 0x14], edi
call fcn.00402efd
call fcn.004040fd
add esp, 0x18
test al, al
je 0x40ae69
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x2ac], esp
push str.The_path_for_the_directory_to_check_was_empty_after_fixing_the_slashes_for_this_OS__
call fcn.00402d51
mov byte [ebp - 4], 3
call fcn.0040d33a
mov ecx, eax
mov byte [ebp - 4], bl
call fcn.0040d682
jmp 0x40afbc
cmp dword [ebp - 0x14], 0x10
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x40]
cmovae edx, dword [ebp - 0x28]
call fcn.00404d1d
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x2a8]
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea ecx, [ebp - 0x40]
mov esi, eax
call fcn.00402da2
cmp esi, 0xffffffff
je 0x40af22
test byte [ebp - 0x2a8], 0x10
jbe 0x40aeff
lea eax, [ebp - 0x28]
mov edx, str.The_path_
push eax
lea ecx, [ebp - 0x58]
call fcn.00402f8e
sub esp, 0x14
mov byte [ebp - 4], 4
mov ecx, esp
mov dword [ebp - 0x2ac], esp
mov edx, eax
push str._exists.
call fcn.00403020
pop ecx
mov byte [ebp - 4], 5
call fcn.0040d33a
mov ecx, eax
mov byte [ebp - 4], 4
call fcn.0040d4dc
lea ecx, [ebp - 0x58]
call fcn.00402dd0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x40af08
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, edi
lea ecx, [ebp - 0x28]
call fcn.00402dd0
lea ecx, [ebp + 8]
call fcn.00402dd0
mov eax, ebx
call fcn.004543a2
ret 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x40af06
cmp esi, 3
je 0x40af06
mov edx, esi
lea ecx, [ebp - 0x58]
call fcn.004040ab
sub esp, 0x18
mov byte [ebp - 4], 6
mov ecx, esp
mov dword [ebp - 0x2ac], esp
mov edx, str.Error_checking_if_a_directory_exists___Error_:
push eax
call fcn.00402ff3
pop ecx
mov byte [ebp - 4], 7
call fcn.0040d33a
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.0040d682
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], bl
call fcn.00402dd0
mov edx, esi
lea ecx, [ebp - 0x40]
call fcn.0040353f
sub esp, 0x18
mov byte [ebp - 4], 8
lea eax, [ebp - 0x40]
mov dword [ebp - 0x2ac], esp
mov ecx, esp
mov edx, str.___Windows_error_string_:
push eax
call fcn.00402ff3
pop ecx
mov byte [ebp - 4], 9
call fcn.0040d33a
mov ecx, eax
mov byte [ebp - 4], 8
call fcn.0040d682
lea ecx, [ebp - 0x40]
call fcn.00402dd0
or ebx, 0xffffffff
jmp 0x40af08