Function at 0x40e912
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x41cad4
call fcn.0041be90
sub esp, 0xc74
mov eax, dword [ecx + 0x6c]
push ebx
xor ebx, ebx
mov dword [ebp - 0x10], ecx
cmp eax, ebx
je 0x40ebe2
cmp dword [ecx + 0x7c], ebx
je 0x40ebe2
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathCombineW]
push edi
mov edi, 0x41d630
mov dword [ebp - 0x18], edi
cmp dword [edi + 4], ebx
je 0x40ebce
cmp dword [edi + 8], ebx
je 0x40eb3d
mov edx, dword [edi]
cmp edx, ebx
je 0x40ebce
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x236]
mov word [ebp - 0x238], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x68]
cmp eax, ebx
jne 0x40e98f
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push edx
push eax
lea eax, [ebp - 0x238]
push eax
call esi
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x43e]
mov word [ebp - 0x440], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x78]
cmp eax, ebx
jne 0x40e9ce
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov ecx, dword [ebp - 0x18]
push dword [ecx + 4]
push eax
lea eax, [ebp - 0x440]
push eax
call esi
lea eax, [ebp - 0x440]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
mov dword [ebp - 0x14], eax
mov al, byte [ebp + 0xb]
mov byte [ebp - 0x30], al
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
lea eax, [ebp - 0x30]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.00401b15
add esp, 0xc
mov dword [ebp - 0x20], ebx
xor edi, edi
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], edi
cmp eax, ebx
je 0x40eb29
mov ecx, dword [ebp - 0x28]
sub ecx, eax
sar ecx, 4
cmp dword [ebp - 0x20], ecx
jae 0x40eb29
add eax, edi
cmp dword [eax + 8], ebx
je 0x40eb1b
mov eax, dword [eax + 4]
cmp eax, ebx
jne 0x40ea5b
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push dword [ebp - 0x14]
lea ecx, [ebp - 0x238]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x40eb1b
mov eax, dword [ebp - 0x2c]
add edi, eax
mov eax, dword [edi + 8]
cmp eax, dword [ebp - 0x14]
jb 0x40ea9c
cmp dword [edi + 4], ebx
je 0x40ea9c
mov ecx, edi
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__::_Freeze_void_]
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x14]
lea eax, [eax + ecx*2]
jmp 0x40eaa1
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
cmp word [eax], bx
je 0x40eb1b
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
add eax, ecx
mov eax, dword [eax + 4]
cmp eax, ebx
jne 0x40eaba
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov ecx, dword [ebp - 0x14]
lea edi, [eax + ecx*2]
lea ecx, [ebp - 0xc80]
call fcn.0040ebf1
lea eax, [ebp - 0x238]
push edi
push eax
lea eax, [ebp - 0xc80]
push eax
call esi
lea eax, [ebp - 0x440]
push edi
push eax
lea eax, [ebp - 0xa78]
push eax
call esi
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x870], ebx
cmp dword [eax + 0xc], ebx
je 0x40eb0c
lea eax, [ebp - 0xa78]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40eb1b
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0xc80]
push eax
call fcn.004101b8
mov edi, dword [ebp - 0x1c]
inc dword [ebp - 0x20]
add edi, 0x10
jmp 0x40ea25
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.00404130
mov edi, dword [ebp - 0x18]
jmp 0x40ebce
lea ecx, [ebp - 0x860]
call fcn.0040ebf1
mov ecx, dword [edi]
cmp ecx, ebx
je 0x40eb70
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x68]
cmp eax, ebx
jne 0x40eb5d
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push ecx
push eax
lea eax, [ebp - 0x860]
push eax
call esi
mov dword [ebp - 0x450], ebx
jmp 0x40eb8d
lea eax, [ebp - 0x860]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x450], 1
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x78]
cmp eax, ebx
jne 0x40eb9c
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push dword [edi + 4]
push eax
lea eax, [ebp - 0x658]
push eax
call esi
cmp dword [edi + 0xc], ebx
je 0x40ebbf
lea eax, [ebp - 0x658]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40ebce
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x860]
push eax
call fcn.004101b8
add edi, 0x10
cmp edi, 0x41d690
mov dword [ebp - 0x18], edi
jb 0x40e94c
pop edi
pop esi
mov ecx, dword [ebp - 0xc]
pop ebx
mov dword fs:[0], ecx
leave
ret 4