Function at 0x408641
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0xc]
lea esi, [eax + eax]
test eax, eax
jns 0x408668
inc eax
imul eax, eax, 0xfffffffc
add eax, dword [0x632dc0]
mov esi, dword [eax]
add esi, esi
add esi, dword [0x555158]
mov ebx, 0x832ea0
cmp dword [ebp - 0x3c], ebx
jb 0x4086c7
mov eax, dword [ebp - 0x3c]
sub eax, ebx
cmp eax, 0x7fffe
ja 0x4086c7
mov ebx, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
jmp 0x4086c7
mov eax, dword [ebp - 0x40]
mov dword [esp], ebx
shl eax, 0x12
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.0040849c
push eax
push eax
mov eax, dword [ebp - 0x40]
sub eax, 0x15
cmp eax, 6
jbe 0x4088ca
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 0x40891b
mov eax, ebx
sub eax, 0x832ea0
cmp eax, 0x3fffe
jg 0x40891b
cmp dx, 3
ja 0x4088f8
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 - 0x40], 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 - 0x42], cx
movzx ecx, ah
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x1c], ecx
mov cx, word [ebp - 0x42]
or cx, 0x8000
movzx ecx, cx
mov dword [ebp - 0x20], ecx
cmp dx, 2
jne 0x4088a7
cmp dword [0x415024], 1
sbb edx, edx
and edx, 0xfffffffe
add edx, 4
test al, al
jns 0x4087b2
mov edx, eax
and eax, 0x3f
mov dword [esp + 0xc], ebx
and edx, 0x40
add eax, eax
add eax, dword [0x555158]
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp + 0x10], edx
mov dword [esp + 8], eax
mov dword [esp], 0x80000002
call fcn.00408309
xor edx, edx
sub esp, 0x14
cmp word [ebx], 0
jne 0x408824
mov eax, dword [ebp - 0x48]
mov dword [esp], ebx
mov dword [ebp - 0x40], edx
mov dword [esp + 4], eax
call fcn.00408641
mov edx, dword [ebp - 0x40]
push eax
push eax
jmp 0x408824
cmp edi, 0x25
jne 0x4087ca
mov dword [esp], ebx
mov dword [esp + 4], 0x20000
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x4087e0
cmp edi, 0x24
jne 0x408824
mov dword [esp + 4], 0x20000
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor edx, edx
push edi
push edi
jmp 0x408824
mov eax, dword [0x572d84]
mov edi, dword [ebp + edx*4 - 0x28]
mov ecx, dword [0x572d8c]
test eax, eax
jne 0x40882b
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x40], edx
mov dword [esp + 8], eax
mov eax, dword [0x572d8c]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov edx, dword [ebp - 0x40]
sub esp, 0xc
test eax, eax
je 0x408876
mov word [ebx], 0
sub edx, 1
jae 0x4087e6
jmp 0x408855
mov dword [ebp - 0x40], 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 - 0x40]
sub esp, 0x14
test eax, eax
jne 0x4087f9
cmp word [ebx], 0
je 0x4088ca
cmp word [ebp - 0x42], 0x1a
jne 0x4088ca
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatW
push eax
push eax
jmp 0x4088ca
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x40], 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 - 0x40]
push ecx
je 0x40881f
jmp 0x408855
cmp dx, 3
jne 0x4088d8
cmp dword [ebp - 0x40], 0x1d
jne 0x408690
mov eax, dword [0x572d8c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004083b5
jmp 0x4088f1
mov dword [esp], ebx
call fcn.00408564
push edi
jmp 0x4086b8
dec dx
jne 0x4086b8
mov eax, dword [ebp - 0x40]
mov dword [esp], ebx
not eax
mov dword [esp + 4], eax
call fcn.00408641
push ecx
push ecx
jmp 0x4086b8
lea eax, [ebx + 2]
cmp dx, 4
jne 0x408910
mov dx, word [esi + 2]
add esi, 4
mov word [ebx], dx
jmp 0x4086c5
mov word [ebx], dx
add esi, 2
jmp 0x4086c5
cmp dword [ebp - 0x3c], 0
mov word [ebx], 0
je 0x40893f
mov eax, dword [ebp - 0x3c]
mov dword [ebp + 0xc], 0x832ea0
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.0040849c
lea esp, [ebp - 0xc]
mov eax, 0x832ea0
pop ebx
pop esi
pop edi
pop ebp
ret 8