Function at 0x407492
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 0x4074bb
mov esi, dword [0x40aa00]
mov esi, dword [esi]
not ecx
mov ecx, dword [esi + ecx*4]
mov esi, 0x434f70
mov edi, eax
sub edi, esi
setae bl
cmp edi, 0x1000
setb bh
xor edi, edi
test bl, bh
mov ebx, 0x434f70
cmovne ebx, eax
cmove edi, eax
mov dword [esp], edi
movzx eax, word [edx + ecx*2]
test ax, ax
je 0x40772c
mov edi, ebx
sub edi, esi
cmp edi, 0x7ff
jg 0x40772c
lea esi, [edx + ecx*2]
mov edx, 0x434f70
cmp ax, 3
ja 0x40759b
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 0x4075d8
movzx eax, ax
cmp eax, 3
je 0x4075b8
cmp eax, 2
jne 0x4076fe
movzx eax, cx
cmp eax, 0x80
jae 0x40760f
cmp cx, 0x24
je 0x40764a
cmp eax, 0x25
jne 0x40765b
push 0x400
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x4076e1
cmp ax, 4
jne 0x4075aa
movzx eax, word [esi + 2]
add esi, 4
jmp 0x4075ad
add esi, 2
mov word [ebx], ax
add ebx, 2
jmp 0x407714
cmp edi, 0x1d
jne 0x4075e6
mov eax, dword [0x40a008]
push dword [eax]
push 0x40a820
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x4076fe
not edi
push edi
push ebx
call fcn.00407492
jmp 0x4076fe
mov eax, edi
shl eax, 0xb
lea eax, [eax + section..ndata]
push 0x400
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add edi, 0xffffffeb
cmp edi, 6
jbe 0x4076f8
jmp 0x4076fe
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.00407848
cmp word [ebx], 0
jne 0x4076e1
push esi
push ebx
call fcn.00407492
jmp 0x4076e1
push 0x400
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x4076e1
xor eax, eax
mov ecx, dword [0x40a474]
cmp dword [ecx + 4], 0
setne al
lea edi, [eax*2 + 2]
mov ebp, dword [esp + edi*4 + 4]
mov eax, dword [0x40aa04]
mov eax, dword [eax]
test eax, eax
je 0x407699
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 0x4076dd
mov esi, ebp
and esi, 0x8000
push 7
call fcn.0040692c
and ebp, 0xbf
push esi
push ebp
mov ecx, dword [0x40a008]
push dword [ecx]
call eax
test eax, eax
je 0x4076d5
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 0x4076dd
mov word [ebx], 0
dec edi
jne 0x407671
mov esi, dword [esp + 0x14]
cmp word [ebx], 0
je 0x4076f8
cmp esi, 0x1a
jne 0x4076f8
push str.MicrosoftInternet_ExplorerQuick_Launch
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebx
call fcn.00406f71
mov esi, dword [esp + 4]
add esi, 4
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [ebx + eax*2]
mov edx, 0x434f70
movzx eax, word [esi]
test ax, ax
je 0x40772c
mov ecx, ebx
sub ecx, edx
cmp ecx, 0x800
jl 0x407507
mov word [ebx], 0
mov eax, dword [esp]
test eax, eax
je 0x40774b
push 0x400
push 0x434f70
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x407750
mov eax, 0x434f70
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret 8