Function at 0x409890
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x43a7d6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xd8
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0xf0], 0
mov dword [esp + 0x4c], 0x44dff0
push 0x44dff0
mov byte [esp + 0xf4], 1
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
test ebx, ebx
je 0x4098e9
lea eax, [ebx + 4]
mov dword [0x44e06c], eax
jmp 0x4098f3
mov dword [0x44e06c], 0
mov esi, dword [0x44ecb0]
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
push eax
push esi
push 0x407550
push 5
call dword [sym.imp.USER32.dll_SetWindowsHookExA]
mov edi, dword [esp + 0x104]
mov dword [0x44e064], eax
mov al, byte [ebx + 0x84]
mov esi, dword [ebx + 4]
and al, 0xf7
push edi
push dword [esp + 0x104]
or al, 1
mov byte [ebx + 0x84], al
call fcn.0041b480
add esp, 8
push dword [esp + 0x108]
push esi
push edi
push eax
push dword [esp + 0x10c]
push dword [esp + 0x10c]
call dword [sym.imp.USER32.dll_TrackPopupMenuEx]
and byte [ebx + 0x84], 0xfe
push dword [0x44e064]
mov dword [esp + 0x14], eax
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
push 0x44dff0
mov dword [0x44e064], 0
mov dword [0x44e06c], 0
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
push dword [ebx + 4]
mov ebp, dword [sym.imp.USER32.dll_UpdateWindow]
mov byte [esp + 0x54], 0
call ebp
mov esi, dword [ebx + 4]
mov edi, dword [sym.imp.USER32.dll_GetParent]
push esi
call edi
test eax, eax
je 0x4099ba
push eax
mov esi, eax
call edi
test eax, eax
jne 0x4099b1
push esi
call ebp
test byte [ebx + 0x84], 4
je 0x409b15
mov ebp, dword [sym.imp.USER32.dll_GetMenuItemCount]
jmp 0x4099d6
mov ebx, dword [esp + 0x14]
mov edx, dword [ebx + 0x18]
lea ecx, [edx - 1]
test ecx, ecx
js 0x409b15
mov eax, dword [ebx + 0x14]
mov ebx, dword [eax + ecx*4]
cmp ecx, edx
jge 0x409b15
mov eax, dword [esp + 0x14]
mov dword [eax + 0x18], ecx
test ebx, ebx
je 0x409b15
push ebx
mov dword [esp + 0x4c], ebx
xor edi, edi
call ebp
test eax, eax
jle 0x4099d2
mov edi, edi
push 0x30
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.00423310
push 0x90
lea eax, [esp + 0x68]
mov dword [esp + 0x28], 0x30
push 0
push eax
mov dword [esp + 0x6c], 0x94
call fcn.00423310
add esp, 0x18
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
test eax, eax
je 0x409a66
mov eax, dword [esp + 0x58]
cmp eax, 5
jae 0x409a6e
cmp eax, 4
jne 0x409a66
cmp dword [esp + 0x5c], 0x5a
jae 0x409a6e
mov dword [esp + 0x18], 0x2c
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], 0x32
push eax
push 1
push edi
push ebx
call dword [sym.imp.USER32.dll_GetMenuItemInfoA]
mov esi, dword [esp + 0x38]
test esi, esi
je 0x409b04
cmp dword [esi], 0x1313
jne 0x409b04
mov dword [esp + 0x1c], 0x31
mov eax, dword [esi + 8]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x3c], eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x18]
push eax
push 1
push edi
push ebx
mov dword [esp + 0x48], 0
call dword [sym.imp.USER32.dll_SetMenuItemInfoA]
push dword [esi + 4]
mov eax, dword [esp + 0x28]
push dword [esp + 0x2c]
or eax, dword [esp + 0x28]
or eax, 0x400
push eax
push edi
push ebx
call dword [sym.imp.USER32.dll_ModifyMenuA]
push dword [esi + 4]
call fcn.00423300
push esi
call fcn.004230b6
add esp, 8
push ebx
inc edi
call ebp
cmp edi, eax
jl 0x409a10
jmp 0x4099d2
mov ecx, dword [esp + 0xe8]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xe4
ret 0x14