Function at 0x4064f6
Capabilities:
Get common file path

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x20
test ecx, ecx
jns 0x406512
lea eax, [ecx*4 + 4]
mov ecx, dword [0x92dd80]
sub ecx, eax
mov ecx, dword [ecx]
mov eax, dword [0x959cf8]
mov edx, 0x901e20
push ebx
push ebp
mov ebp, dword [esp + 0x2c]
lea ebx, [eax + ecx*2]
xor ecx, ecx
push edi
mov edi, edx
cmp ebp, edx
jb 0x406543
mov eax, ebp
sub eax, edx
sar eax, 1
cmp eax, 0x15f90
jae 0x406543
mov edi, ebp
mov ebp, ecx
mov dword [esp + 0x30], ebp
movzx ecx, word [ebx]
test cx, cx
je 0x406799
push esi
mov esi, 0xe000
xor ebp, ebp
mov eax, edi
sub eax, edx
and eax, 0xfffffffe
cmp eax, 0x15f90
jge 0x406794
movzx ecx, cx
add ebx, 2
test esi, ecx
je 0x40676f
cmp cx, si
jbe 0x406772
movzx edx, word [ebx]
add ebx, 2
movzx eax, dl
mov esi, edx
mov dword [esp + 0x18], eax
and esi, 0x7fff
mov dword [esp + 0x24], eax
or eax, 0x8000
shr edx, 8
mov dword [esp + 0x20], eax
mov eax, edx
or eax, 0x8000
mov dword [esp + 0x38], edx
mov dword [esp + 0x28], eax
mov eax, 0xe002
mov dword [esp + 0x2c], edx
mov dword [esp + 0x1c], ebx
cmp cx, ax
jne 0x406704
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov esi, dword [esp + 0x38]
test eax, eax
jns 0x4065f0
mov ecx, 0x5a04
cmp ax, cx
je 0x4065f0
cmp esi, 0x23
je 0x4065f0
mov dword [esp + 0x10], ebp
cmp esi, 0x2e
jne 0x4065f8
mov dword [esp + 0x10], 1
cmp dword [0x959d84], 0
mov ecx, dword [esp + 0x18]
push 2
pop ebx
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x406647
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
mov eax, dword [0x959cf8]
push edi
lea eax, [eax + ecx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00407032
cmp word [edi], bp
jne 0x4066e5
push esi
push edi
call fcn.004064f6
jmp 0x4066e0
cmp ecx, 0x25
jne 0x40665d
push 0xafc8
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x4066e0
cmp ecx, 0x24
jne 0x406674
push 0xafc8
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor ecx, ecx
mov ebx, ecx
jmp 0x406676
xor ecx, ecx
test ebx, ebx
je 0x4066de
mov ebp, dword [esp + 0x10]
mov eax, dword [0x92dd90]
dec ebx
test eax, eax
je 0x40669f
test ebp, ebp
je 0x40669f
push edi
push ecx
push ecx
push dword [esp + ebx*4 + 0x2c]
push dword [0x92dd98]
call eax
test eax, eax
je 0x4066de
lea eax, [esp + 0x14]
push eax
push dword [esp + ebx*4 + 0x24]
push dword [0x92dd98]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x4066d3
push edi
push dword [esp + 0x18]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x14]
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x4066de
xor eax, eax
mov word [edi], ax
push eax
pop ecx
test ebx, ebx
jne 0x40667e
xor ebp, ebp
cmp word [edi], bp
je 0x4066f8
cmp dword [esp + 0x38], 0x1a
jne 0x4066f8
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.0040737f
mov ebx, dword [esp + 0x1c]
jmp 0x406759
mov eax, 0xe001
cmp cx, ax
jne 0x406743
cmp esi, 0x1d
jne 0x406721
push dword [0x92dd98]
push edi
call fcn.00407235
jmp 0x406733
imul eax, esi, 0x15f90
add eax, section..ndata
push eax
push edi
call fcn.00407254
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x406759
push edi
call fcn.0040737f
jmp 0x406759
mov eax, 0xe003
cmp cx, ax
jne 0x406759
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.004064f6
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, 0x901e20
mov esi, 0xe000
lea edi, [edi + eax*2]
jmp 0x406788
cmp cx, si
jne 0x406782
mov ax, word [ebx]
mov word [edi], ax
add edi, 2
add ebx, 2
jmp 0x406788
mov word [edi], cx
add edi, 2
movzx ecx, word [ebx]
test cx, cx
jne 0x406557
mov ebp, dword [esp + 0x34]
pop esi
xor eax, eax
mov word [edi], ax
test ebp, ebp
je 0x4067ab
push edx
push ebp
call fcn.00407254
jmp 0x4067ad
mov eax, edx
pop edi
pop ebp
pop ebx
add esp, 0x20
ret 8