Function at 0x40d54f
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x620
push ebx
push esi
mov dword [ebp - 8], ecx
mov edx, 0x81
push edi
xor ebx, ebx
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x416]
mov word [ebp - 0x418], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x20e]
mov word [ebp - 0x210], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x418]
push 0x824
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov eax, dword [0x42f8dc]
cmp eax, ebx
jne 0x40d5bd
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40d5c8
xor edi, edi
jmp 0x40d5f5
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.00415c50
mov edi, esp
push esi
push edi
push 0xffffffffffffffff
push dword [ebp - 4]
mov word [edi], bx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x210]
push ebx
push eax
push ebx
push ebx
push ebx
push 0xbb8
push 1
push ebx
push 1
push ebx
push ebx
push edi
call fcn.0040ecb6
add esp, 0x30
cmp word [ebp - 0x210], bx
je 0x40d658
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d658
lea eax, [ebp - 0x210]
test eax, eax
je 0x40d646
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp - 0x210]
push ecx
push eax
mov ecx, 0x42f980
call fcn.00401af1
mov eax, dword [0x42f8cc]
cmp eax, ebx
jne 0x40d666
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
push 0x42caac
call sub.MSVCRT.dll_strcmp
neg eax
sbb eax, eax
pop ecx
inc eax
pop ecx
mov dword [0x42f990], eax
mov eax, dword [0x42f8ec]
cmp eax, ebx
jne 0x40d68b
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
mov ecx, 0x42f97c
call fcn.0040dfc0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x61e]
mov word [ebp - 0x620], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [0x42f8fc]
cmp eax, ebx
jne 0x40d6bc
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40d6c7
xor edi, edi
jmp 0x40d6f4
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.00415c50
mov edi, esp
push esi
push edi
push 0xffffffffffffffff
push dword [ebp - 4]
mov word [edi], bx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, 0x103
lea eax, [ebp - 0x620]
push esi
push edi
push eax
call dword [sym.imp.MSVCRT.dll_wcsncpy]
mov ecx, dword [ebp - 8]
add esp, 0xc
lea eax, [ebp - 0x620]
push esi
push eax
call fcn.0040d726
lea esp, [ebp - 0x62c]
pop edi
pop esi
pop ebx
leave
ret