Function at 0x405db0
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x43a6c3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2dc
push esi
mov esi, dword [esp + 0x2f0]
push edi
mov dword [esp + 0x2dc], ecx
mov dword [esp + 0x2a0], esi
push esi
mov dword [esp + 0x2f0], 0
xor edi, edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x405e30
lea ebx, [ebx]
push edi
push esi
call dword [sym.imp.USER32.dll_GetMenuItemID]
cmp eax, 0xff00
jb 0x405e16
cmp eax, 0xfffd
jbe 0x405e30
cmp eax, 0xfffe
je 0x405e30
push esi
inc edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp edi, eax
jl 0x405e00
lea esp, [esp]
push 0x400
push edi
push esi
call dword [sym.imp.USER32.dll_DeleteMenu]
test eax, eax
jne 0x405e30
push eax
push eax
mov eax, dword [esp + 0x2e4]
push 0x1304
push dword [eax + 0x24]
call dword [sym.imp.USER32.dll_SendMessageA]
mov dl, byte [esp + 0x300]
mov dword [esp + 0x2e0], eax
test dl, dl
jne 0x405e72
test eax, eax
jle 0x40612c
test edi, edi
jle 0x405f3c
push 0x30
lea eax, [esp + 0x2a8]
push 0
push eax
call fcn.00423310
push 0x90
lea eax, [esp + 0x220]
mov dword [esp + 0x2b4], 0x30
push 0
push eax
mov dword [esp + 0x224], 0x94
call fcn.00423310
add esp, 0x18
lea eax, [esp + 0x20c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
test eax, eax
je 0x405ee5
mov eax, dword [esp + 0x210]
cmp eax, 5
jae 0x405ef0
cmp eax, 4
jne 0x405ee5
cmp dword [esp + 0x214], 0x5a
jae 0x405ef0
mov dword [esp + 0x2a4], 0x2c
lea eax, [esp + 0x2a4]
mov dword [esp + 0x2a8], 0x10
push eax
push 1
lea eax, [edi - 1]
push eax
push esi
call dword [sym.imp.USER32.dll_GetMenuItemInfoA]
test dword [esp + 0x2ac], 0x800
jne 0x405f2e
push 0
push 0
push 0x800
push esi
call dword [sym.imp.USER32.dll_AppendMenuA]
inc edi
mov dl, byte [esp + 0x300]
mov eax, dword [esp + 0x2e0]
test eax, eax
jle 0x40612c
mov ecx, dword [esp + 0x2f8]
cmp eax, ecx
cmovl ecx, eax
mov dword [esp + 0x2f8], ecx
cmp ecx, 0xfe
jge 0x405f64
cmp ecx, 0x64
jl 0x405f70
mov ecx, 0x63
mov dword [esp + 0x2f8], ecx
xor eax, eax
mov dword [esp + 0x2fc], eax
test ecx, ecx
jle 0x4060be
lea ecx, [esp + 0x2b0]
mov dword [esp + 0x2b0], 8
push ecx
push eax
mov eax, dword [esp + 0x2e4]
xorps xmm0, xmm0
push 0x1305
movdqu xmmword [esp + 0x2c0], xmm0
push dword [eax + 0x24]
movdqu xmmword [esp + 0x2d4], xmm0
call dword [sym.imp.USER32.dll_SendMessageA]
neg eax
sbb eax, eax
and eax, dword [esp + 0x2cc]
push eax
mov dword [esp + 0x2d8], eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov dword [esp + 8], 0
add eax, 4
mov byte [esp + 0x2ec], 1
xor ecx, ecx
mov dword [esp + 0x2d8], eax
ja 0x40610c
jb 0x406005
cmp eax, 0xffffffff
ja 0x40610c
cmp eax, 0x200
jbe 0x40601c
push eax
lea ecx, [esp + 0xc]
call fcn.004048b0
mov edx, dword [esp + 8]
jmp 0x406024
lea edx, [esp + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 0x2e0], edx
test edx, edx
je 0x406087
mov esi, dword [esp + 0x2fc]
mov eax, str._i__s
push dword [esp + 0x2d4]
cmp esi, 9
mov ecx, 0x43c480
cmovge ecx, eax
add esi, 0xff00
lea eax, [esi - 0xfeff]
push eax
push ecx
push dword [esp + 0x2e4]
push edx
call fcn.0041c390
add esp, 0x14
push dword [esp + 0x2e0]
push esi
mov esi, dword [esp + 0x2fc]
push 0
push esi
call dword [sym.imp.USER32.dll_AppendMenuA]
mov edx, dword [esp + 8]
lea eax, [esp + 0xc]
mov byte [esp + 0x2ec], 0
cmp edx, eax
je 0x4060a0
lea ecx, [esp + 8]
call fcn.0040b540
mov eax, dword [esp + 0x2fc]
mov ecx, dword [esp + 0x2f8]
inc eax
mov dword [esp + 0x2fc], eax
cmp eax, ecx
jl 0x405f81
cmp byte [esp + 0x304], 0
je 0x40615a
mov eax, dword [esp + 0x2dc]
mov eax, dword [eax + 0x50]
cmp eax, 0xffffffff
je 0x40615a
cmp byte [esp + 0x308], 0
je 0x406116
push 1
push 0xffffffffffffffff
push esi
mov esi, dword [sym.imp.USER32.dll_SetMenuDefaultItem]
call esi
mov eax, dword [esp + 0x2dc]
push 1
mov eax, dword [eax + 0x50]
add eax, edi
push eax
push dword [esp + 0x2fc]
call esi
jmp 0x40615a
push 0x80070216
call fcn.004055d0
push 0x400
add eax, edi
push eax
lea eax, [edi + ecx]
push eax
push edi
push esi
call dword [sym.imp.USER32.dll_CheckMenuRadioItem]
jmp 0x40615a
cmp byte [esp + 0x2fc], 0
je 0x40619a
push str._Empty_
push 0xff00
push 0x400
push esi
call dword [sym.imp.USER32.dll_AppendMenuA]
push 1
push 0xff00
push esi
call dword [sym.imp.USER32.dll_EnableMenuItem]
cmp byte [esp + 0x300], 0
je 0x406181
mov esi, dword [esp + 0x2f4]
push str.Windows...
push 0xfffe
push 0x400
push esi
call dword [sym.imp.USER32.dll_AppendMenuA]
mov ecx, dword [esp + 0x2e4]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x2e8
ret 0x18
test dl, dl
jne 0x40616b
test edi, edi
jle 0x406181
lea ecx, [esp + 0x2a4]
call fcn.004020d0
lea eax, [esp + 0x2a4]
mov dword [esp + 0x2a8], 0x10
push eax
push 1
dec edi
push edi
push esi
call dword [sym.imp.USER32.dll_GetMenuItemInfoA]
test dword [esp + 0x2ac], 0x800
je 0x406181
push 0x400
push edi
push esi
call dword [sym.imp.USER32.dll_DeleteMenu]
jmp 0x406181