Function at 0x4088d9
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 esi, dword [ebp + 0xc]
mov dword [ebp - 0x40], eax
test esi, esi
jns 0x4088fb
inc esi
imul esi, esi, 0xfffffffc
add esi, dword [0x439260]
mov esi, dword [esi]
add esi, dword [0x41f138]
mov ebx, 0x449b60
cmp dword [ebp - 0x40], ebx
jb 0x408956
mov eax, dword [ebp - 0x40]
sub eax, ebx
cmp eax, 0x3fff
ja 0x408956
mov ebx, dword [ebp - 0x40]
mov dword [ebp - 0x40], 0
jmp 0x408956
mov eax, edi
mov dword [esp], ebx
sub edi, 0x15
shl eax, 0xd
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.004086df
push eax
push eax
cmp edi, 6
jbe 0x408b5f
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push edx
lea edx, [ebx + eax]
mov ebx, edx
mov al, byte [esi]
test al, al
je 0x408ba6
mov edx, ebx
sub edx, 0x449b60
cmp edx, 0x1fff
jg 0x408ba6
cmp al, 3
ja 0x408b8a
movsx ecx, byte [esi + 2]
add esi, 3
mov dword [ebp - 0x3c], ecx
mov edi, dword [ebp - 0x3c]
movsx ecx, byte [esi - 2]
shl edi, 7
mov edx, ecx
mov dword [ebp - 0x44], ecx
and edi, 0x3f80
and ecx, 0x7f
or edi, ecx
movsx ecx, dl
or ch, 0x80
mov dword [ebp - 0x28], ecx
movsx ecx, dl
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x3c]
or ch, 0x80
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], ecx
cmp al, 2
jne 0x408b3f
mov eax, dword [0x433220]
mov dword [ebp - 0x48], 1
test eax, eax
jns 0x4089f0
cmp ax, 0x5a04
je 0x4089f0
cmp ecx, 0x23
sete al
cmp ecx, 0x2e
sete cl
or eax, ecx
movzx eax, al
mov dword [ebp - 0x48], eax
cmp dword [0x415064], 1
sbb edi, edi
and edi, 0xfffffffe
add edi, 4
test dl, dl
jns 0x408a4e
mov eax, edx
and edx, 0x3f
mov dword [esp + 0xc], ebx
xor edi, edi
and eax, 0x40
add edx, dword [0x41f138]
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp + 0x10], eax
mov dword [esp + 8], edx
mov dword [esp], 0x80000002
call fcn.0040854f
sub esp, 0x14
cmp byte [ebx], 0
jne 0x408ab4
mov eax, dword [ebp - 0x3c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004088d9
push eax
push eax
jmp 0x408ab4
cmp dword [ebp - 0x44], 0x25
jne 0x408a67
mov dword [esp], ebx
mov dword [esp + 4], 0x2000
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x408a7e
cmp dword [ebp - 0x44], 0x24
jne 0x408ab4
mov dword [esp + 4], 0x2000
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push edi
push edi
xor edi, edi
jmp 0x408ab4
mov eax, dword [0x433224]
mov edx, dword [ebp + edi*4 - 0x28]
test eax, eax
jne 0x408abb
lea eax, [ebp - 0x2c]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [0x43322c]
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
sub esp, 0xc
test eax, eax
je 0x408b10
mov byte [ebx], 0
sub edi, 1
jae 0x408a84
jmp 0x408af1
cmp dword [ebp - 0x48], 0
je 0x408a91
mov ecx, dword [0x43322c]
mov dword [esp + 4], edx
mov dword [ebp - 0x44], edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x44]
sub esp, 0x14
test eax, eax
jne 0x408a91
cmp byte [ebx], 0
je 0x408b5f
cmp dword [ebp - 0x3c], 0x1a
jne 0x408b5f
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
push eax
push eax
jmp 0x408b5f
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push edx
push edx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
mov dword [esp], edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x44]
push ecx
test eax, eax
je 0x408ab1
jmp 0x408af1
cmp al, 3
jne 0x408b6d
cmp edi, 0x1d
jne 0x408923
mov eax, dword [0x43322c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004085f7
jmp 0x408b83
mov dword [esp], ebx
call fcn.00408810
push edi
jmp 0x408947
dec al
jne 0x408947
not edi
mov dword [esp], ebx
mov dword [esp + 4], edi
call fcn.004088d9
push ecx
push ecx
jmp 0x408947
lea edx, [ebx + 1]
cmp al, 4
jne 0x408b9e
mov al, byte [esi + 1]
add esi, 2
mov byte [ebx], al
jmp 0x408954
mov byte [ebx], al
inc esi
jmp 0x408954
cmp dword [ebp - 0x40], 0
mov byte [ebx], 0
je 0x408bc8
mov eax, dword [ebp - 0x40]
mov dword [ebp + 0xc], 0x449b60
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004086df
lea esp, [ebp - 0xc]
mov eax, 0x449b60
pop ebx
pop esi
pop edi
pop ebp
ret 8