Function at 0x4d7620
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x591ef0
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], 0x5fd804
mov byte [ebp - 0x10], 0
mov byte [ebp - 4], 2
push 0x5fd804
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x10], 1
cmp esi, edi
je 0x4d767e
lea ecx, [esi + 4]
mov dword [0x5f719c], ecx
jmp 0x4d7684
mov dword [0x5f719c], edi
mov edi, dword [0x5fd7bc]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push edi
push 0x4bd6a0
push 5
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
mov ebx, dword [ebp + 0x14]
mov dword [0x5f7198], 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.004161d0
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 [0x5f7198]
push ecx
mov dword [ebp + 0x14], eax
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
xor eax, eax
push 0x5fd804
mov dword [0x5f7198], eax
mov dword [0x5f719c], 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 0x4d7739
lea ebx, [ebx]
push eax
mov edi, eax
call ebx
test eax, eax
jne 0x4d7730
push edi
call dword [sym.imp.USER32.dll_UpdateWindow]
test byte [esi + 0x84], 4
je 0x4d78ee
lea ecx, [ecx]
mov eax, dword [esi + 0x18]
lea ecx, [eax - 1]
test ecx, ecx
js 0x4d78ee
mov edx, dword [esi + 0x14]
mov ebx, dword [edx + ecx*4]
lea edx, [edx + ecx*4]
cmp ecx, eax
jge 0x4d78ee
lea edi, [eax - 1]
cmp ecx, edi
je case.0x4d779e.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.00554df5
add esp, 0x10
cmp eax, 0x50
ja case.0x4d779e.1
movzx eax, byte [eax + 0x4d791c]
jmp dword [eax*4 + 0x4d790c]
dec dword [esi + 0x18]
test ebx, ebx
je 0x4d78ee
push ebx
mov dword [ebp - 0x18], ebx
xor edi, edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x4d7750
push 0x30
lea ecx, [ebp - 0x4c]
push 0
push ecx
call fcn.00555020
push 0x110
lea edx, [ebp - 0x15c]
push 0
push edx
mov dword [ebp - 0x4c], 0x30
call fcn.00555020
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 0x4d781e
mov eax, dword [ebp - 0x15c]
cmp eax, 5
jae 0x4d7825
cmp eax, 4
jne 0x4d781e
cmp dword [ebp - 0x158], 0x5a
jae 0x4d7825
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 0x4d78bb
cmp dword [eax], 0x1313
jne 0x4d78bb
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.005559df
mov eax, dword [ebp + 8]
push eax
call fcn.00553d26
mov esi, dword [ebp - 0x1c]
add esp, 8
push ebx
inc edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp edi, eax
jl 0x4d77c0
jmp 0x4d7750
push 0x8007000e
call fcn.00401150
push 0x80070057
call fcn.00401150
push 0x80004005
call fcn.00401150
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