Function at 0x40687a
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x10
test eax, eax
jge 0x406896
mov ecx, dword [0x429548]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x42a598]
push esi
push edi
lea edi, [ecx + eax*2]
mov ecx, dword [esp + 0x1c]
mov eax, 0x428500
cmp ecx, eax
mov esi, eax
jb 0x4068c5
mov edx, ecx
sub edx, eax
sar edx, 1
cmp edx, 0x800
jae 0x4068c5
and dword [esp + 0x1c], 0
mov esi, ecx
movzx ecx, word [edi]
test cx, cx
je 0x406ad3
push ebx
push ebp
mov edx, esi
sub edx, eax
and edx, 0xfffffffe
cmp edx, 0x800
jge 0x406ad1
movzx ebp, cx
push 2
pop ecx
add edi, ecx
cmp bp, 4
jae 0x406ab2
mov al, byte [edi]
movzx ecx, byte [edi + 1]
movzx ebx, byte [edi + 1]
and ecx, 0x7f
movzx edx, al
and edx, 0x7f
shl ecx, 7
or ecx, edx
movzx eax, al
mov dword [esp + 0x28], ecx
mov ecx, 0x8000
mov edx, eax
or edx, ecx
mov dword [esp + 0x10], edx
mov edx, ebx
or edx, ecx
push 2
pop ecx
add edi, ecx
cmp bp, cx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edx
jne 0x406a4f
xor ebp, ebp
cmp dword [0x42a624], ebp
mov dword [esp + 0x28], ecx
je 0x406958
mov dword [esp + 0x28], 4
test al, al
jns 0x406994
mov ecx, eax
and ecx, 0x40
push ecx
mov ecx, dword [0x42a598]
push esi
and eax, 0x3f
lea eax, [ecx + eax*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.0040632e
cmp word [esi], bp
jne 0x406a3c
push ebx
push esi
call fcn.0040687a
jmp 0x406a37
cmp eax, 0x25
jne 0x4069aa
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406a37
cmp eax, 0x24
jne 0x4069bf
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov dword [esp + 0x28], ebp
cmp dword [esp + 0x28], ebp
je 0x406a37
dec dword [esp + 0x28]
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + eax*4 + 0x10]
mov eax, dword [0x42a560]
and ebx, 0xffffffbf
mov ebp, ebx
and ebp, 0x8000
test eax, eax
je 0x4069f7
push esi
push 0
push 0
push ebx
push dword [0x42a564]
call eax
test eax, eax
je 0x406a31
push 8
call fcn.004065e3
movzx ecx, bl
push ebp
push ecx
push dword [0x42a564]
call eax
mov ebx, eax
test ebx, ebx
je 0x406a26
push esi
push ebx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push ebx
mov ebp, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebp, ebp
jne 0x406a31
and word [esi], 0
cmp dword [esp + 0x28], 0
jne 0x4069c5
mov ebx, dword [esp + 0x1c]
xor ebp, ebp
cmp word [esi], bp
je 0x406a85
cmp ebx, 0x1a
jne 0x406a85
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x406a85
cmp bp, 3
jne 0x406a8d
mov ebx, dword [esp + 0x28]
cmp ebx, 0x1d
jne 0x406a6c
push dword [0x42a564]
push esi
call fcn.004063a7
jmp 0x406a7d
mov eax, ebx
shl eax, 0xb
add eax, section..ndata
push eax
push esi
call fcn.00406460
add ebx, 0xffffffeb
cmp ebx, 7
jae 0x406aa1
push esi
call fcn.0040649d
jmp 0x406aa1
cmp bp, 1
jne 0x406aa1
or eax, 0xffffffff
sub eax, dword [esp + 0x28]
push eax
push esi
call fcn.0040687a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
mov eax, 0x428500
jmp 0x406ac5
jne 0x406ac0
mov dx, word [edi]
mov word [esi], dx
add esi, ecx
add edi, ecx
jmp 0x406ac5
mov word [esi], bp
add esi, ecx
movzx ecx, word [edi]
test cx, cx
jne 0x4068d3
pop ebp
pop ebx
and word [esi], 0
cmp dword [esp + 0x1c], 0
pop edi
pop esi
je 0x406aea
push eax
push dword [esp + 0x18]
call fcn.00406460
add esp, 0x10
ret 8