Function at 0x4066ab
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0xc]
test eax, eax
jge 0x4066c9
mov ecx, dword [0x7a7a7c]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x7a8ad8]
push ebx
push esi
push edi
lea edi, [ecx + eax*2]
mov eax, 0x7a6a40
cmp dword [ebp + 8], eax
mov esi, eax
jb 0x4066f7
mov ecx, dword [ebp + 8]
sub ecx, eax
sar ecx, 1
cmp ecx, 0x800
jae 0x4066f7
mov esi, dword [ebp + 8]
and dword [ebp + 8], 0
mov cx, word [edi]
test cx, cx
mov dword [ebp + 0xc], ecx
je 0x4068db
jmp 0x40670b
mov ecx, dword [ebp + 0xc]
mov edx, esi
sub edx, eax
and edx, 0xfffffffe
cmp edx, 0x800
jge 0x4068db
push 2
pop edx
add edi, edx
cmp cx, 4
jae 0x4068b9
mov cl, byte [edi + 1]
mov al, byte [edi]
mov dl, cl
mov bl, al
and edx, 0x7f
and ebx, 0x7f
shl edx, 7
movzx eax, al
or edx, ebx
mov ebx, eax
mov dword [ebp - 8], edx
mov edx, 0x8000
or ebx, edx
push 2
movzx ecx, cl
mov dword [ebp - 0x18], ebx
pop ebx
mov dword [ebp - 0xc], ecx
or ecx, edx
add edi, ebx
cmp word [ebp + 0xc], bx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
jne 0x40685d
cmp dword [0x7a8b24], 0
je 0x40677c
push 4
pop ebx
test al, al
jns 0x4067bb
mov ecx, eax
and eax, 0x3f
and ecx, 0x40
push ecx
mov ecx, dword [0x7a8ad8]
push esi
lea eax, [ecx + eax*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.0040653c
cmp word [esi], 0
jne 0x406844
push dword [ebp - 0xc]
push esi
call fcn.004066ab
jmp 0x40683e
cmp eax, 0x25
jne 0x4067ce
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x40683e
cmp eax, 0x24
jne 0x40683a
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor ebx, ebx
jmp 0x40683a
mov eax, dword [0x7a8aa4]
dec ebx
test eax, eax
je 0x406802
push esi
push 0
push 0
push dword [ebp + ebx*4 - 0x18]
push dword [0x7a8aa8]
call eax
test eax, eax
je 0x40683e
lea eax, [ebp - 4]
push eax
push dword [ebp + ebx*4 - 0x18]
push dword [0x7a8aa8]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x406836
push esi
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [ebp - 4]
mov dword [ebp + 0xc], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp dword [ebp + 0xc], 0
jne 0x40683e
and word [esi], 0
test ebx, ebx
jne 0x4067e3
cmp word [esi], 0
je 0x406855
cmp dword [ebp - 0xc], 0x1a
jne 0x406855
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call sub.KERNEL32.dll_lstrcatW
push esi
call fcn.004068f5
jmp 0x4068a9
cmp word [ebp + 0xc], 3
jne 0x406895
mov ebx, dword [ebp - 8]
cmp ebx, 0x1d
jne 0x40687a
push dword [0x7a8aa8]
push esi
call fcn.004065b5
jmp 0x40688b
mov eax, ebx
shl eax, 0xb
add eax, section..ndata
push eax
push esi
call fcn.0040666e
add ebx, 0xffffffeb
cmp ebx, 7
jae 0x4068a9
jmp 0x406855
cmp word [ebp + 0xc], 1
jne 0x4068a9
or eax, 0xffffffff
sub eax, dword [ebp - 8]
push eax
push esi
call fcn.004066ab
push esi
call sub.KERNEL32.dll_lstrlenW
lea esi, [esi + eax*2]
mov eax, 0x7a6a40
jmp 0x4068cc
jne 0x4068c7
mov cx, word [edi]
mov word [esi], cx
add esi, edx
add edi, edx
jmp 0x4068cc
mov word [esi], cx
add esi, edx
mov cx, word [edi]
test cx, cx
mov dword [ebp + 0xc], ecx
jne 0x406708
and word [esi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
pop ebx
je 0x4068f1
push eax
push dword [ebp + 8]
call fcn.0040666e
leave
ret 8