Function at 0x405dad
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x18
test eax, eax
jns 0x405dc9
mov ecx, dword [0x4339cc]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x434a38]
mov edx, 0x4329a0
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 0x405dfb
mov eax, ebp
sub eax, edx
sar eax, 1
cmp eax, 0x800
jae 0x405dfb
mov edi, ebp
mov ebp, ecx
mov dword [esp + 0x28], ebp
movzx ecx, word [ebx]
test cx, cx
je 0x406033
push esi
push 2
pop esi
mov eax, edi
mov ebp, ebx
sub eax, edx
and eax, 0xfffffffe
cmp eax, 0x800
jge 0x40602e
push 4
movzx edx, cx
add ebx, esi
pop eax
cmp dx, ax
jae 0x406009
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 0x405fb1
mov eax, dword [0x434a00]
test eax, eax
jns 0x405ea7
mov edx, 0x5a04
cmp ax, dx
je 0x405ea7
mov eax, dword [esp + 0x10]
cmp ax, 0x23
je 0x405ea7
cmp ax, 0x2e
je 0x405ea7
xor esi, esi
mov ebp, esi
jmp 0x405eae
xor eax, eax
xor esi, esi
lea ebp, [eax + 1]
cmp dword [0x434ac4], 0
push 2
pop eax
mov ebx, eax
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x405efd
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
push edi
lea eax, [ecx*2]
add eax, dword [0x434a38]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.004068ad
cmp word [edi], si
mov esi, dword [esp + 0x24]
jne 0x405f12
push esi
push edi
call fcn.00405dad
jmp 0x405f12
cmp ecx, 0x25
jne 0x405f39
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, dword [esp + 0x24]
xor ecx, ecx
cmp word [edi], cx
je 0x405f2a
cmp esi, 0x1a
jne 0x405f2a
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.00406c75
mov ebx, dword [esp + 0x14]
jmp 0x405ffb
cmp ecx, 0x24
jne 0x405f4c
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov ebx, esi
test ebx, ebx
je 0x405f0e
mov eax, dword [0x4339f0]
dec ebx
test eax, eax
je 0x405f71
test ebp, ebp
je 0x405f71
push edi
push esi
push esi
push dword [esp + ebx*4 + 0x24]
push dword [0x4339f8]
call eax
test eax, eax
je 0x405f0e
lea eax, [esp + 0x30]
push eax
push dword [esp + ebx*4 + 0x1c]
push dword [0x4339f8]
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x405fa8
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 0x405f0e
xor eax, eax
push eax
mov word [edi], ax
pop esi
jmp 0x405f4c
cmp edx, 3
jne 0x405fea
cmp esi, 0x1d
jne 0x405fc9
push dword [0x4339f8]
push edi
call fcn.00406553
jmp 0x405fda
mov eax, esi
shl eax, 0xb
add eax, section..ndata
push eax
push edi
call fcn.00406a52
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x405ffb
push edi
call fcn.00406c75
jmp 0x405ffb
xor eax, eax
inc eax
cmp dx, ax
jne 0x405ffb
not esi
push esi
push edi
call fcn.00405dad
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
add eax, eax
pop esi
jmp 0x40601b
jne 0x406016
mov ax, word [ebx]
lea ebx, [ebp + 4]
mov word [edi], ax
jmp 0x406019
mov word [edi], dx
mov eax, esi
movzx ecx, word [ebx]
add edi, eax
mov edx, 0x4329a0
test cx, cx
jne 0x405e0b
mov ebp, dword [esp + 0x2c]
pop esi
xor eax, eax
mov word [edi], ax
test ebp, ebp
je 0x406045
push edx
push ebp
call fcn.00406a52
jmp 0x406047
mov eax, edx
pop edi
pop ebp
pop ebx
add esp, 0x18
ret 8