Function at 0x4085ed
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 0xc]
lea esi, [eax + eax]
test eax, eax
jns 0x40860e
inc eax
imul eax, eax, 0xfffffffc
add eax, dword [0x43cb44]
mov esi, dword [eax]
add esi, esi
add esi, dword [0x43bab8]
mov ebx, 0x43cb60
cmp dword [ebp + 8], ebx
jb 0x40866e
mov eax, dword [ebp + 8]
sub eax, ebx
cmp eax, 0xfff
ja 0x40866e
mov ebx, dword [ebp + 8]
mov dword [ebp + 8], 0
jmp 0x40866e
mov eax, dword [ebp - 0x3c]
mov dword [esp], ebx
shl eax, 0xb
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.00408447
push eax
push eax
mov eax, dword [ebp - 0x3c]
sub eax, 0x15
cmp eax, 6
jbe 0x408877
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ecx
add eax, eax
add eax, ebx
mov ebx, eax
mov dx, word [esi]
test dx, dx
je 0x4088c8
mov eax, ebx
sub eax, 0x43cb60
cmp eax, 0x7fe
jg 0x4088c8
cmp dx, 3
ja 0x4088a5
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 - 0x3c], eax
mov ax, word [esi - 2]
movzx edi, al
mov byte [ebp - 0x43], al
mov ecx, edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x24], edi
mov edi, eax
or ch, 0x80
shr di, 8
mov dword [ebp - 0x28], ecx
mov word [ebp - 0x42], di
mov cx, word [ebp - 0x42]
movzx edi, di
mov dword [ebp - 0x1c], edi
or cx, 0x8000
movzx ecx, cx
mov dword [ebp - 0x20], ecx
cmp dx, 2
jne 0x408854
cmp dword [0x43ba24], 1
sbb edx, edx
and edx, 0xfffffffe
add edx, 4
test al, al
jns 0x40875c
mov edx, eax
and eax, 0x3f
mov dword [esp + 0xc], ebx
and edx, 0x40
add eax, eax
add eax, dword [0x43bab8]
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
movzx edx, dl
mov dword [esp + 8], eax
mov dword [esp + 0x10], edx
mov dword [esp], 0x80000002
call fcn.004082b6
xor edx, edx
sub esp, 0x14
cmp word [ebx], 0
jne 0x4087d0
mov dword [esp + 4], edi
mov dword [esp], ebx
mov dword [ebp - 0x3c], edx
call fcn.004085ed
mov edx, dword [ebp - 0x3c]
push eax
push eax
jmp 0x4087d0
cmp byte [ebp - 0x43], 0x25
jne 0x408775
mov dword [esp], ebx
mov dword [esp + 4], 0x400
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x40878c
cmp dword [ebp - 0x40], 0x24
jne 0x4087d0
mov dword [esp + 4], 0x400
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor edx, edx
push edi
push edi
jmp 0x4087d0
mov eax, dword [0x43bb04]
mov edi, dword [ebp + edx*4 - 0x28]
mov ecx, dword [0x43bb08]
test eax, eax
jne 0x4087d8
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x3c], edx
mov dword [esp + 8], eax
mov eax, dword [0x43bb08]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov edx, dword [ebp - 0x3c]
sub esp, 0xc
test eax, eax
je 0x408823
mov word [ebx], 0
dec edx
cmp edx, 0xffffffff
jne 0x408792
jmp 0x408802
mov dword [ebp - 0x3c], edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x3c]
sub esp, 0x14
test eax, eax
jne 0x4087a5
cmp word [ebx], 0
je 0x408877
cmp word [ebp - 0x42], 0x1a
jne 0x408877
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
jmp 0x408877
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push edx
mov edi, eax
mov eax, dword [ebp - 0x2c]
push edx
mov dword [esp], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test edi, edi
mov edx, dword [ebp - 0x3c]
push ecx
je 0x4087cb
jmp 0x408802
cmp dx, 3
jne 0x408885
cmp dword [ebp - 0x3c], 0x1d
jne 0x408636
mov eax, dword [0x43bb08]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00408362
jmp 0x40889e
mov dword [esp], ebx
call fcn.00408510
push eax
jmp 0x40865e
dec dx
jne 0x40865e
mov eax, dword [ebp - 0x3c]
mov dword [esp], ebx
not eax
mov dword [esp + 4], eax
call fcn.004085ed
push edi
push edi
jmp 0x40865e
lea eax, [ebx + 2]
cmp dx, 4
jne 0x4088bd
mov dx, word [esi + 2]
add esi, 4
mov word [ebx], dx
jmp 0x40866c
add esi, 2
mov word [ebx], dx
jmp 0x40866c
cmp dword [ebp + 8], 0
mov word [ebx], 0
mov eax, 0x43cb60
je 0x4088e9
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00408447
push edx
push edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8