Function at 0x584fb0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x663638
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x148
push ebx
push esi
push edi
mov edi, ecx
mov cl, byte [edi + 0x84]
mov dword [ebp - 0x10], edi
test cl, 2
jne 0x58503d
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
test esi, esi
je 0x584ffd
cmp esi, dword [edi + 0x44]
je 0x584ffd
mov eax, ebx
shr eax, 0x10
test al, 0x10
je 0x584ffd
mov al, 1
jmp 0x584fff
xor al, al
add al, al
add al, al
add al, al
xor al, cl
and al, 8
xor al, cl
mov ecx, dword [edi + 0x5c]
push ecx
mov byte [edi + 0x84], al
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x58502f
mov edx, dword [ebp + 8]
mov eax, dword [edi + 0x5c]
push esi
push ebx
push edx
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0
jmp 0x5851ca
mov edx, dword [ebp + 0xc]
shr edx, 0x10
cmp edx, 0xffff
jne 0x5851c1
cmp dword [ebp + 0x10], 0
jne 0x5851c1
test cl, 4
je 0x5851c1
mov eax, dword [edi + 0x18]
lea ecx, [eax - 1]
test ecx, ecx
js 0x5851c1
mov edx, dword [edi + 0x14]
mov ebx, dword [edx + ecx*4]
lea edx, [edx + ecx*4]
cmp ecx, eax
jge 0x5851c1
lea esi, [eax - 1]
cmp ecx, esi
je 0x5850a0
sub eax, ecx
add eax, eax
add eax, eax
lea ecx, [eax - 4]
push ecx
lea ecx, [edx + 4]
push ecx
push eax
push edx
call fcn.00402090
add esp, 0x10
dec dword [edi + 0x18]
xor esi, esi
cmp ebx, esi
je 0x5851c1
mov dword [ebp + 0x10], ebx
mov dword [ebp - 4], esi
push ebx
mov dword [ebp + 0xc], esi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x5851b5
mov edi, 0x30
push edi
lea edx, [ebp - 0x40]
push 0
push edx
call fcn.006100a0
push pe_nt_image_headers32
lea eax, [ebp - 0x150]
push 0
push eax
mov dword [ebp - 0x40], edi
call fcn.006100a0
add esp, 0x18
lea ecx, [ebp - 0x154]
push ecx
mov dword [ebp - 0x154], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x585123
mov eax, dword [ebp - 0x150]
cmp eax, 5
jae 0x58512a
cmp eax, 4
jne 0x585123
cmp dword [ebp - 0x14c], 0x5a
jae 0x58512a
mov dword [ebp - 0x40], 0x2c
lea edx, [ebp - 0x40]
push edx
push 1
push esi
push ebx
mov dword [ebp - 0x3c], edi
call dword [sym.imp.USER32.dll_GetMenuItemInfoW]
mov eax, dword [ebp - 0x20]
mov edi, eax
test eax, eax
je 0x58519f
cmp dword [eax], 0x1313
jne 0x58519f
mov dword [ebp - 0x3c], 0x31
mov ecx, dword [eax + 8]
lea esi, [eax + 4]
mov dword [ebp - 0x38], ecx
mov edx, dword [esi]
mov dword [ebp - 0x1c], edx
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x40]
push ecx
push 1
push edx
push ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], 0
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
mov esi, dword [esi]
push esi
call fcn.00611a0b
push edi
mov dword [edi], 0x6666
call fcn.0060faf6
mov esi, dword [ebp + 0xc]
add esp, 8
inc esi
push ebx
mov dword [ebp + 0xc], esi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp esi, eax
jl 0x5850c5
mov edi, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
jmp 0x585062
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x10