Function at 0x4128f6
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x421e68
call fcn.00420e60
sub esp, 0xc70
push ebx
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
mov dword [ebp - 0x10], ecx
je 0x412be1
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jle 0x412be1
cmp dword [ecx + 0x70], ebx
je 0x412be1
cmp dword [ecx + 0x80], ebx
je 0x412be1
cmp eax, ebx
jle 0x412be1
add edi, 4
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov dword [ebp + 0xc], edi
mov dword [ebp - 0x1c], eax
cmp dword [edi], ebx
je 0x412bd1
cmp dword [edi + 4], ebx
je 0x412b40
mov edx, dword [edi - 4]
cmp edx, ebx
je 0x412bd1
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x232]
mov word [ebp - 0x234], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x6c]
cmp eax, ebx
jne 0x412993
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 - 0x234]
push eax
call esi
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x43a]
mov word [ebp - 0x43c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x7c]
cmp eax, ebx
jne 0x4129d2
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 + 0xc]
push dword [ecx]
push eax
lea eax, [ebp - 0x43c]
push eax
call esi
lea eax, [ebp - 0x43c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
mov dword [ebp + 8], eax
mov al, byte [ebp + 0x13]
mov byte [ebp - 0x2c], al
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00401b15
add esp, 0xc
mov dword [ebp - 0x14], ebx
xor edi, edi
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x18], edi
cmp eax, ebx
je 0x412b2c
mov ecx, dword [ebp - 0x24]
sub ecx, eax
sar ecx, 4
cmp dword [ebp - 0x14], ecx
jae 0x412b2c
add eax, edi
cmp dword [eax + 8], ebx
je 0x412b1e
mov eax, dword [eax + 4]
cmp eax, ebx
jne 0x412a5e
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 + 8]
lea ecx, [ebp - 0x234]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x412b1e
mov eax, dword [ebp - 0x28]
add edi, eax
mov eax, dword [edi + 8]
cmp eax, dword [ebp + 8]
jb 0x412a9f
cmp dword [edi + 4], ebx
je 0x412a9f
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 + 8]
lea eax, [eax + ecx*2]
jmp 0x412aa4
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 0x412b1e
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
add eax, ecx
mov eax, dword [eax + 4]
cmp eax, ebx
jne 0x412abd
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 + 8]
lea edi, [eax + ecx*2]
lea ecx, [ebp - 0xc7c]
call fcn.00412bf1
lea eax, [ebp - 0x234]
push edi
push eax
lea eax, [ebp - 0xc7c]
push eax
call esi
lea eax, [ebp - 0x43c]
push edi
push eax
lea eax, [ebp - 0xa74]
push eax
call esi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x86c], ebx
cmp dword [eax + 8], ebx
je 0x412b0f
lea eax, [ebp - 0xa74]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x412b1e
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0xc7c]
push eax
call fcn.004149fe
mov edi, dword [ebp - 0x18]
inc dword [ebp - 0x14]
add edi, 0x10
jmp 0x412a28
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00406c5d
mov edi, dword [ebp + 0xc]
jmp 0x412bd1
lea ecx, [ebp - 0x85c]
call fcn.00412bf1
mov ecx, dword [edi - 4]
cmp ecx, ebx
je 0x412b74
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x6c]
cmp eax, ebx
jne 0x412b61
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 - 0x85c]
push eax
call esi
mov dword [ebp - 0x44c], ebx
jmp 0x412b91
lea eax, [ebp - 0x85c]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x44c], 1
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x7c]
cmp eax, ebx
jne 0x412ba0
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]
push eax
lea eax, [ebp - 0x654]
push eax
call esi
cmp dword [edi + 8], ebx
je 0x412bc2
lea eax, [ebp - 0x654]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x412bd1
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0x85c]
push eax
call fcn.004149fe
add edi, 0x10
dec dword [ebp - 0x1c]
mov dword [ebp + 0xc], edi
jne 0x412950
pop esi
mov ecx, dword [ebp - 0xc]
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc