Function at 0x40679d
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x18
test eax, eax
jge 0x4067bb
mov ecx, dword [0x46a5a8]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x4725f8]
push esi
push edi
lea edi, [ecx + eax*2]
mov eax, 0x461d40
cmp dword [ebp + 8], eax
mov esi, eax
jb 0x4067e8
mov ecx, dword [ebp + 8]
sub ecx, eax
sar ecx, 1
cmp ecx, 0x4008
jae 0x4067e8
mov esi, dword [ebp + 8]
and dword [ebp + 8], 0
movzx ecx, word [edi]
test cx, cx
je 0x406a08
push ebx
mov edx, esi
sub edx, eax
and edx, 0xfffffffe
cmp edx, 0x4008
jge 0x406a07
push 2
movzx ecx, cx
pop edx
add edi, edx
cmp cx, 4
jae 0x4069e8
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 0x406982
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x406882
cmp ax, 0x5a04
je 0x406882
cmp dword [ebp - 0xc], 0x23
je 0x406882
cmp dword [ebp - 0xc], 0x2e
je 0x406882
and dword [ebp - 4], 0
jmp 0x406889
mov dword [ebp - 4], 1
cmp dword [0x472684], 0
je 0x406899
mov dword [ebp + 0xc], 4
test bl, bl
jns 0x4068d7
mov eax, ebx
and eax, 0x40
push eax
mov eax, dword [0x4725f8]
push esi
and ebx, 0x3f
lea eax, [eax + ebx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406164
cmp word [esi], 0
jne 0x40696e
push dword [ebp - 0xc]
push esi
call fcn.0040679d
jmp 0x406968
cmp ebx, 0x25
jne 0x4068ea
push 0x2004
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406968
cmp ebx, 0x24
jne 0x406962
push 0x2004
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
and dword [ebp + 0xc], 0
jmp 0x406962
mov eax, dword [0x4725d0]
dec dword [ebp + 0xc]
xor ecx, ecx
cmp eax, ecx
je 0x40692a
cmp dword [ebp - 4], ecx
je 0x40692a
push esi
push ecx
push ecx
mov ecx, dword [ebp + 0xc]
push dword [ebp + ecx*4 - 0x18]
push dword [0x4725d4]
call eax
test eax, eax
je 0x406968
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 0xc]
push dword [ebp + eax*4 - 0x18]
push dword [0x4725d4]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40695e
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 0x406968
and word [esi], 0
cmp dword [ebp + 0xc], 0
jne 0x406901
cmp word [esi], 0
je 0x4069bc
cmp dword [ebp - 0xc], 0x1a
jne 0x4069bc
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x4069bc
cmp cx, 3
jne 0x4069c4
cmp dword [ebp + 0xc], 0x1d
jne 0x40699c
push dword [0x4725d4]
push esi
call fcn.004061de
jmp 0x4069b1
mov eax, dword [ebp + 0xc]
imul eax, eax, 0x4008
add eax, section..ndata
push eax
push esi
call fcn.00406297
mov eax, dword [ebp + 0xc]
add eax, 0xffffffeb
cmp eax, 7
jae 0x4069d7
push esi
call fcn.004062b9
jmp 0x4069d7
cmp cx, 1
jne 0x4069d7
or eax, 0xffffffff
sub eax, dword [ebp + 0xc]
push eax
push esi
call fcn.0040679d
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
mov eax, 0x461d40
jmp 0x4069fb
jne 0x4069f6
mov cx, word [edi]
mov word [esi], cx
add esi, edx
add edi, edx
jmp 0x4069fb
mov word [esi], cx
add esi, edx
movzx ecx, word [edi]
test cx, cx
jne 0x4067f5
pop ebx
and word [esi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
je 0x406a1d
push eax
push dword [ebp + 8]
call fcn.00406297
leave
ret 8