Function at 0x405e9b
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x10
test eax, eax
jge 0x405eb7
mov ecx, dword [0x434268]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x4352b8]
push ebx
lea ebx, [ecx + eax*2]
mov ecx, dword [esp + 0x18]
mov eax, 0x433220
cmp ecx, eax
push esi
mov esi, eax
jb 0x405ee6
mov edx, ecx
sub edx, eax
sar edx, 1
cmp edx, 0x800
jae 0x405ee6
and dword [esp + 0x1c], 0
mov esi, ecx
mov dx, word [ebx]
test dx, dx
je 0x4060d2
push ebp
push edi
mov ecx, esi
sub ecx, eax
and ecx, 0xfffffffe
cmp ecx, 0x800
jge 0x4060d0
push 2
pop ecx
mov edi, 0xe000
add ebx, ecx
test di, dx
je 0x4060ae
cmp dx, di
jbe 0x4060b1
movzx ecx, word [ebx]
mov eax, ecx
and eax, 0xff
mov edi, ecx
mov ebp, eax
or ebp, 0x8000
shr ecx, 8
mov dword [esp + 0x14], ebp
mov ebp, ecx
or ecx, 0x8000
and edi, 0x7fff
inc ebx
inc ebx
cmp dx, 0xe002
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ecx
jne 0x406055
cmp dword [0x435304], 0
push 2
pop edi
je 0x405f74
push 4
pop edi
test al, al
jns 0x405fb1
mov ecx, eax
and ecx, 0x40
push ecx
mov ecx, dword [0x4352b8]
push esi
and eax, 0x3f
lea eax, [ecx + eax*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00405784
cmp word [esi], 0
jne 0x40603a
push ebp
push esi
call fcn.00405e9b
jmp 0x406034
cmp eax, 0x25
jne 0x405fc4
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x406034
cmp eax, 0x24
jne 0x406030
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor edi, edi
jmp 0x406030
mov eax, dword [0x435280]
dec edi
test eax, eax
je 0x405ff8
push esi
push 0
push 0
push dword [esp + edi*4 + 0x1c]
push dword [0x435284]
call eax
test eax, eax
je 0x406034
lea eax, [esp + 0x28]
push eax
push dword [esp + edi*4 + 0x14]
push dword [0x435284]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40602c
push esi
push dword [esp + 0x2c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x28]
mov ebp, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebp, ebp
jne 0x406034
and word [esi], 0
test edi, edi
jne 0x405fd9
cmp word [esi], 0
je 0x40604d
cmp dword [esp + 0x18], 0x1a
jne 0x40604d
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
call fcn.004058e6
jmp 0x40609d
cmp dx, 0xe001
jne 0x40608a
cmp edi, 0x1d
jne 0x40606f
push dword [0x435284]
push esi
call fcn.004057fe
jmp 0x406080
mov eax, edi
shl eax, 0xb
add eax, section..ndata
push eax
push esi
call fcn.004058b7
add edi, 0xffffffeb
cmp edi, 7
jae 0x40609d
jmp 0x40604d
cmp dx, 0xe003
jne 0x40609d
or eax, 0xffffffff
sub eax, edi
push eax
push esi
call fcn.00405e9b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
mov eax, 0x433220
jmp 0x4060c4
cmp dx, di
jne 0x4060bf
mov dx, word [ebx]
mov word [esi], dx
add esi, ecx
add ebx, ecx
jmp 0x4060c4
mov word [esi], dx
add esi, ecx
mov dx, word [ebx]
test dx, dx
jne 0x405ef4
pop edi
pop ebp
and word [esi], 0
cmp dword [esp + 0x1c], 0
pop esi
pop ebx
je 0x4060e9
push eax
push dword [esp + 0x18]
call fcn.004058b7
add esp, 0x10
ret 8