Function at 0x40669a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x18
test eax, eax
jge 0x4066b8
mov ecx, dword [0x42ad08]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x42bd58]
push esi
push edi
lea edi, [ecx + eax*2]
mov eax, 0x429cc0
cmp dword [ebp + 8], eax
mov esi, eax
jb 0x4066e5
mov ecx, dword [ebp + 8]
sub ecx, eax
sar ecx, 1
cmp ecx, 0x800
jae 0x4066e5
mov esi, dword [ebp + 8]
and dword [ebp + 8], 0
movzx ecx, word [edi]
test cx, cx
je 0x406902
push ebx
mov edx, esi
sub edx, eax
and edx, 0xfffffffe
cmp edx, 0x800
jge 0x406901
push 2
movzx ecx, cx
pop edx
add edi, edx
cmp cx, 4
jae 0x4068e2
mov al, byte [edi]
movzx edx, byte [edi + 1]
and edx, 0x7f
movzx ebx, al
shl edx, 7
and ebx, 0x7f
or edx, ebx
movzx ebx, al
mov dword [ebp + 0xc], edx
mov eax, 0x8000
mov edx, ebx
or edx, eax
mov dword [ebp - 0x18], edx
movzx edx, byte [edi + 1]
mov dword [ebp - 0xc], edx
or edx, eax
push 2
pop eax
add edi, eax
cmp cx, ax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], edx
jne 0x40687f
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x40677f
cmp ax, 0x5a04
je 0x40677f
cmp dword [ebp - 0xc], 0x23
je 0x40677f
cmp dword [ebp - 0xc], 0x2e
je 0x40677f
and dword [ebp - 4], 0
jmp 0x406786
mov dword [ebp - 4], 1
cmp dword [0x42bde4], 0
je 0x406796
mov dword [ebp + 0xc], 4
test bl, bl
jns 0x4067d4
mov eax, ebx
and eax, 0x40
push eax
mov eax, dword [0x42bd58]
push esi
and ebx, 0x3f
lea eax, [eax + ebx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406096
cmp word [esi], 0
jne 0x40686b
push dword [ebp - 0xc]
push esi
call fcn.0040669a
jmp 0x406865
cmp ebx, 0x25
jne 0x4067e7
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406865
cmp ebx, 0x24
jne 0x40685f
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
and dword [ebp + 0xc], 0
jmp 0x40685f
mov eax, dword [0x42bd20]
dec dword [ebp + 0xc]
xor ecx, ecx
cmp eax, ecx
je 0x406827
cmp dword [ebp - 4], ecx
je 0x406827
push esi
push ecx
push ecx
mov ecx, dword [ebp + 0xc]
push dword [ebp + ecx*4 - 0x18]
push dword [0x42bd24]
call eax
test eax, eax
je 0x406865
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 0xc]
push dword [ebp + eax*4 - 0x18]
push dword [0x42bd24]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40685b
push esi
push dword [ebp - 8]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [ebp - 8]
mov ebx, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebx, ebx
jne 0x406865
and word [esi], 0
cmp dword [ebp + 0xc], 0
jne 0x4067fe
cmp word [esi], 0
je 0x4068b6
cmp dword [ebp - 0xc], 0x1a
jne 0x4068b6
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x4068b6
cmp cx, 3
jne 0x4068be
cmp dword [ebp + 0xc], 0x1d
jne 0x406899
push dword [0x42bd24]
push esi
call fcn.00406110
jmp 0x4068ab
mov eax, dword [ebp + 0xc]
shl eax, 0xb
add eax, section..ndata
push eax
push esi
call fcn.004061c9
mov eax, dword [ebp + 0xc]
add eax, 0xffffffeb
cmp eax, 7
jae 0x4068d1
push esi
call fcn.004061eb
jmp 0x4068d1
cmp cx, 1
jne 0x4068d1
or eax, 0xffffffff
sub eax, dword [ebp + 0xc]
push eax
push esi
call fcn.0040669a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
mov eax, 0x429cc0
jmp 0x4068f5
jne 0x4068f0
mov cx, word [edi]
mov word [esi], cx
add esi, edx
add edi, edx
jmp 0x4068f5
mov word [esi], cx
add esi, edx
movzx ecx, word [edi]
test cx, cx
jne 0x4066f2
pop ebx
and word [esi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
je 0x406917
push eax
push dword [ebp + 8]
call fcn.004061c9
leave
ret 8