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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40de70
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 0x4c], ebx
je 0x408396
mov eax, dword [esp + 0x68]
cmp eax, ebx
jl 0x4088e9
lea ecx, [edi + 0x29c]
push eax
mov eax, dword [ecx + 8]
push eax
call sub.MFC42.DLL_CUIntArray::SetAtGrow
jmp 0x4088e9
mov dword [edi + 0x4c], 1
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [eax + 4]
call sub.MFC42.DLL_CCmdTarget::BeginWaitCursor
mov dword [esp + 0x60], ebx
call fcn.00401c20
test eax, eax
jne 0x4083e0
cmp dword [esp + 0x68], ebx
jge 0x408633
push ebx
push 1
push str.AmiBroker_is_not_running._nPlease_start_it_and_then_click_OK_to_continue__nTo_abandon_click_Cancel
call sub.MFC42.DLL_AfxMessageBox
cmp eax, 2
je 0x408633
call fcn.00401c20
test eax, eax
je 0x4083b7
mov ecx, dword [edi + 0x20]
push ebx
push ebx
push 0x1004
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [esp + 0x38], eax
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 4]
push 0x415d28
push str.DestinationPath
lea edx, [esp + 0x18]
push str.Settings
push edx
mov ecx, eax
call sub.MFC42.DLL_CWinApp::GetProfileStringA
mov eax, dword [esp + 0x10]
mov byte [esp + 0x60], 1
cmp dword [eax - 8], ebx
jne 0x40844b
push 0x400
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::GetBufferSetLength
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::ReleaseBuffer
push 0x414ea4
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x60], 2
call sub.MFC42.DLL_CString::CString
mov ecx, dword [edi + 0x298]
mov byte [esp + 0x60], 3
mov edx, dword [ecx*4 + 0x414cc8]
lea ecx, [esp + 0x18]
push edx
call fcn.0040c292
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
push str.DataDir
push str.SOFTWARETJPBrokerDefaults
lea eax, [esp + 0x1c]
push SysReAllocString
push eax
mov ecx, edi
mov byte [esp + 0x70], 4
call fcn.0040a1b0
test eax, eax
je 0x408649
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::MakeLower
push 0x5c
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReverseFind
mov esi, eax
cmp esi, ebx
jl 0x408649
lea ecx, [esp + 0x24]
push esi
push ecx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Left
push str.Formatsimport.types
lea edx, [esp + 0x20]
push eax
push edx
mov byte [esp + 0x6c], 5
call sub.MFC42.DLL_operator_1
mov bl, 7
lea ecx, [esp + 0x24]
mov byte [esp + 0x60], bl
call fcn.0040c286
mov eax, dword [esp + 0x1c]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
call ebp
cmp eax, 0xffffffff
je 0x40863b
lea ecx, [esp + 0x34]
push esi
push ecx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Left
push str.Formats_
lea edx, [esp + 0x34]
push eax
push edx
mov byte [esp + 0x6c], 8
call sub.MFC42.DLL_operator_1
lea ecx, [esp + 0x18]
lea edx, [esp + 0x2c]
push ecx
push eax
push edx
mov byte [esp + 0x6c], 9
call sub.MFC42.DLL_operator
push str..format
push eax
lea eax, [esp + 0x30]
mov byte [esp + 0x68], 0xa
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x64], 0xb
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x28]
mov byte [esp + 0x60], 0xa
call fcn.0040c286
lea ecx, [esp + 0x2c]
mov byte [esp + 0x60], 9
call fcn.0040c286
lea ecx, [esp + 0x30]
mov byte [esp + 0x60], 8
call fcn.0040c286
lea ecx, [esp + 0x34]
mov byte [esp + 0x60], bl
call fcn.0040c286
mov ecx, dword [esp + 0x1c]
push ecx
call ebp
cmp eax, 0xffffffff
jne 0x40863b
lea edx, [esp + 0x1c]
lea eax, [esp + 0x34]
push edx
push str.Missing_ASCII_importer_format_definition_file:_n_n
push eax
call sub.MFC42.DLL_operator_2
push str._n_nCan_not_import_without_this_file._nYou_have_to_reinstall_the_software__or_place_the_file_manually_
lea ecx, [esp + 0x6c]
push eax
push ecx
mov byte [esp + 0x6c], 0xc
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
push 0
push 0
push eax
mov byte [esp + 0x6c], 0xd
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [esp + 0x68]
mov byte [esp + 0x60], 0xc
call fcn.0040c286
lea ecx, [esp + 0x34]
mov byte [esp + 0x60], bl
call fcn.0040c286
lea ecx, [esp + 0x1c]
mov dword [edi + 0x4c], 0
mov byte [esp + 0x60], 4
call fcn.0040c286
jmp 0x40889c
mov dword [edi + 0x4c], ebx
jmp 0x4088d4
lea ecx, [esp + 0x1c]
mov byte [esp + 0x60], 4
call fcn.0040c286
lea ecx, [esp + 0x50]
call fcn.00401280
mov eax, dword [esp + 0x68]
xor edx, edx
test eax, eax
setle dl
dec edx
mov bl, 0xe
and edx, eax
mov byte [esp + 0x60], bl
mov ebp, edx
mov eax, dword [esp + 0x68]
cmp eax, 0xffffffff
jne 0x408677
cmp ebp, dword [esp + 0x38]
jl 0x40867f
cmp ebp, eax
jne 0x40887a
push ebp
mov ecx, edi
call sub.MFC42.DLL_CListCtrl::GetItemData
cmp eax, 4
jne 0x408874
push 1
lea eax, [esp + 0x38]
push ebp
push eax
mov ecx, edi
call sub.MFC42.DLL_CListCtrl::GetItemText
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x64], 0xf
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x34]
mov byte [esp + 0x60], bl
call fcn.0040c286
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], 1
mov eax, dword [ecx - 8]
test eax, eax
je 0x408847
lea edx, [esp + 0x10]
lea eax, [esp + 0x24]
push edx
push str.Importing
push eax
call sub.MFC42.DLL_operator_2
lea ecx, [esp + 0x20]
lea edx, [esp + 0x28]
push ecx
push eax
push edx
mov byte [esp + 0x6c], 0x10
call sub.MFC42.DLL_operator
push 0x4151cc
push eax
lea eax, [esp + 0x34]
mov byte [esp + 0x68], 0x11
push eax
call sub.MFC42.DLL_operator_1
lea ecx, [esp + 0x18]
lea edx, [esp + 0x30]
push ecx
push eax
push edx
mov byte [esp + 0x6c], 0x12
call sub.MFC42.DLL_operator
mov esi, dword [eax]
mov byte [esp + 0x60], 0x13
call sub.MFC42.DLL_AfxGetThread
test eax, eax
je 0x40873e
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x408740
xor eax, eax
push esi
mov ecx, eax
call sub.MFC42.DLL_CFrameWnd::SetMessageText
lea ecx, [esp + 0x30]
mov byte [esp + 0x60], 0x12
call fcn.0040c286
lea ecx, [esp + 0x2c]
mov byte [esp + 0x60], 0x11
call fcn.0040c286
lea ecx, [esp + 0x28]
mov byte [esp + 0x60], 0x10
call fcn.0040c286
lea ecx, [esp + 0x24]
mov byte [esp + 0x60], bl
call fcn.0040c286
lea eax, [esp + 0x18]
push str..format
lea ecx, [esp + 0x50]
push eax
push ecx
call sub.MFC42.DLL_operator_1
mov esi, dword [eax]
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x48]
push edx
push eax
mov ecx, edi
mov byte [esp + 0x68], 0x14
call fcn.00409870
lea ecx, [esp + 0x10]
push eax
lea edx, [esp + 0x48]
push ecx
push edx
mov byte [esp + 0x6c], 0x15
call sub.MFC42.DLL_operator
push 0x4151cc
push eax
lea eax, [esp + 0x48]
mov byte [esp + 0x68], 0x16
push eax
call sub.MFC42.DLL_operator_1
lea ecx, [esp + 0x18]
lea edx, [esp + 0x3c]
push ecx
push eax
push edx
mov byte [esp + 0x6c], 0x17
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push esi
push eax
lea ecx, [esp + 0x58]
mov byte [esp + 0x68], 0x18
call fcn.004013e0
lea ecx, [esp + 0x3c]
mov esi, eax
mov byte [esp + 0x60], 0x17
call fcn.0040c286
lea ecx, [esp + 0x40]
mov byte [esp + 0x60], 0x16
call fcn.0040c286
lea ecx, [esp + 0x44]
mov byte [esp + 0x60], 0x15
call fcn.0040c286
lea ecx, [esp + 0x48]
mov byte [esp + 0x60], 0x14
call fcn.0040c286
lea ecx, [esp + 0x4c]
mov byte [esp + 0x60], bl
call fcn.0040c286
test esi, esi
je 0x40884e
mov eax, str.Imported
jmp 0x408853
mov eax, str.Import_FAILED
push eax
push 2
push ebp
mov ecx, edi
call sub.MFC42.DLL_CListCtrl::SetItemText
push 5
push 0
push 0
push 0
push 0
push 4
push 0
push ebp
mov ecx, edi
call sub.MFC42.DLL_CListCtrl::SetItem
inc ebp
jmp 0x408668
test eax, eax
jg 0x408887
lea ecx, [esp + 0x50]
call fcn.004015f0
lea ecx, [esp + 0x50]
mov dword [edi + 0x4c], 0
mov byte [esp + 0x60], 4
call fcn.004013a0
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 3
call fcn.0040c286
lea ecx, [esp + 0x18]
mov byte [esp + 0x60], 2
call fcn.0040c286
lea ecx, [esp + 0x20]
mov byte [esp + 0x60], 1
call fcn.0040c286
lea ecx, [esp + 0x10]
mov byte [esp + 0x60], 0
call fcn.0040c286
mov dword [esp + 0x60], 0xffffffff
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [eax + 4]
call sub.MFC42.DLL_CCmdTarget::EndWaitCursor
mov ecx, dword [esp + 0x58]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x54
ret 4