Function at 0x404ef3
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x14
test eax, eax
jns 0x404f0f
mov ecx, dword [0x4701e0]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
mov ecx, dword [0x478238]
mov edx, 0x4681a0
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
lea ebp, [ecx + eax*2]
xor ecx, ecx
push edi
mov edi, edx
cmp ebx, edx
jb 0x404f41
mov eax, ebx
sub eax, edx
sar eax, 1
cmp eax, 0x4000
jae 0x404f41
mov edi, ebx
mov ebx, ecx
mov dword [esp + 0x24], ebx
movzx ecx, word [ebp]
test cx, cx
je 0x40513c
push esi
push 2
pop esi
mov eax, edi
mov ebx, ebp
sub eax, edx
and eax, 0xfffffffe
cmp eax, 0x4000
jge 0x405137
push 4
movzx edx, cx
add ebp, esi
pop eax
cmp dx, ax
jae 0x405110
movsx esi, byte [ebx + 3]
movsx eax, byte [ebp]
and esi, 0x7f
movzx ecx, byte [ebp]
and eax, 0x7f
shl esi, 7
or esi, eax
mov dword [esp + 0x18], ecx
mov eax, ecx
or eax, 0x8000
mov dword [esp + 0x14], eax
movzx eax, byte [ebp + 1]
lea ebp, [ebx + 4]
mov dword [esp + 0x20], eax
or eax, 0x8000
push 2
mov dword [esp + 0x20], eax
pop eax
mov dword [esp + 0x10], ebp
cmp dx, ax
jne 0x4050bb
cmp dword [0x4782c4], 0
mov ebp, eax
push 4
pop eax
cmovne ebp, eax
test cl, cl
jns 0x405012
mov ebx, dword [0x478238]
mov eax, ecx
and eax, 0x40
and ecx, 0x3f
push eax
push edi
lea eax, [ebx + ecx*2]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.004057f8
xor esi, esi
cmp word [edi], si
mov esi, dword [esp + 0x20]
jne 0x405097
push esi
push edi
call fcn.00404ef3
jmp 0x405097
cmp ecx, 0x25
jne 0x405025
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x405093
cmp ecx, 0x24
jne 0x405038
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x405093
mov eax, dword [0x4701f0]
dec ebp
test eax, eax
je 0x405057
push edi
xor ecx, ecx
push ecx
push ecx
push dword [esp + ebp*4 + 0x20]
push dword [0x4701f8]
call eax
test eax, eax
je 0x405093
lea eax, [esp + 0x2c]
push eax
push dword [esp + ebp*4 + 0x18]
push dword [0x4701f8]
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x40508a
push edi
push dword [esp + 0x30]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x2c]
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x405093
xor eax, eax
mov word [edi], ax
test ebp, ebp
jne 0x405038
mov esi, dword [esp + 0x20]
xor eax, eax
cmp word [edi], ax
je 0x4050af
cmp esi, 0x1a
jne 0x4050af
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.00405b57
mov ebp, dword [esp + 0x10]
jmp 0x405102
cmp edx, 3
jne 0x4050f4
cmp esi, 0x1d
jne 0x4050d3
push dword [0x4701f8]
push edi
call fcn.004054c9
jmp 0x405102
mov eax, esi
shl eax, 0xe
add eax, section..gdata
push eax
push edi
call fcn.0040599b
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x405102
push edi
call fcn.00405b57
jmp 0x405102
cmp edx, 1
jne 0x405102
not esi
push esi
push edi
call fcn.00404ef3
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
add eax, eax
pop esi
jmp 0x405123
jne 0x40511e
mov ax, word [ebp]
lea ebp, [ebx + 4]
mov word [edi], ax
jmp 0x405121
mov word [edi], dx
mov eax, esi
movzx ecx, word [ebp]
add edi, eax
mov edx, 0x4681a0
test cx, cx
jne 0x404f52
mov ebx, dword [esp + 0x28]
pop esi
xor eax, eax
mov word [edi], ax
test ebx, ebx
je 0x40514e
push edx
push ebx
call fcn.0040599b
jmp 0x405150
mov eax, edx
pop edi
pop ebp
pop ebx
add esp, 0x14
ret 8