Function at 0x40575e
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
push 0x3c
mov eax, 0x409167
call fcn.0040840e
xor edi, edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], edi
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 4], edi
call dword [sym.imp.ASOHelper.dll_public:_static_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______cdecl_CSystweakApp::GetRegAppPath_void_]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1c]
mov dword [esp], str.Selected
call dword [0x40a618]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 2
call dword [sym.imp.ASOHelper.dll_enum_PCO_ERROR_CODES___cdecl_STPathAppend_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t____const__]
pop ecx
pop ecx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, dword [ebp + 0xc]
push edi
push edi
push 0x1009
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp - 0x20]
mov eax, 0x2001f
lea ecx, [ebp - 0x34]
call fcn.00407332
test eax, eax
jne 0x405818
lea ecx, [ebp - 0x48]
call sub.mfc90u.dll_CStringArray::CStringArray
lea eax, [ebp - 0x48]
push eax
mov byte [ebp - 4], 3
push dword [ebp - 0x34]
call dword [sym.imp.ASOHelper.dll_long_int___cdecl_EnumerateValues_struct_HKEY____const__class_CStringArray__]
pop ecx
pop ecx
test eax, eax
je 0x405804
xor esi, esi
cmp dword [ebp - 0x40], edi
mov dword [ebp - 0x18], esi
jg 0x40584c
lea esi, [ebp - 0x34]
call fcn.00407372
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.00407636
mov eax, dword [ebp + 0xc]
push edi
push edi
push 0x1004
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [ebp - 0x20]
mov dword [0x411ef4], eax
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea esi, [ebp - 0x34]
call fcn.00407372
call fcn.004084ad
ret 8
mov esi, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
cmp esi, edi
mov byte [ebp - 4], 6
jl 0x405990
cmp esi, dword [ebp - 0x40]
jge 0x405990
mov eax, dword [ebp - 0x44]
lea eax, [eax + esi*4]
mov esi, dword [eax]
push 0x410
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer]
mov ebx, eax
lea eax, [ebp - 0x28]
push eax
push ebx
lea eax, [ebp - 0x24]
push eax
push edi
push esi
push dword [ebp - 0x34]
mov dword [ebp - 0x28], 0x820
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, edi
jne 0x4058e5
cmp dword [ebp - 0x24], 1
je 0x4058c4
cmp dword [ebp - 0x24], 2
je 0x4058c4
push 0xd
pop eax
jmp 0x4058e5
cmp ebx, edi
je 0x4058e3
mov eax, dword [ebp - 0x28]
cmp eax, edi
je 0x4058de
test al, 1
jne 0x4058bf
shr eax, 1
cmp word [ebx + eax*2 - 2], di
je 0x4058e3
jmp 0x4058bf
xor eax, eax
mov word [ebx], ax
xor eax, eax
xor ebx, ebx
cmp eax, edi
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
sete bl
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::ReleaseBuffer]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x1c]
push eax
lea esi, [ebp - 0x14]
call fcn.00401478
cmp ebx, edi
je 0x405961
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], edi
je 0x405961
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405961
mov eax, dword [ebp + 0xc]
push edi
push edi
push 0x1004
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
mov dword [ebp - 0x28], esp
push eax
call dword [0x40a624]
push ecx
lea eax, [ebp - 0x1c]
mov ecx, esp
mov dword [ebp - 0x2c], esp
push eax
mov byte [ebp - 4], 7
call dword [0x40a624]
push dword [ebp + 8]
mov byte [ebp - 4], 6
call fcn.00405589
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x40]
jl 0x405849
jmp 0x405804
call sub.mfc90u.dll_AfxThrowInvalidArgException
int3