Function at 0x40688c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x14
test eax, eax
jge 0x4068aa
mov ecx, dword [0x428ce8]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x429d38]
push ebx
lea ebx, [ecx + eax*2]
mov eax, 0x427ca0
push edi
mov edi, eax
cmp dword [ebp + 8], eax
jb 0x4068d7
mov ecx, dword [ebp + 8]
sub ecx, eax
sar ecx, 1
cmp ecx, 0x800
jae 0x4068d7
mov edi, dword [ebp + 8]
and dword [ebp + 8], 0
movzx ecx, word [ebx]
test cx, cx
je 0x406ab6
push esi
mov edx, edi
sub edx, eax
and edx, 0xfffffffe
cmp edx, 0x800
jge 0x406ab5
movzx ecx, cx
push 2
pop edx
add ebx, edx
mov dword [ebp + 0xc], ecx
cmp cx, 4
jae 0x406a96
mov al, byte [ebx]
movsx esi, byte [ebx + 1]
and esi, 0x7f
movsx ecx, al
and ecx, 0x7f
shl esi, 7
movzx eax, al
or esi, ecx
mov ecx, 0x8000
mov edx, eax
or edx, ecx
mov dword [ebp - 0x14], edx
movzx edx, byte [ebx + 1]
mov dword [ebp - 8], edx
or edx, ecx
inc ebx
inc ebx
cmp word [ebp + 0xc], 2
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
jne 0x406a37
cmp dword [0x429dc4], 0
push 2
pop esi
je 0x40695a
push 4
pop esi
test al, al
jns 0x406999
mov ecx, eax
and ecx, 0x40
push ecx
mov ecx, dword [0x429d38]
push edi
and eax, 0x3f
lea eax, [ecx + eax*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.0040635d
cmp word [edi], 0
jne 0x406a23
push dword [ebp - 8]
push edi
call fcn.0040688c
jmp 0x406a1d
cmp eax, 0x25
jne 0x4069ac
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406a1d
cmp eax, 0x24
jne 0x406a19
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor esi, esi
jmp 0x406a19
mov eax, dword [0x429d00]
dec esi
test eax, eax
je 0x4069e0
push edi
push 0
push 0
push dword [ebp + esi*4 - 0x14]
push dword [0x429d04]
call eax
test eax, eax
je 0x406a1d
lea eax, [ebp - 4]
push eax
push dword [ebp + esi*4 - 0x14]
push dword [0x429d04]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x406a14
push edi
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 0x406a1d
xor eax, eax
mov word [edi], ax
test esi, esi
jne 0x4069c1
cmp word [edi], 0
je 0x406a6a
cmp dword [ebp - 8], 0x1a
jne 0x406a6a
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x406a6a
cmp word [ebp + 0xc], 3
jne 0x406a72
cmp esi, 0x1d
jne 0x406a51
push dword [0x429d04]
push edi
call fcn.004063d8
jmp 0x406a62
mov eax, esi
shl eax, 0xb
add eax, section..ndata
push eax
push edi
call fcn.00406491
add esi, 0xffffffeb
cmp esi, 7
jae 0x406a85
push edi
call fcn.004064ce
jmp 0x406a85
cmp word [ebp + 0xc], 1
jne 0x406a85
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.0040688c
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [edi + eax*2]
mov eax, 0x427ca0
jmp 0x406aa9
jne 0x406aa4
mov cx, word [ebx]
mov word [edi], cx
add edi, edx
add ebx, edx
jmp 0x406aa9
mov word [edi], cx
add edi, edx
movzx ecx, word [ebx]
test cx, cx
jne 0x4068e4
pop esi
xor ecx, ecx
mov word [edi], cx
pop edi
pop ebx
cmp dword [ebp + 8], ecx
je 0x406acb
push eax
push dword [ebp + 8]
call fcn.00406491
leave
ret 8