Function at 0x407938
Capabilities:
Get common file path

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov ecx, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
test ecx, ecx
jns 0x407957
mov eax, dword [0x40b9c8]
mov eax, dword [eax]
not ecx
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x40a00c]
mov edx, dword [eax + 0x18]
mov esi, 0x475758
mov eax, ebp
sub eax, esi
setae bl
cmp eax, 0x8000
setb al
test bl, al
jne 0x407981
mov dword [esp], ebp
mov ebp, 0x475758
jmp 0x407988
mov dword [esp], 0
movzx eax, word [edx + ecx*2]
test ax, ax
je 0x407bc2
mov edi, ebp
sub edi, esi
cmp edi, 0x3fff
jg 0x407bc2
lea ebx, [edx + ecx*2]
mov edi, 0x8000
mov edx, 0x475758
cmp ax, 3
ja 0x407a37
movzx edx, byte [ebx + 3]
and edx, 0x7f
shl edx, 7
movzx ecx, byte [ebx + 2]
mov esi, ecx
and esi, 0x7f
or esi, edx
mov dword [esp + 0xc], ecx
mov edx, ecx
or edx, edi
mov dword [esp + 8], edx
movzx edx, word [ebx + 2]
shr edx, 8
mov dword [esp + 0x14], edx
or edx, edi
mov dword [esp + 0x10], edx
cmp ax, 1
je 0x407a75
movzx eax, ax
cmp eax, 3
je 0x407a55
cmp eax, 2
jne 0x407b97
movzx eax, cx
cmp eax, 0x80
jae 0x407ab2
cmp cx, 0x24
je 0x407af1
cmp eax, 0x25
jne 0x407aff
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x407b72
cmp ax, 4
jne 0x407a46
movzx eax, word [ebx + 2]
add ebx, 4
jmp 0x407a49
add ebx, 2
mov word [ebp], ax
add ebp, 2
jmp 0x407baa
cmp esi, 0x1d
jne 0x407a83
mov eax, dword [0x40a008]
push dword [eax]
push 0x40b5fe
push ebp
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x407b97
not esi
push esi
push ebp
call fcn.00407938
jmp 0x407b97
mov eax, esi
shl eax, 0xe
lea eax, [eax + section..ndata]
push 0x2000
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
add esi, 0xffffffeb
cmp esi, 6
ja 0x407b97
push ebp
call fcn.0040742a
jmp 0x407b97
mov eax, ecx
and eax, 0x3f
add eax, eax
mov edx, dword [0x40a00c]
add eax, dword [edx + 0x18]
and ecx, 0x40
push ecx
push ebp
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00407cd7
cmp word [ebp], 0
jne 0x407b72
push dword [esp + 0x14]
push ebp
call fcn.00407938
jmp 0x407b72
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x407b72
xor eax, eax
mov ecx, dword [0x40b044]
cmp dword [ecx + 4], 0
setne al
lea edi, [eax + eax + 2]
mov eax, dword [0x40b9cc]
mov eax, dword [eax]
test eax, eax
je 0x407b34
push ebp
xor ecx, ecx
push ecx
push ecx
push dword [esp + edi*4 + 0x10]
mov ecx, dword [0x40a008]
push dword [ecx]
call eax
test eax, eax
je 0x407b72
lea eax, [esp + 4]
push eax
push dword [esp + edi*4 + 8]
mov eax, dword [0x40a008]
push dword [eax]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x407b69
push ebp
push dword [esp + 8]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov esi, eax
push dword [esp + 4]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
jne 0x407b72
dec edi
mov word [ebp], 0
jne 0x407b12
cmp word [ebp], 0
je 0x407b8c
cmp dword [esp + 0x14], 0x1a
jne 0x407b8c
push str.MicrosoftInternet_ExplorerQuick_Launch
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebp
call fcn.0040742a
mov edi, 0x8000
add ebx, 4
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebp, [ebp + eax*2]
mov edx, 0x475758
movzx eax, word [ebx]
test ax, ax
je 0x407bc2
mov ecx, ebp
sub ecx, edx
cmp ecx, 0x4000
jl 0x4079b2
mov word [ebp], 0
mov eax, dword [esp]
test eax, eax
je 0x407be2
push 0x2000
push 0x475758
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x407be7
mov eax, 0x475758
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret 8