Function at 0x406fd5
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x14
test eax, eax
jge 0x406ff3
mov ecx, dword [0x46b5c8]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x473618]
push esi
push edi
lea edi, [ecx + eax*2]
mov eax, 0x462d60
cmp dword [ebp + 8], eax
mov esi, eax
jb 0x407020
mov ecx, dword [ebp + 8]
sub ecx, eax
sar ecx, 1
cmp ecx, 0x4008
jae 0x407020
mov esi, dword [ebp + 8]
and dword [ebp + 8], 0
movzx ecx, word [edi]
test cx, cx
je 0x407201
push ebx
mov edx, esi
sub edx, eax
and edx, 0xfffffffe
cmp edx, 0x4008
jge 0x407200
push 2
movzx ecx, cx
pop edx
add edi, edx
cmp cx, 4
jae 0x4071e1
mov al, byte [edi]
movzx edx, byte [edi + 1]
and edx, 0x7f
movzx ebx, al
and ebx, 0x7f
shl edx, 7
or edx, ebx
movzx eax, al
mov dword [ebp - 4], edx
mov edx, 0x8000
mov ebx, eax
or ebx, edx
mov dword [ebp - 0x14], ebx
movzx ebx, byte [edi + 1]
mov dword [ebp - 8], ebx
or ebx, edx
push 2
mov dword [ebp - 0xc], ebx
pop ebx
add edi, ebx
cmp cx, bx
mov dword [ebp - 0x10], eax
jne 0x40717d
cmp dword [0x4736a4], 0
je 0x4070a1
push 4
pop ebx
test al, al
jns 0x4070e0
mov ecx, eax
and ecx, 0x40
push ecx
mov ecx, dword [0x473618]
push esi
and eax, 0x3f
lea eax, [ecx + eax*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.0040685a
cmp word [esi], 0
jne 0x407169
push dword [ebp - 8]
push esi
call fcn.00406fd5
jmp 0x407163
cmp eax, 0x25
jne 0x4070f3
push 0x2004
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x407163
cmp eax, 0x24
jne 0x40715f
push 0x2004
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor ebx, ebx
jmp 0x40715f
mov eax, dword [0x4735f0]
dec ebx
test eax, eax
je 0x407127
push esi
push 0
push 0
push dword [ebp + ebx*4 - 0x14]
push dword [0x4735f4]
call eax
test eax, eax
je 0x407163
lea eax, [ebp + 0xc]
push eax
push dword [ebp + ebx*4 - 0x14]
push dword [0x4735f4]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40715b
push esi
push dword [ebp + 0xc]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [ebp + 0xc]
mov dword [ebp - 4], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp dword [ebp - 4], 0
jne 0x407163
and word [esi], 0
test ebx, ebx
jne 0x407108
cmp word [esi], 0
je 0x4071b5
cmp dword [ebp - 8], 0x1a
jne 0x4071b5
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x4071b5
cmp cx, 3
jne 0x4071bd
mov ebx, dword [ebp - 4]
cmp ebx, 0x1d
jne 0x407199
push dword [0x4735f4]
push esi
call fcn.004068d3
jmp 0x4071ad
mov eax, ebx
imul eax, eax, 0x4008
add eax, section..ndata
push eax
push esi
call fcn.0040698c
add ebx, 0xffffffeb
cmp ebx, 7
jae 0x4071d0
push esi
call fcn.004069c9
jmp 0x4071d0
cmp cx, 1
jne 0x4071d0
or eax, 0xffffffff
sub eax, dword [ebp - 4]
push eax
push esi
call fcn.00406fd5
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
mov eax, 0x462d60
jmp 0x4071f4
jne 0x4071ef
mov cx, word [edi]
mov word [esi], cx
add esi, edx
add edi, edx
jmp 0x4071f4
mov word [esi], cx
add esi, edx
movzx ecx, word [edi]
test cx, cx
jne 0x40702d
pop ebx
and word [esi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
je 0x407216
push eax
push dword [ebp + 8]
call fcn.0040698c
leave
ret 8