Function at 0x408469
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 0x40848b
inc esi
imul esi, esi, 0xfffffffc
add esi, dword [0x42a260]
mov esi, dword [esi]
add esi, dword [0x415538]
mov ebx, 0x42c340
cmp dword [ebp - 0x40], ebx
jb 0x4084e6
mov eax, dword [ebp - 0x40]
sub eax, ebx
cmp eax, 0x7ff
ja 0x4084e6
mov ebx, dword [ebp - 0x40]
mov dword [ebp - 0x40], 0
jmp 0x4084e6
mov eax, edi
mov dword [esp], ebx
sub edi, 0x15
shl eax, 0xa
add eax, section..ndata
mov dword [esp + 4], eax
call fcn.0040826f
push eax
push eax
cmp edi, 6
jbe 0x4086ef
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 0x408736
mov edx, ebx
sub edx, 0x42c340
cmp edx, 0x3ff
jg 0x408736
cmp al, 3
ja 0x40871a
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 0x4086cf
mov eax, dword [0x429620]
mov dword [ebp - 0x48], 1
test eax, eax
jns 0x408580
cmp ax, 0x5a04
je 0x408580
cmp ecx, 0x23
sete al
cmp ecx, 0x2e
sete cl
or eax, ecx
movzx eax, al
mov dword [ebp - 0x48], eax
cmp dword [0x414064], 1
sbb edi, edi
and edi, 0xfffffffe
add edi, 4
test dl, dl
jns 0x4085de
mov eax, edx
and edx, 0x3f
mov dword [esp + 0xc], ebx
xor edi, edi
and eax, 0x40
add edx, dword [0x415538]
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersion
mov dword [esp + 0x10], eax
mov dword [esp + 8], edx
mov dword [esp], 0x80000002
call fcn.004080df
sub esp, 0x14
cmp byte [ebx], 0
jne 0x408644
mov eax, dword [ebp - 0x3c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00408469
push eax
push eax
jmp 0x408644
cmp dword [ebp - 0x44], 0x25
jne 0x4085f7
mov dword [esp], ebx
mov dword [esp + 4], 0x400
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x40860e
cmp dword [ebp - 0x44], 0x24
jne 0x408644
mov dword [esp + 4], 0x400
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push edi
push edi
xor edi, edi
jmp 0x408644
mov eax, dword [0x429624]
mov edx, dword [ebp + edi*4 - 0x28]
test eax, eax
jne 0x40864b
lea eax, [ebp - 0x2c]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [0x42962c]
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
sub esp, 0xc
test eax, eax
je 0x4086a0
mov byte [ebx], 0
sub edi, 1
jae 0x408614
jmp 0x408681
cmp dword [ebp - 0x48], 0
je 0x408621
mov ecx, dword [0x42962c]
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 0x408621
cmp byte [ebx], 0
je 0x4086ef
cmp dword [ebp - 0x3c], 0x1a
jne 0x4086ef
mov dword [esp + 4], str.MicrosoftInternet_ExplorerQuick_Launch
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrcatA
push eax
push eax
jmp 0x4086ef
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 0x408641
jmp 0x408681
cmp al, 3
jne 0x4086fd
cmp edi, 0x1d
jne 0x4084b3
mov eax, dword [0x42962c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00408187
jmp 0x408713
mov dword [esp], ebx
call fcn.004083a0
push edi
jmp 0x4084d7
dec al
jne 0x4084d7
not edi
mov dword [esp], ebx
mov dword [esp + 4], edi
call fcn.00408469
push ecx
push ecx
jmp 0x4084d7
lea edx, [ebx + 1]
cmp al, 4
jne 0x40872e
mov al, byte [esi + 1]
add esi, 2
mov byte [ebx], al
jmp 0x4084e4
mov byte [ebx], al
inc esi
jmp 0x4084e4
cmp dword [ebp - 0x40], 0
mov byte [ebx], 0
je 0x408758
mov eax, dword [ebp - 0x40]
mov dword [ebp + 0xc], 0x42c340
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.0040826f
lea esp, [ebp - 0xc]
mov eax, 0x42c340
pop ebx
pop esi
pop edi
pop ebp
ret 8