Function at 0x587dd0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x663850
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x154
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], eax
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], 0x71676c
mov byte [ebp - 0x10], 0
mov byte [ebp - 4], 2
push 0x71676c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x10], 1
cmp esi, edi
je 0x587e2e
lea ecx, [esi + 4]
mov dword [0x712b4c], ecx
jmp 0x587e34
mov dword [0x712b4c], edi
mov edi, dword [0x716734]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push edi
push 0x569410
push 5
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
mov ebx, dword [ebp + 0x14]
mov dword [0x712b48], eax
mov dl, byte [esi + 0x84]
mov eax, dword [ebp + 0x10]
mov edi, dword [esi + 4]
and dl, 0xf7
or dl, 1
push ebx
push eax
mov byte [esi + 0x84], dl
call fcn.00444c60
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0xc]
add esp, 8
push ecx
push edi
push ebx
push eax
mov eax, dword [ebp + 8]
push edx
push eax
call dword [sym.imp.USER32.dll_TrackPopupMenuEx]
and byte [esi + 0x84], 0xfe
mov ecx, dword [0x712b48]
push ecx
mov dword [ebp + 0x14], eax
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
xor eax, eax
push 0x71676c
mov dword [0x712b48], eax
mov dword [0x712b4c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [esi + 4]
push edx
mov byte [ebp - 0x10], 0
call dword [sym.imp.USER32.dll_UpdateWindow]
mov edi, dword [esi + 4]
mov ebx, dword [sym.imp.USER32.dll_GetParent]
push edi
call ebx
test eax, eax
je 0x587ee9
lea ebx, [ebx]
push eax
mov edi, eax
call ebx
test eax, eax
jne 0x587ee0
push edi
call dword [sym.imp.USER32.dll_UpdateWindow]
test byte [esi + 0x84], 4
je 0x58809e
lea ecx, [ecx]
mov eax, dword [esi + 0x18]
lea ecx, [eax - 1]
test ecx, ecx
js 0x58809e
mov edx, dword [esi + 0x14]
mov ebx, dword [edx + ecx*4]
lea edx, [edx + ecx*4]
cmp ecx, eax
jge 0x58809e
lea edi, [eax - 1]
cmp ecx, edi
je case.0x587f4e.0
sub eax, ecx
add eax, eax
add eax, eax
lea ecx, [eax - 4]
push ecx
lea edi, [edx + 4]
push edi
push eax
push edx
call fcn.0060fc48
add esp, 0x10
cmp eax, 0x50
ja case.0x587f4e.1
movzx eax, byte [eax + 0x5880cc]
jmp dword [eax*4 + 0x5880bc]
dec dword [esi + 0x18]
test ebx, ebx
je 0x58809e
push ebx
mov dword [ebp - 0x18], ebx
xor edi, edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x587f00
push 0x30
lea ecx, [ebp - 0x4c]
push 0
push ecx
call fcn.006100a0
push pe_nt_image_headers32
lea edx, [ebp - 0x15c]
push 0
push edx
mov dword [ebp - 0x4c], 0x30
call fcn.006100a0
add esp, 0x18
lea eax, [ebp - 0x160]
push eax
mov dword [ebp - 0x160], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x587fce
mov eax, dword [ebp - 0x15c]
cmp eax, 5
jae 0x587fd5
cmp eax, 4
jne 0x587fce
cmp dword [ebp - 0x158], 0x5a
jae 0x587fd5
mov dword [ebp - 0x4c], 0x2c
lea ecx, [ebp - 0x4c]
push ecx
push 1
push edi
push ebx
mov dword [ebp - 0x48], 0x32
call dword [sym.imp.USER32.dll_GetMenuItemInfoW]
mov eax, dword [ebp - 0x2c]
mov dword [ebp + 8], eax
test eax, eax
je 0x58806b
cmp dword [eax], 0x1313
jne 0x58806b
mov dword [ebp - 0x48], 0x31
mov edx, dword [eax + 8]
mov dword [ebp - 0x44], edx
mov ecx, dword [eax + 0xc]
lea esi, [eax + 4]
mov dword [ebp - 0x40], ecx
mov edx, dword [esi]
mov dword [ebp - 0x28], edx
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp - 0x4c]
push ecx
push 1
push edi
push ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x2c], 0
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
mov ecx, dword [ebp - 0x40]
mov edx, dword [esi]
or ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x3c]
push edx
push eax
or ecx, 0x400
push ecx
push edi
push ebx
call dword [sym.imp.USER32.dll_ModifyMenuW]
mov edx, dword [esi]
push edx
call fcn.00611a0b
mov eax, dword [ebp + 8]
push eax
call fcn.0060faf6
mov esi, dword [ebp - 0x1c]
add esp, 8
push ebx
inc edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp edi, eax
jl 0x587f70
jmp 0x587f00
push 0x8007000e
call fcn.004011d0
push 0x80070057
call fcn.004011d0
push 0x80004005
call fcn.004011d0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x14]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x14