Function at 0x407b7f
Capabilities:
Get common file path

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov edx, dword [0x40a00c]
mov edx, dword [edx + 0x18]
test ecx, ecx
jns 0x407ba8
mov esi, dword [0x40bb34]
mov esi, dword [esi]
not ecx
mov ecx, dword [esi + ecx*4]
mov esi, 0x471778
mov edi, eax
sub edi, esi
setae bl
cmp edi, 0x8000
setb bh
xor edi, edi
test bl, bh
mov ebx, 0x471778
cmovne ebx, eax
cmove edi, eax
mov dword [esp], edi
movzx eax, word [edx + ecx*2]
test ax, ax
je 0x407e19
mov edi, ebx
sub edi, esi
cmp edi, 0x3fff
jg 0x407e19
lea esi, [edx + ecx*2]
mov edx, 0x471778
cmp ax, 3
ja 0x407c88
movzx edx, byte [esi + 3]
and edx, 0x7f
shl edx, 7
movzx ecx, byte [esi + 2]
mov edi, ecx
and edi, 0x7f
or edi, edx
mov dword [esp + 0xc], ecx
mov edx, ecx
mov ebp, 0x8000
or edx, ebp
mov dword [esp + 8], edx
mov dword [esp + 4], esi
movzx esi, word [esi + 2]
shr esi, 8
mov dword [esp + 0x14], esi
mov edx, esi
or edx, ebp
mov dword [esp + 0x10], edx
cmp ax, 1
je 0x407cc5
movzx eax, ax
cmp eax, 3
je 0x407ca5
cmp eax, 2
jne 0x407deb
movzx eax, cx
cmp eax, 0x80
jae 0x407cfc
cmp cx, 0x24
je 0x407d37
cmp eax, 0x25
jne 0x407d48
push 0x2000
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x407dce
cmp ax, 4
jne 0x407c97
movzx eax, word [esi + 2]
add esi, 4
jmp 0x407c9a
add esi, 2
mov word [ebx], ax
add ebx, 2
jmp 0x407e01
cmp edi, 0x1d
jne 0x407cd3
mov eax, dword [0x40a008]
push dword [eax]
push 0x40b76a
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x407deb
not edi
push edi
push ebx
call fcn.00407b7f
jmp 0x407deb
mov eax, edi
shl eax, 0xe
lea eax, [eax + section..ndata]
push 0x2000
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add edi, 0xffffffeb
cmp edi, 6
jbe 0x407de5
jmp 0x407deb
mov eax, ecx
and eax, 0x3f
add eax, eax
mov edx, dword [0x40a00c]
add eax, dword [edx + 0x18]
and ecx, 0x40
push ecx
push ebx
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00407f35
cmp word [ebx], 0
jne 0x407dce
push esi
push ebx
call fcn.00407b7f
jmp 0x407dce
push 0x2000
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x407dce
xor eax, eax
mov ecx, dword [0x40b114]
cmp dword [ecx + 4], 0
setne al
lea edi, [eax*2 + 2]
mov ebp, dword [esp + edi*4 + 4]
mov eax, dword [0x40bb38]
mov eax, dword [eax]
test eax, eax
je 0x407d86
mov ecx, ebp
and ecx, 0xffffffbf
push ebx
xor edx, edx
push edx
push edx
push ecx
mov ecx, dword [0x40a008]
push dword [ecx]
call eax
test eax, eax
je 0x407dca
mov esi, ebp
and esi, 0x8000
push 7
call fcn.00406f78
and ebp, 0xbf
push esi
push ebp
mov ecx, dword [0x40a008]
push dword [ecx]
call eax
test eax, eax
je 0x407dc2
mov esi, eax
push ebx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov ebp, eax
push esi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test ebp, ebp
jne 0x407dca
mov word [ebx], 0
dec edi
jne 0x407d5e
mov esi, dword [esp + 0x14]
cmp word [ebx], 0
je 0x407de5
cmp esi, 0x1a
jne 0x407de5
push str.MicrosoftInternet_ExplorerQuick_Launch
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebx
call fcn.0040765e
mov esi, dword [esp + 4]
add esi, 4
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [ebx + eax*2]
mov edx, 0x471778
movzx eax, word [esi]
test ax, ax
je 0x407e19
mov ecx, ebx
sub ecx, edx
cmp ecx, 0x4000
jl 0x407bf4
mov word [ebx], 0
mov eax, dword [esp]
test eax, eax
je 0x407e38
push 0x2000
push 0x471778
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x407e3d
mov eax, 0x471778
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret 8