Function at 0x40b848
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 [0x42c5ec]
cmp eax, ebx
jne 0x40b8b6
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 0x40b8c1
xor edi, edi
jmp 0x40b8ee
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.00414800
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.0040ccfc
add esp, 0x30
cmp word [ebp - 0x210], bx
je 0x40b951
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b951
lea eax, [ebp - 0x210]
test eax, eax
je 0x40b93f
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp - 0x210]
push ecx
push eax
mov ecx, 0x42c690
call fcn.00401af1
mov eax, dword [0x42c5dc]
cmp eax, ebx
jne 0x40b95f
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 0x4297d8
call sub.MSVCRT.dll_strcmp
neg eax
sbb eax, eax
pop ecx
inc eax
pop ecx
mov dword [0x42c6a0], eax
mov eax, dword [0x42c5fc]
cmp eax, ebx
jne 0x40b984
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, 0x42c68c
call fcn.0040c274
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 [0x42c60c]
cmp eax, ebx
jne 0x40b9b5
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 0x40b9c0
xor edi, edi
jmp 0x40b9ed
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.00414800
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.0040ba1f
lea esp, [ebp - 0x62c]
pop edi
pop esi
pop ebx
leave
ret