Function at 0x406430
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x40b6d2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x364
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
push str.Text_Files_.txt_.txtAll_Files_._.
push 0xa01004
mov edi, ecx
push ebx
push str..txt
push 1
lea ecx, [esp + 0x4c]
call sub.MFC42u.DLL_CFileDialog::CFileDialog
lea ecx, [esp + 0x34]
mov dword [esp + 0x37c], ebx
mov dword [esp + 0xc4], 0x40f620
call sub.MFC42u.DLL_CFileDialog::DoModal
cmp eax, 2
jne 0x40649f
mov dword [esp + 0x37c], 1
jmp 0x40667f
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::CString_1
lea eax, [esp + 0x1c]
mov byte [esp + 0x37c], 2
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push ecx
lea ecx, [esp + 0x40]
call sub.MFC42u.DLL_CFileDialog::GetPathName
call fcn.00409d50
add esp, 8
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::CString_1
mov dl, byte [esp + 0x1b]
xor esi, esi
mov byte [esp + 0x20], dl
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
push 0x40f10c
push 0x3ef
mov ecx, edi
mov byte [esp + 0x384], 4
call sub.MFC42u.DLL_CWnd::SetDlgItemTextW
mov ebp, dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x406512
mov esi, dword [esp + 0x14]
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x40f5f4
call sub.MFC42u.DLL_CString::CString_2
lea eax, [esp + 0x14]
lea ecx, [esp + 0x20]
push eax
push esi
push ecx
call fcn.00409b10
add esp, 0x10
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], eax
call sub.MFC42u.DLL_CString::TrimLeft
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::TrimRight
mov edx, dword [esp + 0x10]
cmp dword [edx - 8], ebx
je 0x4065e1
mov eax, dword [edi + 0x1c0]
push ebx
push ebx
push 0x1004
push eax
xor esi, esi
call ebp
cmp eax, ebx
jle 0x4065a9
lea ebx, [edi + 0x1a0]
push esi
mov ecx, ebx
call sub.MFC42u.DLL_CListCtrl::GetItemData
mov ecx, dword [esp + 0x10]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x4065df
mov edx, dword [edi + 0x1c0]
push 0
push 0
push 0x1004
push edx
inc esi
call ebp
cmp esi, eax
jl 0x406575
xor ebx, ebx
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4065e1
shr eax, 4
and eax, 1
lea edx, [esp + 0x10]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
call sub.MFC42u.DLL_CString::CString
lea eax, [esp + 0x28]
mov ecx, edi
push eax
call fcn.004020f0
jmp 0x4065e1
xor ebx, ebx
cmp dword [esp + 0x14], 0xffffffff
jne 0x40650e
push 0x40fa34
push 0x3ef
mov ecx, edi
call sub.MFC42u.DLL_CWnd::SetDlgItemTextW
mov ecx, dword [edi + 0x1c0]
push ebx
push ebx
push 0xb
push ecx
call ebp
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
cmp esi, eax
je 0x40662b
mov edx, dword [esi]
mov ecx, edi
push edx
call fcn.00402ae0
mov eax, dword [esp + 0x28]
add esi, 4
cmp esi, eax
jne 0x406616
mov eax, dword [edi + 0x1c0]
push ebx
push 1
push 0xb
push eax
call ebp
mov ecx, dword [esp + 0x24]
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x37c], 2
call fcn.0040a3e8
lea ecx, [esp + 0x1c]
mov byte [esp + 0x37c], 0
call fcn.0040a3e8
mov dword [esp + 0x37c], 5
lea ecx, [esp + 0xe4]
call fcn.0040a3e8
lea ecx, [esp + 0x34]
mov dword [esp + 0x37c], 0xffffffff
call fcn.0040a3ca
mov ecx, dword [esp + 0x374]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x370
ret