Function at 0x4065b4
Capabilities:
Check os version
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [ebp + 0xc]
test edx, edx
jns 0x4065ce
mov eax, dword [0x4255f8]
not edx
mov edx, dword [eax + edx*4]
mov eax, dword [ebp + 8]
mov ecx, dword [0x424cd0]
mov dword [ebp - 0x34], 0x425608
sub eax, 0x425608
cmp eax, 0x7ff
ja 0x4065f7
mov eax, dword [ebp + 8]
mov dword [ebp + 8], 0
mov dword [ebp - 0x34], eax
add edx, ecx
mov dword [ebp - 0x38], edx
jmp 0x406837
inc dword [ebp - 0x38]
cmp dl, 0xfc
jbe 0x406815
mov eax, dword [ebp - 0x38]
movsx eax, byte [eax + 1]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x38]
movsx esi, byte [eax]
mov eax, esi
or ah, 0x80
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], esi
or ah, 0x80
cmp dl, 0xfe
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x14], eax
jne 0x406788
call sub.KERNEL32.dll_GetVersion
test eax, eax
jns 0x406667
cmp ax, 0x5a04
je 0x406667
cmp dword [ebp - 0x3c], 0x23
sete al
cmp dword [ebp - 0x3c], 0x2e
sete dl
or eax, edx
movzx eax, al
mov dword [ebp - 0x30], eax
jmp 0x40666e
mov dword [ebp - 0x30], 1
cmp dword [0x424c4c], 1
mov edx, esi
sbb edi, edi
and edi, 0xfffffffe
add edi, 4
test dl, dl
jns 0x4066cf
mov eax, esi
sub esp, 0xc
and eax, 0x40
and esi, 0x3f
push eax
xor edi, edi
push dword [ebp - 0x34]
add esi, dword [0x424cd0]
push esi
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406534
mov eax, dword [ebp - 0x34]
add esp, 0xc
cmp byte [eax], 0
jne 0x4066c6
push ecx
push ecx
push dword [ebp - 0x3c]
push dword [ebp - 0x34]
call fcn.004065b4
pop eax
xor edi, edi
pop edx
lea esi, [ebp + edi*4 - 0x24]
jmp 0x406765
cmp esi, 0x25
jne 0x4066e5
push esi
push esi
push 0x400
push dword [ebp - 0x34]
call sub.KERNEL32.dll_GetSystemDirectoryA
jmp 0x4066c2
cmp esi, 0x24
jne 0x4066c6
push ebx
push ebx
push 0x400
push dword [ebp - 0x34]
call sub.KERNEL32.dll_GetWindowsDirectoryA
jmp 0x4066c2
mov eax, dword [0x424d38]
dec edi
test eax, eax
je 0x406726
cmp dword [ebp - 0x30], 0
je 0x406726
sub esp, 0xc
push dword [ebp - 0x34]
push 0
push 0
push dword [esi]
push dword [0x424d48]
call eax
add esp, 0xc
test eax, eax
je 0x406769
lea edx, [ebp - 0x10]
push ecx
push edx
push dword [esi]
push dword [0x424d48]
call sub.SHELL32.DLL_SHGetSpecialFolderLocation
pop edx
test eax, eax
jne 0x40675c
push eax
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x10]
call sub.SHELL32.DLL_SHGetPathFromIDListA
mov ebx, eax
push eax
push dword [ebp - 0x10]
call sub.OLE32.dll_CoTaskMemFree
add esp, 0xc
test ebx, ebx
jne 0x406769
mov eax, dword [ebp - 0x34]
sub esi, 4
mov byte [eax], 0
test edi, edi
jne 0x4066fb
mov edx, dword [ebp - 0x34]
cmp byte [edx], 0
je 0x4067db
cmp dword [ebp - 0x3c], 0x1a
jne 0x4067db
push ecx
push ecx
push str.MicrosoftInternet_ExplorerQuick_Launch
push edx
call sub.KERNEL32.dll_lstrcatA
pop eax
pop edx
jmp 0x4067db
mov ebx, dword [ebp - 0x3c]
and esi, 0x7f
and ebx, 0x7f
shl ebx, 7
or ebx, esi
cmp dl, 0xfd
jne 0x4067eb
cmp ebx, 0x1d
jne 0x4067b9
push eax
push dword [0x424d48]
push 0x40a517
push dword [ebp - 0x34]
call sub.USER32.dll_wsprintfA
add esp, 0x10
jmp 0x4067d3
push eax
mov eax, ebx
shl eax, 0xa
push 0x400
add eax, section..ndata
push eax
push dword [ebp - 0x34]
call sub.KERNEL32.dll_lstrcpynA
pop eax
lea eax, [ebx - 0x15]
cmp eax, 6
ja 0x4067fe
sub esp, 0xc
push dword [ebp - 0x34]
call fcn.004063a5
add esp, 0xc
jmp 0x4067fe
inc dl
jne 0x4067fe
push edi
not ebx
push edi
push ebx
push dword [ebp - 0x34]
call fcn.004065b4
pop ebx
pop esi
sub esp, 0xc
push dword [ebp - 0x34]
add dword [ebp - 0x38], 2
call sub.KERNEL32.dll_lstrlenA
add dword [ebp - 0x34], eax
add esp, 0xc
jmp 0x406837
mov eax, dword [ebp - 0x34]
lea ecx, [eax + 1]
jne 0x40682f
mov edx, dword [ebp - 0x38]
mov al, byte [edx]
mov edx, dword [ebp - 0x34]
mov byte [edx], al
mov dword [ebp - 0x34], ecx
inc dword [ebp - 0x38]
jmp 0x406837
mov eax, dword [ebp - 0x34]
mov byte [eax], dl
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp - 0x38]
mov dl, byte [eax]
test dl, dl
je 0x406853
mov eax, dword [ebp - 0x34]
sub eax, 0x425608
cmp eax, 0x3ff
jle 0x406601
mov edx, dword [ebp - 0x34]
mov eax, 0x425608
mov byte [edx], 0
cmp dword [ebp + 8], 0
je 0x406878
push ecx
push 0x400
push 0x425608
push dword [ebp + 8]
call sub.KERNEL32.dll_lstrcpynA
pop edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8