Function at 0x406414
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 0x40642e
mov eax, dword [0x430298]
not edx
mov edx, dword [eax + edx*4]
mov eax, dword [ebp + 8]
mov ecx, dword [0x42f970]
mov dword [ebp - 0x34], 0x4302a8
sub eax, 0x4302a8
cmp eax, 0x7ff
ja 0x406457
mov eax, dword [ebp + 8]
mov dword [ebp + 8], 0
mov dword [ebp - 0x34], eax
add edx, ecx
mov dword [ebp - 0x38], edx
jmp 0x406697
inc dword [ebp - 0x38]
cmp dl, 0xfc
jbe 0x406675
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 0x4065e8
call sub.KERNEL32.dll_GetVersion
test eax, eax
jns 0x4064c7
cmp ax, 0x5a04
je 0x4064c7
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 0x4064ce
mov dword [ebp - 0x30], 1
cmp dword [0x42f8ec], 1
mov edx, esi
sbb edi, edi
and edi, 0xfffffffe
add edi, 4
test dl, dl
jns 0x40652f
mov eax, esi
sub esp, 0xc
and eax, 0x40
and esi, 0x3f
push eax
xor edi, edi
push dword [ebp - 0x34]
add esi, dword [0x42f970]
push esi
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406394
mov eax, dword [ebp - 0x34]
add esp, 0xc
cmp byte [eax], 0
jne 0x406526
push ecx
push ecx
push dword [ebp - 0x3c]
push dword [ebp - 0x34]
call fcn.00406414
pop eax
xor edi, edi
pop edx
lea esi, [ebp + edi*4 - 0x24]
jmp 0x4065c5
cmp esi, 0x25
jne 0x406545
push esi
push esi
push 0x400
push dword [ebp - 0x34]
call sub.KERNEL32.dll_GetSystemDirectoryA
jmp 0x406522
cmp esi, 0x24
jne 0x406526
push ebx
push ebx
push 0x400
push dword [ebp - 0x34]
call sub.KERNEL32.dll_GetWindowsDirectoryA
jmp 0x406522
mov eax, dword [0x42f9d8]
dec edi
test eax, eax
je 0x406586
cmp dword [ebp - 0x30], 0
je 0x406586
sub esp, 0xc
push dword [ebp - 0x34]
push 0
push 0
push dword [esi]
push dword [0x42f9e8]
call eax
add esp, 0xc
test eax, eax
je 0x4065c9
lea edx, [ebp - 0x10]
push ecx
push edx
push dword [esi]
push dword [0x42f9e8]
call sub.SHELL32.DLL_SHGetSpecialFolderLocation
pop edx
test eax, eax
jne 0x4065bc
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 0x4065c9
mov eax, dword [ebp - 0x34]
sub esi, 4
mov byte [eax], 0
test edi, edi
jne 0x40655b
mov edx, dword [ebp - 0x34]
cmp byte [edx], 0
je 0x40663b
cmp dword [ebp - 0x3c], 0x1a
jne 0x40663b
push ecx
push ecx
push str.MicrosoftInternet_ExplorerQuick_Launch
push edx
call sub.KERNEL32.dll_lstrcatA
pop eax
pop edx
jmp 0x40663b
mov ebx, dword [ebp - 0x3c]
and esi, 0x7f
and ebx, 0x7f
shl ebx, 7
or ebx, esi
cmp dl, 0xfd
jne 0x40664b
cmp ebx, 0x1d
jne 0x406619
push eax
push dword [0x42f9e8]
push 0x40a4bf
push dword [ebp - 0x34]
call sub.USER32.dll_wsprintfA
add esp, 0x10
jmp 0x406633
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 0x40665e
sub esp, 0xc
push dword [ebp - 0x34]
call fcn.00406205
add esp, 0xc
jmp 0x40665e
inc dl
jne 0x40665e
push edi
not ebx
push edi
push ebx
push dword [ebp - 0x34]
call fcn.00406414
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 0x406697
mov eax, dword [ebp - 0x34]
lea ecx, [eax + 1]
jne 0x40668f
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 0x406697
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 0x4066b3
mov eax, dword [ebp - 0x34]
sub eax, 0x4302a8
cmp eax, 0x3ff
jle 0x406461
mov edx, dword [ebp - 0x34]
mov eax, 0x4302a8
mov byte [edx], 0
cmp dword [ebp + 8], 0
je 0x4066d8
push ecx
push 0x400
push 0x4302a8
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