Function at 0x40ea60
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x594c82
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x8c
push ebx
push ebp
push esi
mov esi, ecx
lea eax, [esp + 0x48]
push edi
mov ecx, dword [esi + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0x5c]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
lea ecx, [esp + 0x5c]
push ecx
mov ecx, esi
call fcn.0057b3f9
xor ebx, ebx
mov ecx, esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.005744c5
push eax
push ebx
mov ecx, esi
call fcn.005744ab
lea edx, [esp + 0x30]
push eax
push edx
call dword [sym.imp.USER32.dll_AdjustWindowRectEx]
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
mov ecx, eax
sub ecx, edx
mov edi, dword [esp + 0x30]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x50]
mov edx, ecx
sub edx, ebp
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x54]
neg ecx
neg eax
sub edx, edi
push ecx
push eax
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x68]
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x54], edx
call dword [sym.imp.USER32.dll_OffsetRect]
cmp dword [0x6186e0], 5
jne 0x40eb66
mov ecx, esi
call fcn.0040c950
test eax, eax
je 0x40eb66
mov ecx, esi
call fcn.0040c950
mov ecx, dword [eax + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_IsZoomed]
cmp eax, ebx
je 0x40eb66
push 0x36
call dword [sym.imp.USER32.dll_GetSystemMetrics]
lea edx, [eax*4]
sub edx, eax
mov eax, dword [esp + 0x44]
neg edx
add eax, edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], vtable.CRgn.0
lea eax, [esp + 0x3c]
mov dword [esp + 0xa4], ebx
push eax
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
push eax
lea ecx, [esp + 0x14]
call fcn.0057bc57
mov ecx, dword [esi + 0x7b8]
push ecx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
xor ebp, ebp
cmp eax, ebx
mov dword [esp + 0x38], eax
jbe 0x40ec75
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x6c]
lea edx, [esp + 0x6c]
rep stosd dword es:[edi], eax
mov eax, 0x30
push edx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov eax, dword [esi + 0x7b8]
push 1
push ebp
push eax
call dword [sym.imp.USER32.dll_GetMenuItemInfoA]
mov eax, dword [esp + 0x74]
test ah, 1
je 0x40ec68
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], vtable.CRgn.0
mov eax, dword [esp + 0x8c]
mov byte [esp + 0xa4], 1
cmp eax, ebx
je 0x40ec48
add eax, 0x34
push eax
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
push eax
lea ecx, [esp + 0x1c]
call fcn.0057bc57
mov edi, dword [esp + 0x1c]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
neg eax
sbb eax, eax
push 4
and eax, edi
neg ecx
sbb ecx, ecx
push eax
and ecx, edx
push ecx
push edx
call dword [sym.imp.GDI32.dll_CombineRgn]
lea ecx, [esp + 0x18]
call fcn.0057bcae
mov dword [esp + 0x18], vtable.CGdiObject.0
lea ecx, [esp + 0x18]
mov byte [esp + 0xa4], 2
call fcn.0057bcae
mov byte [esp + 0xa4], bl
mov eax, dword [esp + 0x38]
inc ebp
cmp ebp, eax
jb 0x40eba9
mov ecx, dword [esi + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_GetWindowDC]
push eax
call fcn.0057a95b
mov edi, eax
call fcn.00443eb0
mov eax, dword [eax + 0x30]
lea ecx, [esp + 0x20]
mov eax, dword [eax + 0x1b0]
push eax
call fcn.0057bd6a
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x20]
neg eax
mov ebx, dword [esp + 0x14]
mov edx, dword [edi + 4]
sbb eax, eax
mov byte [esp + 0xa4], 3
and eax, ecx
lea ecx, [esp + 0x10]
neg ecx
sbb ecx, ecx
push eax
and ecx, ebx
push ecx
push edx
call dword [sym.imp.GDI32.dll_FillRgn]
mov eax, dword [edi + 4]
mov ecx, dword [esi + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
lea ecx, [esp + 0x10]
call fcn.0057bcae
mov esi, vtable.CGdiObject.0
mov dword [esp + 0x20], esi
lea ecx, [esp + 0x20]
mov byte [esp + 0xa4], 4
call fcn.0057bcae
mov dword [esp + 0x10], esi
lea ecx, [esp + 0x10]
mov dword [esp + 0xa4], 5
call fcn.0057bcae
mov ecx, dword [esp + 0x9c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x98
ret