Function at 0x402d59
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x41fc07
call fcn.0041f700
sub esp, 0x34
push ebx
push edi
push dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402e47
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x402e47
cmp word [edi], bx
je 0x402e47
mov al, byte [ebp + 0xb]
push esi
push ebx
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x30], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push dword [ebp + 8]
mov esi, dword [sym.imp.MSVCRT.dll_wcslen]
call esi
pop ecx
push eax
lea ecx, [ebp - 0x30]
push dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], ebx
mov byte [ebp - 0x20], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push edi
call esi
pop ecx
push eax
push edi
lea ecx, [ebp - 0x20]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
mov byte [ebp - 0x40], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00409e1a
add esp, 0xc
test eax, eax
pop esi
jne 0x402e16
mov dword [ebp - 0x10], 1
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov eax, dword [ebp - 0x10]
jmp 0x402e49
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret