Function at 0x4084ad
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 0x4084cf
inc esi
imul esi, esi, 0xfffffffc
add esi, dword [0x42ae60]
mov esi, dword [esi]
add esi, dword [0x416538]
mov ebx, 0x42cf40
cmp dword [ebp - 0x40], ebx
jb 0x40852a
mov eax, dword [ebp - 0x40]
sub eax, ebx
cmp eax, 0x7ff
ja 0x40852a
mov ebx, dword [ebp - 0x40]
mov dword [ebp - 0x40], 0
jmp 0x40852a
mov eax, edi
mov dword [esp], ebx
sub edi, 0x15
shl eax, 0xa
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.004082b3
push eax
push eax
cmp edi, 6
jbe 0x408733
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 0x40877a
mov edx, ebx
sub edx, 0x42cf40
cmp edx, 0x3ff
jg 0x40877a
cmp al, 3
ja 0x40875e
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 0x408713
mov eax, dword [0x42a620]
mov dword [ebp - 0x48], 1
test eax, eax
jns 0x4085c4
cmp ax, 0x5a04
je 0x4085c4
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 0x408622
mov eax, edx
and edx, 0x3f
mov dword [esp + 0xc], ebx
xor edi, edi
and eax, 0x40
add edx, dword [0x416538]
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp + 0x10], eax
mov dword [esp + 8], edx
mov dword [esp], 0x80000002
call fcn.00408123
sub esp, 0x14
cmp byte [ebx], 0
jne 0x408688
mov eax, dword [ebp - 0x3c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004084ad
push eax
push eax
jmp 0x408688
cmp dword [ebp - 0x44], 0x25
jne 0x40863b
mov dword [esp], ebx
mov dword [esp + 4], 0x400
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x408652
cmp dword [ebp - 0x44], 0x24
jne 0x408688
mov dword [esp + 4], 0x400
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push edi
push edi
xor edi, edi
jmp 0x408688
mov eax, dword [0x42a624]
mov edx, dword [ebp + edi*4 - 0x28]
test eax, eax
jne 0x40868f
lea eax, [ebp - 0x2c]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [0x42a62c]
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
sub esp, 0xc
test eax, eax
je 0x4086e4
mov byte [ebx], 0
sub edi, 1
jae 0x408658
jmp 0x4086c5
cmp dword [ebp - 0x48], 0
je 0x408665
mov ecx, dword [0x42a62c]
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 0x408665
cmp byte [ebx], 0
je 0x408733
cmp dword [ebp - 0x3c], 0x1a
jne 0x408733
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
push eax
push eax
jmp 0x408733
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 0x408685
jmp 0x4086c5
cmp al, 3
jne 0x408741
cmp edi, 0x1d
jne 0x4084f7
mov eax, dword [0x42a62c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004081cb
jmp 0x408757
mov dword [esp], ebx
call fcn.004083e4
push edi
jmp 0x40851b
dec al
jne 0x40851b
not edi
mov dword [esp], ebx
mov dword [esp + 4], edi
call fcn.004084ad
push ecx
push ecx
jmp 0x40851b
lea edx, [ebx + 1]
cmp al, 4
jne 0x408772
mov al, byte [esi + 1]
add esi, 2
mov byte [ebx], al
jmp 0x408528
mov byte [ebx], al
inc esi
jmp 0x408528
cmp dword [ebp - 0x40], 0
mov byte [ebx], 0
je 0x40879c
mov eax, dword [ebp - 0x40]
mov dword [ebp + 0xc], 0x42cf40
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004082b3
lea esp, [ebp - 0xc]
mov eax, 0x42cf40
pop ebx
pop esi
pop edi
pop ebp
ret 8