Function at 0x407a7b
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, ecx
mov dword [ebp - 0x14], ebx
push edi
test edx, edx
jns 0x407a9d
lea eax, [edx*4 + 4]
mov edx, dword [0x791fc4]
sub edx, eax
mov edx, dword [edx]
mov eax, dword [0x792c58]
add eax, edx
mov edx, 0x7917c0
mov dword [ebp - 8], eax
mov edi, edx
cmp ebx, edx
jb 0x407ac3
mov eax, ebx
sub eax, edx
cmp eax, 0x800
jae 0x407ac3
and dword [ebp - 0x14], 0
mov edi, ebx
mov ebx, dword [ebp - 8]
mov cl, byte [ebx]
test cl, cl
je 0x407cce
push esi
mov eax, edi
sub eax, edx
cmp eax, 0x400
jge 0x407ccd
inc ebx
cmp cl, 4
jae 0x407cb6
movsx eax, byte [ebx + 1]
movsx edx, byte [ebx]
mov esi, eax
mov dword [ebp - 4], eax
and esi, 0x7f
mov eax, edx
shl esi, 7
and eax, 0x7f
mov dword [ebp - 0x18], edx
or esi, eax
mov dword [ebp - 0x24], edx
mov eax, edx
add ebx, 2
mov edx, dword [ebp - 4]
or eax, 0x8000
mov dword [ebp - 0x28], eax
mov eax, edx
or eax, 0x8000
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], ebx
cmp cl, 2
jne 0x407c55
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov esi, dword [ebp - 4]
test eax, eax
jns 0x407b59
mov ecx, 0x5a04
cmp ax, cx
je 0x407b59
cmp esi, 0x23
je 0x407b59
cmp esi, 0x2e
je 0x407b59
and dword [ebp - 0xc], 0
jmp 0x407b60
mov dword [ebp - 0xc], 1
cmp dword [0x792ca4], 0
mov ecx, dword [ebp - 0x18]
push 2
pop ebx
push 4
pop eax
cmovne ebx, eax
test cl, cl
jns 0x407bae
mov eax, ecx
mov edx, str.SoftwareMicrosoftWindowsCurrentVersion
and eax, 0x40
and ecx, 0x3f
add ecx, dword [0x792c58]
push eax
push edi
push ecx
mov ecx, 0x80000002
call fcn.00407980
cmp byte [edi], 0
jne 0x407c38
mov edx, esi
mov ecx, edi
call fcn.00407a7b
jmp 0x407c33
cmp ecx, 0x25
jne 0x407bc1
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x407c33
cmp ecx, 0x24
jne 0x407c2f
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
xor ebx, ebx
jmp 0x407c2f
mov eax, dword [0x791fec]
dec ebx
test eax, eax
je 0x407bfb
cmp dword [ebp - 0xc], 0
je 0x407bfb
push edi
push 0
push 0
push dword [ebp + ebx*4 - 0x28]
push dword [0x791ff4]
call eax
test eax, eax
je 0x407c33
lea eax, [ebp - 0x10]
push eax
push dword [ebp + ebx*4 - 0x28]
push dword [0x791ff4]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x407c2c
push edi
push dword [ebp - 0x10]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp - 0x10]
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x407c33
mov byte [edi], 0
test ebx, ebx
jne 0x407bd6
cmp byte [edi], 0
je 0x407c4a
cmp dword [ebp - 4], 0x1a
jne 0x407c4a
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push edi
call fcn.00407cef
mov ebx, dword [ebp - 8]
jmp 0x407ca6
cmp cl, 3
jne 0x407c95
cmp esi, 0x1d
jne 0x407c6e
mov edx, dword [0x791ff4]
mov ecx, edi
call fcn.004079f6
jmp 0x407c85
mov eax, esi
shl eax, 0xa
push 0x400
add eax, section..ndata
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [esi - 0x15]
cmp eax, 7
jae 0x407ca6
push edi
call fcn.00407cef
jmp 0x407ca6
cmp cl, 1
jne 0x407ca6
or edx, 0xffffffff
mov ecx, edi
sub edx, esi
call fcn.00407a7b
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add edi, eax
mov edx, 0x7917c0
jmp 0x407cc3
jne 0x407cc0
mov al, byte [ebx]
mov byte [edi], al
inc edi
inc ebx
jmp 0x407cc3
mov byte [edi], cl
inc edi
mov cl, byte [ebx]
test cl, cl
jne 0x407ad1
pop esi
mov eax, dword [ebp - 0x14]
mov byte [edi], 0
pop edi
pop ebx
test eax, eax
je 0x407ce9
push 0x400
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
jmp 0x407ceb
mov eax, edx
mov esp, ebp
pop ebp
ret