Function at 0x406ae7
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0xc]
test eax, eax
jge 0x406b05
mov ecx, dword [0x43471c]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x435778]
push ebx
push esi
push edi
lea ecx, [ecx + eax*2]
mov eax, str.Call
cmp dword [ebp + 8], eax
mov edi, eax
jb 0x406d3a
mov edx, dword [ebp + 8]
sub edx, eax
sar edx, 1
cmp edx, 0x800
jae 0x406d3a
mov edi, dword [ebp + 8]
and dword [ebp + 8], 0
jmp 0x406d3a
mov esi, edi
sub esi, eax
and esi, 0xfffffffe
cmp esi, 0x800
jge 0x406d49
push 2
mov esi, 0xe000
pop ebx
add ecx, ebx
test si, dx
je 0x406d24
cmp dx, si
jbe 0x406d27
movzx eax, word [ecx]
mov esi, eax
and eax, 0xff
mov ebx, eax
mov eax, 0x8000
mov edx, ebx
and esi, 0x7fff
or edx, eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], edx
movzx edx, byte [ecx + 1]
mov dword [ebp - 0xc], edx
or edx, eax
inc ecx
mov dword [ebp - 0x10], edx
inc ecx
cmp word [ebp + 0xc], 0xe002
mov dword [ebp - 8], ecx
jne 0x406cc7
push 2
pop esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x406bd2
cmp ax, 0x5a04
je 0x406bd2
cmp dword [ebp - 0xc], 0x23
je 0x406bd2
cmp dword [ebp - 0xc], 0x2e
je 0x406bd2
and dword [ebp + 0xc], 0
jmp 0x406bd9
mov dword [ebp + 0xc], 1
cmp dword [0x4357a4], 0
je 0x406be5
push 4
pop esi
test bl, bl
jns 0x406c23
mov eax, ebx
and ebx, 0x3f
and eax, 0x40
push eax
mov eax, dword [0x435778]
push edi
lea eax, [eax + ebx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.0040697a
cmp word [edi], 0
jne 0x406cae
push dword [ebp - 0xc]
push edi
call fcn.00406ae7
jmp 0x406ca8
cmp ebx, 0x25
jne 0x406c36
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406ca8
cmp ebx, 0x24
jne 0x406ca4
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor esi, esi
jmp 0x406ca4
mov eax, dword [0x435744]
xor ecx, ecx
dec esi
cmp eax, ecx
je 0x406c6f
cmp dword [ebp + 0xc], ecx
je 0x406c6f
push edi
push ecx
push ecx
push dword [ebp + esi*4 - 0x18]
push dword [0x435748]
call eax
test eax, eax
je 0x406ca8
lea eax, [ebp - 4]
push eax
push dword [ebp + esi*4 - 0x18]
push dword [0x435748]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x406ca0
push edi
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [ebp - 4]
mov ebx, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebx, ebx
jne 0x406ca8
and word [edi], 0
test esi, esi
jne 0x406c4b
cmp word [edi], 0
je 0x406cbf
cmp dword [ebp - 0xc], 0x1a
jne 0x406cbf
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call sub.KERNEL32.dll_lstrcatW
push edi
call fcn.00406d63
jmp 0x406d11
cmp word [ebp + 0xc], 0xe001
jne 0x406cfd
cmp esi, 0x1d
jne 0x406ce2
push dword [0x435748]
push edi
call fcn.004069f4
jmp 0x406cf3
mov eax, esi
shl eax, 0xb
add eax, section..ndata
push eax
push edi
call fcn.00406aad
add esi, 0xffffffeb
cmp esi, 7
jae 0x406d11
jmp 0x406cbf
cmp word [ebp + 0xc], 0xe003
jne 0x406d11
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.00406ae7
push edi
call sub.KERNEL32.dll_lstrlenW
mov ecx, dword [ebp - 8]
lea edi, [edi + eax*2]
mov eax, str.Call
jmp 0x406d3a
cmp dx, si
jne 0x406d35
mov dx, word [ecx]
mov word [edi], dx
add edi, ebx
add ecx, ebx
jmp 0x406d3a
mov word [edi], dx
add edi, ebx
mov dx, word [ecx]
test dx, dx
mov dword [ebp + 0xc], edx
jne 0x406b40
and word [edi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
pop ebx
je 0x406d5f
push eax
push dword [ebp + 8]
call fcn.00406aad
leave
ret 8