Function at 0x407f9a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov esi, dword [ebp + 0xc]
test esi, esi
jns 0x407fb6
inc esi
imul esi, esi, 0xfffffffc
add esi, dword [0x42cce4]
mov esi, dword [esi]
add esi, dword [0x42c458]
mov ebx, 0x42cd00
cmp dword [ebp + 8], ebx
jb 0x408010
mov eax, dword [ebp + 8]
sub eax, ebx
cmp eax, 0x7ff
ja 0x408010
mov ebx, dword [ebp + 8]
mov dword [ebp + 8], 0
jmp 0x408010
mov eax, edi
mov dword [esp], ebx
sub edi, 0x15
shl eax, 0xa
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.00407e58
push eax
push eax
cmp edi, 6
jbe 0x408220
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ecx
add eax, ebx
mov ebx, eax
mov dl, byte [esi]
test dl, dl
je 0x408268
mov eax, ebx
sub eax, 0x42cd00
cmp eax, 0x3ff
jg 0x408268
cmp dl, 3
ja 0x40824b
movsx eax, byte [esi + 2]
movsx ecx, byte [esi + 1]
add esi, 3
mov dword [ebp - 0x3c], eax
mov edi, dword [ebp - 0x3c]
mov eax, ecx
mov dword [ebp - 0x40], ecx
and ecx, 0x7f
shl edi, 7
and edi, 0x3f80
or edi, ecx
movsx ecx, al
or ch, 0x80
mov dword [ebp - 0x28], ecx
movsx ecx, al
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 dl, 2
jne 0x4081ff
mov edx, dword [0x42c4a0]
mov dword [ebp - 0x44], 1
test edx, edx
jns 0x4080ac
cmp dx, 0x5a04
je 0x4080ac
cmp ecx, 0x23
sete dl
cmp ecx, 0x2e
sete cl
or edx, ecx
movzx ecx, dl
mov dword [ebp - 0x44], ecx
cmp dword [0x42c3e4], 1
sbb edi, edi
and edi, 0xfffffffe
add edi, 4
test al, al
jns 0x40810d
mov edx, eax
and eax, 0x3f
mov dword [esp + 0xc], ebx
xor edi, edi
and edx, 0x40
add eax, dword [0x42c458]
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
movsx edx, dl
mov dword [esp + 8], eax
mov dword [esp + 0x10], edx
mov dword [esp], 0x80000002
call fcn.00407cd3
sub esp, 0x14
cmp byte [ebx], 0
jne 0x408173
mov eax, dword [ebp - 0x3c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00407f9a
push eax
push eax
jmp 0x408173
cmp dword [ebp - 0x40], 0x25
jne 0x408126
mov dword [esp], ebx
mov dword [esp + 4], 0x400
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x40813d
cmp dword [ebp - 0x40], 0x24
jne 0x408173
mov dword [esp + 4], 0x400
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push edi
push edi
xor edi, edi
jmp 0x408173
mov eax, dword [0x42c4a4]
mov edx, dword [ebp + edi*4 - 0x28]
test eax, eax
jne 0x40817b
lea eax, [ebp - 0x2c]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [0x42c4a8]
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
sub esp, 0xc
test eax, eax
je 0x4081d0
mov byte [ebx], 0
dec edi
cmp edi, 0xffffffff
jne 0x408143
jmp 0x4081b1
cmp dword [ebp - 0x44], 0
je 0x408150
mov ecx, dword [0x42c4a8]
mov dword [esp + 4], edx
mov dword [ebp - 0x40], 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 - 0x40]
sub esp, 0x14
test eax, eax
jne 0x408150
cmp byte [ebx], 0
je 0x408220
cmp dword [ebp - 0x3c], 0x1a
jne 0x408220
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
push eax
push eax
jmp 0x408220
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 - 0x40], eax
mov dword [esp], edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x40]
push ecx
test eax, eax
je 0x408170
jmp 0x4081b1
cmp dl, 3
jne 0x40822e
cmp edi, 0x1d
jne 0x407fde
mov eax, dword [0x42c4a8]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00407d7b
jmp 0x408244
mov dword [esp], ebx
call fcn.00407ed1
push eax
jmp 0x408002
dec dl
jne 0x408002
not edi
mov dword [esp], ebx
mov dword [esp + 4], edi
call fcn.00407f9a
push edi
push edi
jmp 0x408002
lea eax, [ebx + 1]
cmp dl, 4
jne 0x408260
mov dl, byte [esi + 1]
add esi, 2
mov byte [ebx], dl
jmp 0x40800e
mov byte [ebx], dl
inc esi
jmp 0x40800e
cmp dword [ebp + 8], 0
mov byte [ebx], 0
mov eax, 0x42cd00
je 0x408287
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00407e58
push edx
push edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8