Function at 0x419780
Capabilities:
Check if file exists
Get common file path

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4265cc
push eax
mov eax, dword [esp + 0x10]
mov dword fs:[0], esp
sub esp, 0x298
push edi
mov edi, ecx
mov ecx, dword [0x445a38]
test ecx, ecx
je 0x4197cb
push edi
push eax
call ecx
add esp, 8
pop edi
mov ecx, dword [esp + 0x298]
mov dword fs:[0], ecx
add esp, 0x2a4
ret 4
push esi
push eax
lea ecx, [esp + 0x44]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
xor esi, esi
mov dword [esp + 0x2a8], 0
cmp dword [esp + 0x54], esi
je 0x419baa
push ebp
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
lea ecx, [esp + 0xc]
mov byte [esp + 0x2ac], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov byte [esp + 0x2ac], 2
cmp dword [esp + 0x20], esi
jne 0x419b35
push esi
push 0x438bd8
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::find_wchar_t_const___unsigned_int_const]
cmp eax, 1
jne 0x41986b
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x10]
call dword [0x42e210]
mov eax, dword [esp + 0x10]
mov ebp, 8
cmp dword [esp + 0x24], ebp
jae 0x419854
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x419870
lea ecx, [esp + 0xc]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::clear_void_]
jmp 0x419870
mov ebp, 8
cmp dword [esp + 0x20], 0
jne 0x419b3a
test edi, edi
mov edi, dword [sym.imp.MSVCP80.dll_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_std::operator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
jne 0x419993
push 0x20a
lea ecx, [esp + 0x9e]
push 0
push ecx
mov word [esp + 0xa4], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x104
lea edx, [esp + 0x9c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
mov ecx, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov edx, dword [ecx]
push edx
push 0x5c
lea ecx, [esp + 0x30]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::rfind_wchar_t__unsigned_int_const]
cmp eax, 0xffffffff
je 0x419925
add eax, 1
push eax
push 0
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x34]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::substr_unsigned_int__unsigned_int_]
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2b0], 3
call dword [0x42e210]
lea ecx, [esp + 0x60]
mov byte [esp + 0x2ac], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esp + 0x3c], 0
je 0x419988
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x68]
push eax
call edi
add esp, 0xc
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x2b0], 4
call dword [0x42e210]
lea ecx, [esp + 0x60]
mov byte [esp + 0x2ac], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esp + 0x24], ebp
mov eax, dword [esp + 0x10]
jae 0x419973
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x419988
lea ecx, [esp + 0xc]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::clear_void_]
cmp dword [esp + 0x20], 0
jne 0x419b3a
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::clear_void_]
push 0x104
lea ecx, [esp + 0x9c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x4199c6
lea edx, [esp + 0x98]
push edx
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
cmp dword [esp + 0x3c], 0
mov esi, dword [sym.imp.MSVCP80.dll_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_std::operator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___wchar_t_const__]
je 0x419a5d
push 0x438838
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x84]
push ecx
call esi
lea edx, [esp + 0x50]
push edx
push eax
lea eax, [esp + 0x74]
push eax
mov byte [esp + 0x2c4], 5
call edi
add esp, 0x18
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x2b0], 6
call dword [0x42e210]
lea ecx, [esp + 0x60]
mov byte [esp + 0x2ac], 5
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x7c]
mov byte [esp + 0x2ac], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esp + 0x24], ebp
mov eax, dword [esp + 0x10]
jae 0x419a48
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x419a5d
lea ecx, [esp + 0xc]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::clear_void_]
cmp dword [esp + 0x20], 0
jne 0x419b3a
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::clear_void_]
push 0x104
lea ecx, [esp + 0x9c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x419a9b
lea edx, [esp + 0x98]
push edx
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
cmp dword [esp + 0x3c], 0
je 0x419b2c
push 0x438838
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x68]
push ecx
call esi
lea edx, [esp + 0x50]
push edx
push eax
lea eax, [esp + 0x90]
push eax
mov byte [esp + 0x2c4], 7
call edi
add esp, 0x18
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x2b0], 8
call dword [0x42e210]
lea ecx, [esp + 0x7c]
mov byte [esp + 0x2ac], 7
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x60]
mov byte [esp + 0x2ac], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esp + 0x24], ebp
mov eax, dword [esp + 0x10]
jae 0x419b17
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x419b2c
lea ecx, [esp + 0xc]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::clear_void_]
cmp dword [esp + 0x20], 0
je 0x419b6e
jmp 0x419b3a
mov ebp, 8
cmp dword [esp + 0x24], ebp
mov eax, dword [esp + 0x10]
jae 0x419b48
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x419b6e
cmp dword [esp + 0x24], ebp
mov eax, dword [esp + 0x10]
jae 0x419b61
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
jne 0x419b85
cmp dword [esp + 0x5c], ebp
mov eax, dword [esp + 0x48]
jae 0x419b7c
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x2ac], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x28]
mov byte [esp + 0x2ac], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
pop ebp
lea ecx, [esp + 0x40]
mov dword [esp + 0x2a8], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [esp + 0x2a0]
mov eax, esi
pop esi
pop edi
mov dword fs:[0], ecx
add esp, 0x2a4
ret 4