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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41e11b
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebp
push esi
mov esi, dword [esp + 0x50]
push edi
cmp esi, 0xffffffff
mov ebp, ecx
jne 0x4171b6
mov eax, dword [ebp + 0x368]
push 2
push esi
push 0x100c
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov esi, eax
cmp esi, 0xffffffff
je 0x41726a
mov ecx, dword [ebp + 0x330]
push 1
call sub.MFC42.DLL_CWnd::UpdateData
lea edi, [ebp + 0x348]
push esi
mov ecx, edi
call sub.MFC42.DLL_CListCtrl::GetItemData
mov ecx, dword [ebp + 0x330]
mov edx, dword [ebp + 0xd0]
lea esi, [eax + eax*8]
add ecx, 0xd0
shl esi, 2
push ecx
lea ecx, [esi + edx + 8]
call fcn.0041abce
mov eax, dword [ebp + 0x330]
mov ecx, dword [ebp + 0xd0]
mov edx, dword [eax + 0xc8]
mov dword [esi + ecx + 0x20], edx
mov eax, dword [ebp + 0x330]
mov eax, dword [eax + 0xcc]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x417280
push 0x30
push 0x429520
push str.Please_enter_a_valid_home_directory
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
push 0
lea ecx, [ebp + 0x2f0]
call fcn.00414c30
mov ecx, dword [ebp + 0x330]
push 0x43c
call sub.MFC42.DLL_CWnd::GetDlgItem
mov ecx, eax
call sub.MFC42.DLL_CWnd::SetFocus
mov ecx, dword [ebp + 0x388]
push 3
push 3
push ecx
mov ecx, edi
call sub.MFC42.DLL_CListCtrl::SetItemState
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret 4
mov edx, dword [ebp + 0xd0]
xor edi, edi
mov ecx, dword [esi + edx + 0x14]
lea eax, [esi + edx]
cmp ecx, edi
jle 0x417331
mov ecx, dword [ebp + 0x330]
add ecx, 0xcc
push ecx
mov ecx, dword [eax + 0x10]
add ecx, 4
call fcn.0041abce
mov eax, dword [ebp + 0xd0]
mov edx, dword [ebp + 0x330]
mov ecx, dword [esi + eax + 0x10]
mov edx, dword [edx + 0xd4]
mov dword [ecx + 0x1c], edx
mov ecx, dword [ebp + 0xd0]
mov eax, dword [ebp + 0x330]
mov edx, dword [esi + ecx + 0x10]
mov eax, dword [eax + 0xd8]
mov dword [edx + 0x18], eax
mov edx, dword [ebp + 0xd0]
mov ecx, dword [ebp + 0x330]
mov eax, dword [esi + edx + 0x10]
mov ecx, dword [ecx + 0xe4]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp + 0xd0]
mov edx, dword [ebp + 0x330]
mov ecx, dword [esi + eax + 0x10]
mov edx, dword [edx + 0xdc]
mov dword [ecx + 0x14], edx
mov ecx, dword [ebp + 0xd0]
mov eax, dword [ebp + 0x330]
mov edx, dword [esi + ecx + 0x10]
mov eax, dword [eax + 0xe0]
mov dword [edx + 0x10], eax
jmp 0x417614
push ebx
lea ecx, [esp + 0x24]
call fcn.00417ad0
mov eax, dword [ebp + 0x330]
mov dword [esp + 0x50], edi
mov ecx, dword [eax + 0xd4]
add eax, 0xcc
mov dword [esp + 0x40], ecx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x3c], edx
mov ecx, dword [eax + 0x18]
mov dword [esp + 0x30], ecx
mov edx, dword [eax + 0x10]
mov dword [esp + 0x38], edx
mov ecx, dword [eax + 0x14]
mov dword [esp + 0x34], ecx
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x48], 1
call fcn.0041abce
push 0x42b6b8
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CString::operator
mov edx, dword [ebp + 0xd0]
mov eax, dword [esi + edx + 0x14]
lea esi, [esi + edx + 0xc]
mov ebx, eax
mov dword [esp + 0x58], esi
mov dword [esp + 0x1c], ebx
inc ebx
cmp ebx, edi
jne 0x4173e9
mov ebx, dword [esi + 4]
cmp ebx, edi
je 0x4173de
mov ecx, eax
dec eax
test ecx, ecx
je 0x4173cf
lea edi, [eax + 1]
mov edx, dword [ebx]
push 0
mov ecx, ebx
call dword [edx + 4]
add ebx, 0x24
dec edi
jne 0x4173be
xor edi, edi
mov eax, dword [esi + 4]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi + 4], edi
mov dword [esi + 0xc], edi
mov dword [esi + 8], edi
jmp 0x4175eb
mov ecx, dword [esi + 4]
cmp ecx, edi
jne 0x41745c
lea edi, [ebx + ebx*8]
shl edi, 2
push edi
call sub.MFC42.DLL_operatornew
mov edx, eax
mov ecx, edi
mov dword [esi + 4], edx
mov dword [esp + 0x5c], edx
mov edi, edx
mov edx, ecx
xor eax, eax
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebx]
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x58]
mov dword [esp + 0x18], edi
test edi, edi
mov byte [esp + 0x50], 1
je 0x41743a
mov ecx, edi
call fcn.00417ad0
mov eax, dword [esp + 0x10]
add edi, 0x24
dec eax
mov byte [esp + 0x50], 0
mov dword [esp + 0x58], edi
mov dword [esp + 0x10], eax
jne 0x417422
mov dword [esi + 0xc], ebx
mov dword [esi + 8], ebx
jmp 0x4175eb
cmp ebx, dword [esi + 0xc]
jg 0x4174ff
cmp eax, ebx
jge 0x4174ca
mov edx, ebx
sub edx, eax
lea eax, [eax + eax*8]
lea edi, [ecx + eax*4]
lea ecx, [edx + edx*8]
shl ecx, 2
mov esi, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x10], edi
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, edx
dec edx
test ecx, ecx
je 0x4174be
mov esi, dword [esp + 0x10]
lea edi, [edx + 1]
mov dword [esp + 0x18], esi
test esi, esi
mov byte [esp + 0x50], 2
je 0x4174af
mov ecx, esi
call fcn.00417ad0
add esi, 0x24
dec edi
mov byte [esp + 0x50], 0
mov dword [esp + 0x10], esi
jne 0x41749b
mov esi, dword [esp + 0x58]
mov dword [esi + 8], ebx
jmp 0x4175eb
jle 0x4174c2
lea edx, [ebx + ebx*8]
sub eax, ebx
lea edi, [ecx + edx*4]
mov ecx, eax
dec eax
test ecx, ecx
je 0x4174c2
inc eax
mov dword [esp + 0x58], eax
mov edx, dword [edi]
push 0
mov ecx, edi
call dword [edx + 4]
mov eax, dword [esp + 0x58]
add edi, 0x24
dec eax
mov dword [esp + 0x58], eax
jne 0x4174e0
mov dword [esi + 8], ebx
jmp 0x4175eb
mov ecx, dword [esi + 0x10]
cmp ecx, edi
jne 0x41752a
cdq
and edx, 7
add eax, edx
mov ecx, eax
sar ecx, 3
cmp ecx, 4
jge 0x41751d
mov ecx, 4
jmp 0x41752a
cmp ecx, 0x400
jle 0x41752a
mov ecx, 0x400
mov eax, dword [esi + 0xc]
add eax, ecx
cmp ebx, eax
jge 0x417539
mov dword [esp + 0x10], eax
jmp 0x41753f
mov dword [esp + 0x10], ebx
mov eax, ebx
lea eax, [eax + eax*8]
shl eax, 2
push eax
call sub.MFC42.DLL_operatornew
mov ecx, dword [esi + 8]
mov esi, dword [esi + 4]
mov edi, eax
mov dword [esp + 0x1c], eax
lea ecx, [ecx + ecx*8]
add esp, 4
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x58]
mov ecx, dword [ecx + 8]
sub edx, ecx
lea ecx, [ecx + ecx*8]
lea edi, [eax + ecx*4]
lea ecx, [edx + edx*8]
shl ecx, 2
mov esi, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x14], edi
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, edx
dec edx
test eax, eax
je 0x4175ca
mov esi, dword [esp + 0x14]
lea edi, [edx + 1]
mov dword [esp + 0x20], esi
test esi, esi
mov byte [esp + 0x50], 3
je 0x4175bb
mov ecx, esi
call fcn.00417ad0
add esi, 0x24
dec edi
mov byte [esp + 0x50], 0
mov dword [esp + 0x14], esi
jne 0x4175a7
mov esi, dword [esp + 0x58]
mov eax, dword [esi + 4]
push eax
call sub.MFC42.DLL_operatordelete
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
add esp, 4
mov dword [esi + 4], ecx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], edx
mov edx, dword [esi + 4]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x20]
lea ecx, [eax + eax*8]
lea ecx, [edx + ecx*4]
call fcn.00417ea0
lea ecx, [esp + 0x24]
mov dword [esp + 0x50], 0xffffffff
call fcn.00417b50
pop ebx
add ebp, 0xcc
mov ecx, 0x42b700
push ebp
call fcn.00418b20
mov ecx, dword [esp + 0x44]
pop edi
pop esi
mov eax, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x44
ret 4