Function at 0x405e89
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x18
test eax, eax
jns 0x405ea5
mov ecx, dword [0x434a00]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x435a58]
mov edx, 0x4339c0
push ebx
push ebp
mov ebp, dword [esp + 0x24]
lea ebx, [ecx + eax*2]
xor ecx, ecx
push edi
mov edi, edx
cmp ebp, edx
jb 0x405ed7
mov eax, ebp
sub eax, edx
sar eax, 1
cmp eax, 0x800
jae 0x405ed7
mov edi, ebp
mov ebp, ecx
mov dword [esp + 0x28], ebp
movzx ecx, word [ebx]
test cx, cx
je 0x40610f
push esi
push 2
pop esi
mov eax, edi
mov ebp, ebx
sub eax, edx
and eax, 0xfffffffe
cmp eax, 0x800
jge 0x40610a
push 4
movzx edx, cx
add ebx, esi
pop eax
cmp dx, ax
jae 0x4060e5
movsx esi, byte [ebp + 3]
movsx eax, byte [ebx]
and esi, 0x7f
movzx ecx, byte [ebx]
and eax, 0x7f
shl esi, 7
or esi, eax
mov dword [esp + 0x1c], ecx
mov eax, ecx
or eax, 0x8000
mov dword [esp + 0x18], eax
movzx eax, byte [ebx + 1]
mov ebx, eax
mov dword [esp + 0x24], eax
or eax, 0x8000
mov dword [esp + 0x10], ebx
push 2
mov dword [esp + 0x24], eax
lea ebx, [ebp + 4]
pop eax
mov dword [esp + 0x14], ebx
cmp dx, ax
jne 0x40608d
mov eax, dword [0x435a20]
test eax, eax
jns 0x405f83
mov edx, 0x5a04
cmp ax, dx
je 0x405f83
mov eax, dword [esp + 0x10]
cmp ax, 0x23
je 0x405f83
cmp ax, 0x2e
je 0x405f83
xor esi, esi
mov ebp, esi
jmp 0x405f8a
xor eax, eax
xor esi, esi
lea ebp, [eax + 1]
cmp dword [0x435ae4], 0
push 2
pop eax
mov ebx, eax
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x405fe0
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
push edi
lea eax, [ecx*2]
add eax, dword [0x435a58]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406984
cmp word [edi], si
mov esi, dword [esp + 0x24]
jne 0x406069
push esi
push edi
call fcn.00405e89
jmp 0x406069
cmp ecx, 0x25
jne 0x405ff3
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406065
cmp ecx, 0x24
jne 0x406006
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x406065
mov eax, dword [0x434a10]
dec ebx
test eax, eax
je 0x406027
test ebp, ebp
je 0x406027
push edi
push esi
push esi
push dword [esp + ebx*4 + 0x24]
push dword [0x434a18]
call eax
test eax, eax
je 0x406065
lea eax, [esp + 0x30]
push eax
push dword [esp + ebx*4 + 0x1c]
push dword [0x434a18]
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x40605a
push edi
push dword [esp + 0x34]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x30]
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x406065
xor eax, eax
mov word [edi], ax
push eax
pop esi
test ebx, ebx
jne 0x406006
mov esi, dword [esp + 0x24]
xor ecx, ecx
cmp word [edi], cx
je 0x406081
cmp esi, 0x1a
jne 0x406081
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.00406d4a
mov ebx, dword [esp + 0x14]
jmp 0x4060d7
cmp edx, 3
jne 0x4060c6
cmp esi, 0x1d
jne 0x4060a5
push dword [0x434a18]
push edi
call fcn.0040662c
jmp 0x4060d7
mov eax, esi
shl eax, 0xb
add eax, section..ndata
push eax
push edi
call fcn.00406b27
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x4060d7
push edi
call fcn.00406d4a
jmp 0x4060d7
xor eax, eax
inc eax
cmp dx, ax
jne 0x4060d7
not esi
push esi
push edi
call fcn.00405e89
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
add eax, eax
pop esi
jmp 0x4060f7
jne 0x4060f2
mov ax, word [ebx]
lea ebx, [ebp + 4]
mov word [edi], ax
jmp 0x4060f5
mov word [edi], dx
mov eax, esi
movzx ecx, word [ebx]
add edi, eax
mov edx, 0x4339c0
test cx, cx
jne 0x405ee7
mov ebp, dword [esp + 0x2c]
pop esi
xor eax, eax
mov word [edi], ax
test ebp, ebp
je 0x406121
push edx
push ebp
call fcn.00406b27
jmp 0x406123
mov eax, edx
pop edi
pop ebp
pop ebx
add esp, 0x18
ret 8