Function at 0x4066c0
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x4412a4]
push ebx
push esi
push edi
test eax, eax
je 0x40671a
mov dword [0x4412a4], 0
call fcn.004065a0
dec eax
neg eax
sbb eax, eax
inc eax
mov dword [0x44e3f0], eax
je 0x40671a
lea eax, [ebp - 4]
lea ecx, [ebp - 8]
push eax
push 0x44e3f4
push ecx
push 0x441d30
push 0x441d3c
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 4], 0x104
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
mov esi, dword [ebp + 8]
push esi
call fcn.00409a60
add esp, 4
cmp eax, 5
jne 0x4067b0
mov ebx, dword [esi + 0xc]
test ebx, ebx
jne 0x406743
mov ebx, 0x44e4fc
test ebx, ebx
jne 0x406743
xor eax, eax
jmp 0x406777
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.0042a4e0
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, esi
mov esi, dword [ebp + 8]
push 0x5c
push 0
push eax
call dword [sym.imp.SHLWAPI.dll_StrRChrIA]
test eax, eax
je 0x4067b0
push 6
inc eax
push 0x441de0
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
jne 0x4067b0
call fcn.004065a0
cmp eax, 1
jne 0x4067b0
lea esp, [ebp - 0x21c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.00409a60
add esp, 4
cmp eax, 6
jne 0x406845
mov eax, dword [0x44e3f0]
test eax, eax
je 0x406845
mov ebx, dword [esi + 0xc]
test ebx, ebx
jne 0x4067df
mov ebx, 0x44e4fc
test ebx, ebx
jne 0x4067df
xor edx, edx
jmp 0x406813
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.0042a4e0
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, esi
mov esi, dword [ebp + 8]
mov edi, 0x44e3f4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x44e3f4
push edx
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
jne 0x406845
mov eax, 1
lea esp, [ebp - 0x21c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [esi + 0xc]
test ebx, ebx
jne 0x406859
mov ebx, 0x44e4fc
test ebx, ebx
jne 0x406859
xor eax, eax
jmp 0x40688d
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.0042a4e0
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, esi
mov esi, dword [ebp + 8]
push 0x441dd0
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x4068af
mov eax, 1
lea esp, [ebp - 0x21c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [esi + 0xc]
test ebx, ebx
jne 0x4068bb
mov ebx, 0x44e4fc
push ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
cmp eax, 0x16
jbe 0x406948
lea esi, [ebx + eax*2 - 0x14]
push 0x441db8
push esi
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
jne 0x406948
add esi, 0xfffffff0
push 8
push 0x441da4
push esi
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x406948
mov ecx, 0x81
lea edi, [ebp - 0x20e]
mov word [ebp - 0x210], ax
lea edx, [ebp - 0x210]
rep stosd dword es:[edi], eax
push 0x104
push edx
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
sub esi, ebx
sar esi, 1
cmp esi, eax
jne 0x406948
push eax
lea eax, [ebp - 0x210]
push eax
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x406948
mov eax, 1
lea esp, [ebp - 0x21c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea esp, [ebp - 0x21c]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret