Function at 0x4087be
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
lea esi, [eax + eax]
test eax, eax
jns 0x4087e5
inc eax
imul eax, eax, 0xfffffffc
add eax, dword [0x431a80]
mov esi, dword [eax]
add esi, esi
add esi, dword [0x41c958]
mov ebx, 0x435b60
cmp dword [ebp - 0x2c], ebx
jb 0x408842
mov eax, dword [ebp - 0x2c]
sub eax, ebx
cmp eax, 0xffe
ja 0x408842
xor eax, eax
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
jmp 0x408842
mov eax, dword [ebp - 0x30]
mov dword [esp], ebx
shl eax, 0xb
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.00408439
push eax
push eax
mov eax, dword [ebp - 0x30]
sub eax, 0x15
cmp eax, 6
jbe 0x408a4c
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edx
lea eax, [ebx + eax*2]
mov ebx, eax
mov dx, word [esi]
test dx, dx
je 0x408a95
mov eax, ebx
sub eax, 0x435b60
cmp eax, 0x7fe
jg 0x408a95
cmp dx, 3
ja 0x408a72
movsx eax, byte [esi + 3]
mov cl, byte [esi + 2]
add esi, 4
shl eax, 7
and ecx, 0x7f
and eax, 0x3f80
or eax, ecx
mov dword [ebp - 0x30], eax
mov ax, word [esi - 2]
movzx edi, al
mov ecx, edi
mov dword [ebp - 0x24], edi
or ch, 0x80
mov dword [ebp - 0x28], ecx
mov ecx, eax
shr cx, 8
mov word [ebp - 0x32], cx
movzx ecx, cx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x1c], ecx
mov cx, word [ebp - 0x32]
or cx, 0x8000
movzx ecx, cx
mov dword [ebp - 0x20], ecx
cmp dx, 2
jne 0x408a29
cmp dword [0x41a024], 1
sbb edx, edx
and edx, 0xfffffffe
add edx, 4
test al, al
jns 0x40891f
mov edx, eax
and eax, 0x3f
mov dword [esp + 0xc], ebx
and edx, 0x40
add eax, eax
mov dword [esp + 0x10], edx
add eax, dword [0x41c958]
mov dword [esp + 8], eax
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp], 0x80000002
call fcn.004082ae
sub esp, 0x14
cmp word [ebx], 0
jne 0x40894f
mov eax, dword [ebp - 0x38]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004087be
jmp 0x40894d
cmp edi, 0x25
jne 0x408937
mov dword [esp], ebx
mov dword [esp + 4], 0x400
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x40894d
cmp edi, 0x24
jne 0x4089ac
mov dword [esp + 4], 0x400
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push edi
push edi
xor edx, edx
jmp 0x4089ac
mov edi, dword [ebp + edx*4 - 0x28]
mov eax, edi
mov ecx, edi
and eax, 0x8000
and ecx, 0xffffffbf
mov dword [ebp - 0x30], eax
mov eax, dword [0x430a44]
test eax, eax
jne 0x4089b3
mov dword [ebp - 0x38], edx
and edi, 0xbf
mov dword [esp], 7
call fcn.0040874c
push ecx
mov edx, dword [ebp - 0x30]
mov dword [esp + 4], edi
mov dword [esp + 8], edx
mov ecx, dword [0x430a4c]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x38]
sub esp, 0xc
test eax, eax
mov edi, eax
jne 0x4089fe
mov word [ebx], 0
sub edx, 1
jae 0x408953
jmp 0x4089dd
mov dword [ebp - 0x38], edx
xor edx, edx
mov dword [esp + 0xc], edx
mov dword [esp + 8], edx
mov dword [esp + 0x10], ebx
mov dword [esp + 4], ecx
mov ecx, dword [0x430a4c]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x38]
sub esp, 0x14
test eax, eax
jne 0x40896f
cmp word [ebx], 0
je 0x408a4c
cmp word [ebp - 0x32], 0x1a
jne 0x408a4c
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
jmp 0x408a4c
mov dword [ebp - 0x38], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push edx
push edx
mov dword [ebp - 0x30], eax
mov dword [esp], edi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ecx
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x38]
test eax, eax
je 0x4089a7
jmp 0x4089dd
cmp dx, 3
jne 0x408a5a
cmp dword [ebp - 0x30], 0x1d
jne 0x40880b
mov eax, dword [0x430a4c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00408358
jmp 0x408a6b
mov dword [esp], ebx
call fcn.004084f5
push edi
jmp 0x408833
mov eax, dword [ebp - 0x30]
mov dword [esp], ebx
not eax
mov dword [esp + 4], eax
call fcn.004087be
push ecx
push ecx
jmp 0x408833
lea eax, [ebx + 2]
cmp dx, 4
jne 0x408a8a
mov dx, word [esi + 2]
add esi, 4
mov word [ebx], dx
jmp 0x408840
mov word [ebx], dx
add esi, 2
jmp 0x408840
cmp dword [ebp - 0x2c], 0
mov word [ebx], 0
je 0x408ab9
mov eax, dword [ebp - 0x2c]
mov dword [ebp + 0xc], 0x435b60
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00408439
lea esp, [ebp - 0xc]
mov eax, 0x435b60
pop ebx
pop esi
pop edi
pop ebp
ret 8