Function at 0x406bb6
Capabilities:
Check if file exists
Create directory
Get file attributes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov eax, dword [eax + 0xbc]
mov dword [ebp - 4], 0x20a
test eax, eax
je 0x406eaa
push str.SONIQUE
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x406eaa
and byte [ebp - 0x210], al
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x210]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionApp_Paths_sonique.exe
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
jne 0x406c39
dec dword [ebp - 4]
mov eax, dword [ebp - 4]
test eax, eax
jle 0x406c39
cmp byte [ebp + eax - 0x210], 0x5c
je 0x406c2e
dec eax
test eax, eax
jg 0x406c1d
jmp 0x406c39
and byte [ebp + eax - 0x210], 0
mov dword [ebp - 4], eax
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea eax, [ebp - 0x210]
push eax
call esi
cmp eax, 0xffffffff
je 0x406c5a
lea eax, [ebp - 0x210]
push eax
call esi
test al, 0x10
jne 0x406c6c
lea eax, [ebp - 0x210]
push str.C:Program_FilesSonique
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x210]
push eax
call esi
cmp eax, 0xffffffff
je 0x406c87
lea eax, [ebp - 0x210]
push eax
call esi
test al, 0x10
jne 0x406c99
lea eax, [ebp - 0x210]
push str.C:Sonique
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x210]
push eax
call esi
cmp eax, 0xffffffff
je 0x406cb4
lea eax, [ebp - 0x210]
push eax
call esi
test al, 0x10
jne 0x406cc6
lea eax, [ebp - 0x210]
push 0x4179ac
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
lea eax, [ebp - 0x210]
push str.Please_select_your_Sonique_directory._Press_cancel_if_you_do_not_have_Sonique_or_do_not_wish_to_install_the_Sonique_plugin.
push eax
lea eax, [ebp - 0x210]
push eax
push dword [0x42552c]
call fcn.0040bf69
add esp, 0x14
test eax, eax
je 0x406dbe
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0x210]
push eax
call esi
cmp eax, 0xffffffff
je 0x406dbe
lea eax, [ebp - 0x210]
push eax
call esi
test al, 0x10
je 0x406dbe
lea eax, [ebp - 0x210]
push str._sonique.exe
push eax
call edi
lea eax, [ebp - 0x210]
push eax
call esi
cmp eax, 0xffffffff
jne 0x406dc5
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x41c]
push str.The_directory:_n_n_s_n_ndoes_not_appear_to_be_a_valid_Sonique_installation._n_nPress_yes_to_install_to_this_directory._n_nPress_no_to_choose_another_directory._n_nPress_cancel_to_abort_the_sonique_plugin_installation._n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x41c]
push 0x23
push str.Invalid_Sonique_directory
push eax
push dword [0x42552c]
call dword [sym.imp.USER32.dll_MessageBoxA]
dec eax
dec eax
je 0x406dbe
sub eax, 5
jne 0x406dc5
lea eax, [ebp - 0x210]
push eax
call ebx
and byte [ebp + eax - 0x21c], 0
mov dword [ebp - 4], eax
push 0
lea eax, [ebp - 0x210]
push str.Please_select_your_Sonique_directory._Press_cancel_if_you_do_not_have_Sonique_or_do_not_wish_to_install_the_Sonique_plugin.
push eax
lea eax, [ebp - 0x210]
push eax
push dword [0x42552c]
call fcn.0040bf69
add esp, 0x14
test eax, eax
jne 0x406cfd
push 8
jmp 0x406e70
lea eax, [ebp - 0x210]
push eax
call ebx
and byte [ebp + eax - 0x21c], 0
mov dword [ebp - 4], eax
lea eax, [ebp - 0x210]
push str._vis
push eax
call edi
lea eax, [ebp - 0x210]
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp eax, 0xffffffff
je 0x406e08
lea eax, [ebp - 0x210]
push eax
call esi
test al, 0x10
jne 0x406e17
lea eax, [ebp - 0x210]
push 0
push eax
call ebx
test eax, eax
je 0x406dbe
lea eax, [ebp - 0x210]
push 0x417820
push eax
call edi
lea eax, [ebp - 0x210]
push eax
call esi
cmp eax, 0xffffffff
je 0x406e40
lea eax, [ebp - 0x210]
push eax
call esi
test al, 0x10
jne 0x406e53
lea eax, [ebp - 0x210]
push 0
push eax
call ebx
test eax, eax
je 0x406dbe
lea eax, [ebp - 0x210]
push eax
push 0x425318
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
call fcn.0040cd19
test eax, eax
jne 0x406e73
push 6
pop eax
jmp 0x406eac
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x44]
cmp ecx, 0xffffffff
jle 0x406eaa
mov ecx, dword [eax + ecx*4 + 0xf0]
mov dword [ecx + 8], 1
lea ecx, [ebp - 0x210]
push ecx
mov ecx, dword [eax + 0x44]
mov ecx, dword [eax + ecx*4 + 0xf0]
call fcn.00401e00
test eax, eax
jne 0x406eaa
push 5
jmp 0x406e70
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret