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

Disassembly:
push 0xffffffffffffffff
push 0x58cfa7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x414
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 4]
mov esi, eax
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 8]
mov dword [esp + 0x420], 0
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esp + 0x428]
lea ecx, [esp + 8]
push eax
push str.Function_Name:__s_n
push ecx
mov byte [esp + 0x42c], 1
call sub.MFC42.DLL_CString::Format
add esp, 0xc
cmp esi, 2
jne 0x4f150b
mov edx, dword [esp + 0x42c]
push edx
push esi
push str.Error_Code:_ld_nDescription:_ERROR_FILE_NOT_FOUND_n_nFile:__s_not_existed_n
jmp 0x4f15c5
cmp esi, 3
jne 0x4f1528
mov ecx, dword [esp + 0x42c]
lea edx, [esp + 4]
push ecx
push esi
push str.Error_Code:_ld_nDescription:_ERROR_PATH_NOT_FOUND_n_nFile:__s_not_existed_n
push edx
jmp 0x4f15ca
cmp esi, 0x20
jne 0x4f1545
mov eax, dword [esp + 0x42c]
lea ecx, [esp + 4]
push eax
push esi
push str.Error_Code:_ld_nDescription:_ERROR_SHARING_VIOLATION_n_nThe_process_cannot_access_the_file__s_nbecause_it_is_being_used_by_another_process._n_nMay_be_this_system_is_single_user_version
push ecx
jmp 0x4f15ca
cmp esi, 0x21
jne 0x4f1583
mov edx, dword [esp + 0x42c]
lea eax, [esp + 4]
push edx
push esi
push str.Error_Code:_ld_nDescription:_ERROR_LOCK_VIOLATION_n_nThe_process_cannot_access_the_file__s
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea ecx, [esp + 4]
push str._nbecause_another_process_has_locked_a_portion_of_the_file.
call sub.MFC42.DLL_CString::operator_1
push str._n_nMay_be_this_system_is_Locked_by_other_user_n
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::operator_1
jmp 0x4f15d2
cmp esi, 4
jne 0x4f159d
mov ecx, dword [esp + 0x42c]
lea edx, [esp + 4]
push ecx
push esi
push str.Error_Code:_ld_nDescription:_ERROR_TOO_MANY_OPEN_FILES_n_nThe_process_cannot_access_the_file__s_nbecause_it_is_being_system_cannot_open_the_file.__n_nMay_be_this_system_run_in_ram_drive
push edx
jmp 0x4f15ca
cmp esi, 5
jne 0x4f15b7
mov eax, dword [esp + 0x42c]
lea ecx, [esp + 4]
push eax
push esi
push str.Error_Code:_ld_nDescription:_ERROR_ACCESS_DENIED_n_nFile:_s_Access_is_denied._n_nMay_be_this_file_attribute_is_read_only_ntry_goto_command_prompt_and_type_attrib_.__r
push ecx
jmp 0x4f15ca
mov edx, dword [esp + 0x42c]
push esi
push edx
push str.File_open_error_n_nFile:_s_nerror_no:__ld
lea eax, [esp + 0x10]
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea ecx, [esp + 0x18]
push ecx
push 0x3e8
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_3
lea edx, [esp + 0x18]
lea eax, [esp + 0xc]
push edx
push str._nCurrent_Directory:_s
push eax
mov byte [esp + 0x42c], 2
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 4]
lea edx, [esp + 8]
lea eax, [esp + 0x14]
push ecx
push edx
push eax
call sub.MFC42.DLL_operator_3
lea ecx, [esp + 0xc]
lea edx, [esp + 0x10]
push ecx
push eax
push edx
mov byte [esp + 0x42c], 3
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
push 0x44e
push eax
mov byte [esp + 0x428], 4
call fcn.004c31a0
add esp, 8
lea ecx, [esp + 0x10]
mov byte [esp + 0x420], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x420], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0x420], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 8]
mov byte [esp + 0x420], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 4]
mov dword [esp + 0x420], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x418]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x420
ret