Function at 0x408330
Capabilities:
Get common file path

Disassembly:
sub esp, 0x18
push ebp
mov ebp, dword [esp + 0x24]
push esi
test ebp, ebp
jge 0x40834e
mov ecx, dword [0x440d80]
lea eax, [ebp*4 + 4]
sub ecx, eax
mov ebp, dword [ecx]
mov edx, dword [0x4415d8]
mov eax, dword [esp + 0x24]
mov esi, 0x440560
add ebp, edx
cmp eax, esi
jb 0x40837d
mov ecx, eax
sub ecx, esi
cmp ecx, 0x800
jae 0x40837d
mov dword [esp + 0x24], 0
mov esi, eax
mov eax, dword [esp + 0x24]
mov cl, byte [ebp]
test cl, cl
je 0x4085d6
push ebx
push edi
lea ebx, [ebx]
mov edx, esi
sub edx, 0x440560
cmp edx, 0x400
jge 0x4085d4
inc ebp
cmp cl, 4
jae 0x4085bb
movsx eax, byte [ebp + 1]
movsx ebx, byte [ebp]
mov edi, eax
and edi, 0x7f
mov edx, ebx
and edx, 0x7f
shl edi, 7
or edi, edx
mov edx, ebx
or edx, 0x8000
mov dword [esp + 0x18], edx
mov edx, eax
or edx, 0x8000
add ebp, 2
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], ebp
cmp cl, 2
jne 0x408544
mov ebp, 2
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x408426
mov ecx, 0x5a04
cmp ax, cx
je 0x408426
mov edi, dword [esp + 0x24]
cmp edi, 0x23
je 0x408426
cmp edi, 0x2e
je 0x408426
mov dword [esp + 0x30], 0
jmp 0x408432
mov edi, dword [esp + 0x24]
mov dword [esp + 0x30], 1
cmp dword [0x4436a4], 0
je 0x408440
mov ebp, 4
test bl, bl
jns 0x4084a4
mov eax, ebx
and ebx, 0x3f
add ebx, dword [0x4415d8]
and eax, 0x40
push ebx
push 0x80000002
mov edx, str.SoftwareMicrosoftWindowsCurrentVersion
call fcn.00408220
cmp byte [esi], 0
jne 0x408477
push edi
push esi
call fcn.00408330
cmp byte [esi], 0
je 0x408488
mov edi, dword [esp + 0x24]
cmp edi, 0x1a
jne 0x408488
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call fcn.00408610
mov ebp, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
mov eax, dword [esp + 0x2c]
jmp 0x4085c9
cmp ebx, 0x25
jne 0x4084b7
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x40846e
cmp ebx, 0x24
jne 0x4084ca
push 0x400
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x40846e
test ebp, ebp
je 0x40846e
mov edi, edi
mov eax, dword [0x4415a0]
dec ebp
test eax, eax
je 0x4084fc
cmp dword [esp + 0x30], 0
je 0x4084fc
mov edx, dword [esp + ebp*4 + 0x18]
mov ecx, dword [0x4415a4]
push esi
push 0
push 0
push edx
push ecx
call eax
test eax, eax
je 0x40846e
mov eax, dword [esp + ebp*4 + 0x18]
mov ecx, dword [0x4415a4]
lea edx, [esp + 0x10]
push edx
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x408538
mov edx, dword [esp + 0x10]
push esi
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov edi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test edi, edi
jne 0x40846e
mov byte [esi], 0
test ebp, ebp
jne 0x4084d0
jmp 0x408488
cmp cl, 3
jne 0x40859b
cmp edi, 0x1d
jne 0x408566
mov ecx, dword [0x4415a4]
push ecx
push 0x4209cc
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x40857e
mov edx, edi
shl edx, 0xa
push 0x400
add edx, section..ndata
push edx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
add edi, 0xffffffeb
cmp edi, 7
jae 0x4085ac
push esi
call fcn.00408610
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
mov eax, dword [esp + 0x2c]
jmp 0x4085c9
cmp cl, 1
jne 0x4085ac
or eax, 0xffffffff
sub eax, edi
push eax
push esi
call fcn.00408330
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
mov eax, dword [esp + 0x2c]
jmp 0x4085c9
jne 0x4085c6
mov cl, byte [ebp]
mov byte [esi], cl
inc esi
inc ebp
jmp 0x4085c9
mov byte [esi], cl
inc esi
mov cl, byte [ebp]
test cl, cl
jne 0x408390
pop edi
pop ebx
mov byte [esi], 0
pop esi
pop ebp
test eax, eax
je 0x4085f6
push 0x400
push 0x440560
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
add esp, 0x18
ret 8
mov eax, 0x440560
add esp, 0x18
ret 8