Function at 0x405add
Capabilities:
Get common file path

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x1c
test ecx, ecx
jns 0x405af9
lea eax, [ecx*4 + 4]
mov ecx, dword [0x4339cc]
sub ecx, eax
mov ecx, dword [ecx]
mov eax, dword [0x434a18]
mov edx, 0x432980
push ebx
push ebp
mov ebp, dword [esp + 0x28]
lea ebx, [eax + ecx*2]
xor ecx, ecx
push edi
mov edi, edx
cmp ebp, edx
jb 0x405b2a
mov eax, ebp
sub eax, edx
sar eax, 1
cmp eax, 0x800
jae 0x405b2a
mov edi, ebp
mov ebp, ecx
mov dword [esp + 0x2c], ebp
movzx ecx, word [ebx]
test cx, cx
je 0x405d5c
push esi
push 2
pop ebp
push 4
pop esi
mov eax, edi
sub eax, edx
and eax, 0xfffffffe
cmp eax, 0x800
jge 0x405d57
movzx edx, cx
add ebx, ebp
cmp dx, si
jae 0x405d33
movsx esi, byte [ebx + 1]
mov ecx, 0x8000
movsx eax, byte [ebx]
and esi, 0x7f
and eax, 0x7f
shl esi, 7
or esi, eax
movzx eax, byte [ebx]
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
or eax, ecx
mov dword [esp + 0x1c], eax
movzx eax, byte [ebx + 1]
add ebx, ebp
mov dword [esp + 0x28], eax
or eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], ebx
cmp dx, bp
jne 0x405cdb
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov esi, dword [esp + 0x28]
test eax, eax
jns 0x405bcc
mov ecx, 0x5a04
cmp ax, cx
je 0x405bcc
cmp esi, 0x23
je 0x405bcc
cmp esi, 0x2e
je 0x405bcc
xor ebp, ebp
mov dword [esp + 0x34], ebp
jmp 0x405bd5
xor eax, eax
inc eax
xor ebp, ebp
mov dword [esp + 0x34], eax
cmp dword [0x434aa4], 0
mov ecx, dword [esp + 0x14]
push 2
pop ebx
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x405c24
mov eax, ecx
and ecx, 0x3f
and eax, 0x40
push eax
mov eax, dword [0x434a18]
push edi
lea eax, [eax + ecx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.004064ac
cmp word [edi], bp
jne 0x405cb2
push esi
push edi
call fcn.00405add
jmp 0x405cb2
cmp ecx, 0x25
jne 0x405c37
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x405cb2
cmp ecx, 0x24
jne 0x405c4a
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov ebx, ebp
test ebx, ebx
je 0x405cb2
mov ebp, dword [esp + 0x34]
mov eax, dword [0x4339d0]
dec ebx
test eax, eax
je 0x405c75
test ebp, ebp
je 0x405c75
push edi
xor ecx, ecx
push ecx
push ecx
push dword [esp + ebx*4 + 0x28]
push dword [0x4339d8]
call eax
test eax, eax
je 0x405cb2
lea eax, [esp + 0x10]
push eax
push dword [esp + ebx*4 + 0x20]
push dword [0x4339d8]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x405ca9
push edi
push dword [esp + 0x14]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x10]
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x405cb2
xor eax, eax
mov word [edi], ax
test ebx, ebx
jne 0x405c52
xor eax, eax
cmp word [edi], ax
je 0x405ccc
cmp dword [esp + 0x28], 0x1a
jne 0x405ccc
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.00406808
mov ebx, dword [esp + 0x18]
push 2
pop ebp
jmp 0x405d25
cmp edx, 3
jne 0x405d14
cmp esi, 0x1d
jne 0x405cf3
push dword [0x4339d8]
push edi
call fcn.0040614c
jmp 0x405d04
mov eax, esi
shl eax, 0xb
add eax, section..ndata
push eax
push edi
call fcn.00406642
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x405d25
push edi
call fcn.00406808
jmp 0x405d25
xor eax, eax
inc eax
cmp dx, ax
jne 0x405d25
not esi
push esi
push edi
call fcn.00405add
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 4
add eax, eax
pop esi
jmp 0x405d44
jne 0x405d3f
mov ax, word [ebx]
add ebx, ebp
mov word [edi], ax
jmp 0x405d42
mov word [edi], dx
mov eax, ebp
movzx ecx, word [ebx]
add edi, eax
mov edx, 0x432980
test cx, cx
jne 0x405b3d
mov ebp, dword [esp + 0x30]
pop esi
xor eax, eax
mov word [edi], ax
test ebp, ebp
je 0x405d6e
push edx
push ebp
call fcn.00406642
jmp 0x405d70
mov eax, edx
pop edi
pop ebp
pop ebx
add esp, 0x1c
ret 8