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

Disassembly:
mov eax, 0x455dd8
call fcn.0041bfe0
sub esp, 0x14
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esp
push dword [ebp + 8]
lea ebx, [esi + 8]
mov dword [esi + 0x1c], eax
mov ecx, ebx
call sub.MFC42.DLL_CString::operator_1
xor eax, eax
cmp dword [ebp + 0x10], eax
je 0x40f0e6
push dword [ebp + 0x10]
lea ecx, [esi + 0xc]
call sub.MFC42.DLL_CString::operator_1
jmp 0x40f254
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push eax
push eax
call edi
lea ecx, [ebp + 0x10]
mov dword [ebp + 0xc], eax
call fcn.0041bb8c
push dword [ebp + 0xc]
and dword [ebp - 4], 0
lea ecx, [ebp + 0x10]
call sub.MFC42.DLL_CString::GetBufferSetLength
push eax
push dword [ebp + 0xc]
call edi
push 0xffffffffffffffff
lea ecx, [ebp + 0x10]
mov edi, eax
call sub.MFC42.DLL_CString::ReleaseBuffer
cmp edi, 0xffffffff
je 0x40f1cd
push str..sys
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString_2
mov edi, eax
push 0x464168
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString_2
push eax
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 2
call sub.MFC42.DLL_operator_1
push ebx
push eax
lea eax, [ebp + 8]
mov byte [ebp - 4], 3
push eax
call sub.MFC42.DLL_operator_1
push edi
push eax
lea eax, [ebp + 0xc]
mov byte [ebp - 4], 4
push eax
call sub.MFC42.DLL_operator_1
lea edi, [esi + 0xc]
push eax
mov ecx, edi
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 8]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40f248
push str..sys
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::CString_2
mov edi, eax
push str._SystemRoot__system32Drivers_
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString_2
push ebx
push eax
lea eax, [ebp + 8]
mov byte [ebp - 4], 7
push eax
call sub.MFC42.DLL_operator_1
push edi
push eax
lea eax, [ebp + 0xc]
mov byte [ebp - 4], 8
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esi + 0xc]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 8]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10]
call sub.MFC42.DLL_CString::CString
cmp dword [ebp + 0x14], 0
lea edi, [esi + 0x10]
je 0x40f269
push dword [ebp + 0x14]
mov ecx, edi
call sub.MFC42.DLL_CString::operator_1
jmp 0x40f271
push ebx
mov ecx, edi
call sub.MFC42.DLL_CString::operator
push 0x4656e4
lea ecx, [ebp + 0x14]
call sub.MFC42.DLL_CString::CString_2
mov ebx, eax
lea eax, [ebp + 0x10]
push 2
push eax
mov ecx, edi
mov dword [ebp - 4], 0xa
call sub.MFC42.DLL_CString::Left
mov ebx, dword [ebx]
mov eax, dword [eax]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
pop ecx
pop ecx
test eax, eax
lea ecx, [ebp + 0x10]
setne bl
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x14]
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x40f302
push 0x4656dc
lea ecx, [ebp + 0x14]
call sub.MFC42.DLL_CString::CString_2
push edi
push eax
lea eax, [ebp + 0x10]
mov dword [ebp - 4], 0xb
push eax
call sub.MFC42.DLL_operator_1
push eax
mov ecx, edi
mov byte [ebp - 4], 0xc
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0xb
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x14]
call sub.MFC42.DLL_CString::CString
mov ecx, esi
mov dword [ebp - 4], 0xd
call fcn.0040f349
jmp 0x40f324
cmp dword [esi + 0x14], 0
je 0x40f335
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [esi], 0xffffffff
mov eax, dword [esi + 0x14]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10