Function at 0x405dc3
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x18
test eax, eax
jge 0x405de1
mov ecx, dword [0x433e7c]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x434ed8]
push ebx
lea ecx, [ecx + eax*2]
mov eax, 0x432e40
push esi
push edi
cmp dword [ebp + 8], eax
mov esi, eax
jb 0x40600f
mov edx, dword [ebp + 8]
sub edx, eax
sar edx, 1
cmp edx, 0x800
jae 0x40600f
mov esi, dword [ebp + 8]
and dword [ebp + 8], 0
jmp 0x40600f
mov edx, esi
sub edx, eax
and edx, 0xfffffffe
cmp edx, 0x800
jge 0x40601b
push 2
pop edx
add ecx, edx
mov dword [ebp - 4], ecx
cmp di, 4
jae 0x405ffc
mov al, byte [ecx + 1]
mov cl, byte [ecx]
mov bl, cl
mov dl, al
movzx eax, al
and edx, 0x7f
and ebx, 0x7f
shl edx, 7
add dword [ebp - 4], 2
or edx, ebx
mov dword [ebp + 0xc], edx
movzx ebx, cl
mov edx, ebx
mov ecx, 0x8000
or edx, ecx
mov dword [ebp - 0xc], eax
or eax, ecx
cmp di, 2
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x10], eax
jne 0x405f9d
push 2
pop edi
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x405ea8
cmp ax, 0x5a04
je 0x405ea8
cmp dword [ebp - 0xc], 0x23
je 0x405ea8
cmp dword [ebp - 0xc], 0x2e
je 0x405ea8
and dword [ebp + 0xc], 0
jmp 0x405eaf
mov dword [ebp + 0xc], 1
cmp dword [0x434f24], 0
je 0x405ebb
push 4
pop edi
test bl, bl
jns 0x405ef9
mov eax, ebx
and ebx, 0x3f
and eax, 0x40
push eax
mov eax, dword [0x434ed8]
push esi
lea eax, [eax + ebx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00405c6e
cmp word [esi], 0
jne 0x405f84
push dword [ebp - 0xc]
push esi
call fcn.00405dc3
jmp 0x405f7e
cmp ebx, 0x25
jne 0x405f0c
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x405f7e
cmp ebx, 0x24
jne 0x405f7a
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor edi, edi
jmp 0x405f7a
xor ecx, ecx
mov eax, dword [0x434ea4]
dec edi
cmp eax, ecx
je 0x405f45
cmp dword [ebp + 0xc], ecx
je 0x405f45
push esi
push ecx
push ecx
push dword [ebp + edi*4 - 0x18]
push dword [0x434ea8]
call eax
test eax, eax
je 0x405f7e
lea eax, [ebp - 8]
push eax
push dword [ebp + edi*4 - 0x18]
push dword [0x434ea8]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x405f76
push esi
push dword [ebp - 8]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov ebx, eax
push dword [ebp - 8]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebx, ebx
jne 0x405f7e
and word [esi], 0
test edi, edi
jne 0x405f21
cmp word [esi], 0
je 0x405f95
cmp dword [ebp - 0xc], 0x1a
jne 0x405f95
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call sub.KERNEL32.dll_lstrcatW
push esi
call fcn.00406035
jmp 0x405fe9
cmp di, 3
jne 0x405fd6
cmp dword [ebp + 0xc], 0x1d
jne 0x405fb7
push dword [0x434ea8]
push esi
call fcn.00405ce8
jmp 0x405fc9
mov eax, dword [ebp + 0xc]
shl eax, 0xb
add eax, section..ndata
push eax
push esi
call fcn.00405da1
mov eax, dword [ebp + 0xc]
add eax, 0xffffffeb
cmp eax, 7
jae 0x405fe9
jmp 0x405f95
cmp di, 1
jne 0x405fe9
or eax, 0xffffffff
sub eax, dword [ebp + 0xc]
push eax
push esi
call fcn.00405dc3
push esi
call sub.KERNEL32.dll_lstrlenW
lea esi, [esi + eax*2]
mov eax, 0x432e40
mov ecx, dword [ebp - 4]
jmp 0x40600f
jne 0x40600a
mov di, word [ecx]
mov word [esi], di
add esi, edx
add ecx, edx
jmp 0x40600f
mov word [esi], di
add esi, edx
mov di, word [ecx]
test di, di
jne 0x405e1c
and word [esi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
pop ebx
je 0x406031
push eax
push dword [ebp + 8]
call fcn.00405da1
leave
ret 8