Function at 0x407437
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 0x407460
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 0x4076c7
mov edi, ebx
sub edi, esi
cmp edi, 0x7ff
jg 0x4076c7
lea esi, [edx + ecx*2]
mov edx, 0x434f70
cmp ax, 3
ja 0x407537
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 0x407554
movzx eax, ax
cmp eax, 3
je 0x407562
cmp eax, 2
jne 0x407699
movzx eax, cx
cmp eax, 0x80
jae 0x407582
cmp cl, 0x24
je 0x4075e6
cmp eax, 0x25
jne 0x4075f7
push 0x400
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x40767c
cmp ax, 4
jne 0x407546
movzx eax, word [esi + 2]
add esi, 4
jmp 0x407549
add esi, 2
mov word [ebx], ax
add ebx, 2
jmp 0x4076af
not edi
push edi
push ebx
call fcn.00407437
jmp 0x407699
cmp edi, 0x1d
jne 0x4075bd
mov eax, dword [0x40a008]
push dword [eax]
push 0x40a820
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x407699
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.004077e1
cmp word [ebx], 0
jne 0x40767c
push esi
push ebx
call fcn.00407437
jmp 0x40767c
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 0x407693
jmp 0x407699
push 0x400
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x40767c
xor eax, eax
mov ecx, dword [0x40a474]
cmp dword [ecx + 4], 0
setne al
lea edi, [eax + eax]
add edi, 2
mov ebp, dword [esp + edi*4 + 4]
mov eax, dword [0x40aa04]
mov eax, dword [eax]
test eax, eax
je 0x407634
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 0x407678
mov esi, ebp
and esi, 0x8000
push 7
call fcn.004068d4
and ebp, 0xbf
push esi
push ebp
mov ecx, dword [0x40a008]
push dword [ecx]
call eax
test eax, eax
je 0x407670
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 0x407678
mov word [ebx], 0
dec edi
jne 0x40760c
mov esi, dword [esp + 0x14]
cmp word [ebx], 0
je 0x407693
cmp esi, 0x1a
jne 0x407693
push str.MicrosoftInternet_ExplorerQuick_Launch
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebx
call fcn.00406f19
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 0x4076c7
mov ecx, ebx
sub ecx, edx
cmp ecx, 0x800
jl 0x4074ac
mov word [ebx], 0
mov eax, dword [esp]
test eax, eax
je 0x4076e6
push 0x400
push 0x434f70
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x4076eb
mov eax, 0x434f70
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret 8