Function at 0x408a90
Capabilities:
Check os version

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x45543b
push eax
mov eax, dword [esp + 0x1c]
mov dword fs:[0], esp
sub esp, 0x198
mov dword [eax], 1
push ebx
push ebp
mov ebp, ecx
push esi
mov ecx, dword [esp + 0x1b8]
push edi
mov al, byte [ebp + 0x80]
and al, 1
je 0x408ada
cmp cx, 0xd
je 0x408ada
xor ebx, ebx
mov dword [esp + 0x18], ebx
jmp 0x408ae4
mov dword [esp + 0x18], 0x10001
xor ebx, ebx
test al, al
je 0x408d7e
mov edx, ecx
shr edx, 0x10
cmp edx, 0x10
jne 0x408d76
mov esi, dword [esp + 0x1c0]
mov dword [esp + 0x5c], esi
push esi
mov dword [esp + 0x1b4], ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], 2
mov dword [esp + 0x20], ebx
mov byte [esp + 0x13], 0
jle 0x40905f
jmp 0x408b39
mov esi, dword [esp + 0x1c0]
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x60]
rep stosd dword es:[edi], eax
mov ecx, 0x24
lea edi, [esp + 0xb4]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xb0]
mov dword [esp + 0x60], 0x30
push eax
mov dword [esp + 0xb4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x408b94
mov eax, dword [esp + 0xb4]
cmp eax, 5
jae 0x408b9c
cmp eax, 4
jne 0x408b94
cmp dword [esp + 0xb8], 0x5a
jae 0x408b9c
mov dword [esp + 0x60], 0x2c
lea edx, [esp + 0x60]
lea ecx, [esp + 0x144]
push edx
push 1
push ebx
push esi
mov dword [esp + 0x98], 0x64
mov dword [esp + 0x74], 0x3f
mov dword [esp + 0x94], ecx
call dword [sym.imp.USER32.dll_GetMenuItemInfoA]
test eax, eax
je 0x408c5a
mov eax, dword [esp + 0x68]
test ah, 8
jne 0x408c5a
mov eax, dword [esp + 0x80]
test eax, eax
je 0x408c5a
cmp dword [eax], 0x1313
jne 0x408c5a
mov eax, dword [eax + 4]
test eax, eax
je 0x408c5a
mov cl, byte [eax]
test cl, cl
je 0x408c0f
cmp cl, 0x26
je 0x408c0f
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov cl, byte [eax]
test cl, cl
jne 0x408bfd
test eax, eax
je 0x408c5a
cmp byte [eax], 0
je 0x408c5a
movsx esi, byte [eax + 1]
movsx eax, byte [esp + 0x1bc]
mov edi, dword [sym.imp.USER32.dll_CharLowerA]
and eax, 0xffff
push eax
and esi, 0xffff
call edi
mov edx, eax
push esi
mov dword [esp + 0x28], edx
call edi
mov ecx, dword [esp + 0x24]
cmp eax, ecx
jne 0x408c5a
mov al, byte [esp + 0x13]
test al, al
jne 0x408c69
mov dword [esp + 0x20], ebx
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x1c]
inc ebx
cmp ebx, eax
jl 0x408b32
jmp 0x408c71
mov dword [esp + 0x14], 3
mov al, byte [esp + 0x13]
test al, al
je 0x40905f
cmp dword [esp + 0x14], 2
jne 0x408d48
mov edx, dword [ebp + 4]
lea esi, [ebp + 4]
push 0
push 0xffffffffffffffff
push 0x448
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
test byte [ebp + 0x80], 0x80
je 0x408ce4
mov al, byte [ebp + 0x54]
mov edi, dword [sym.imp.USER32.dll_IsWindow]
test al, 4
je 0x408cca
mov eax, dword [ebp + 0xa8]
push eax
call edi
test eax, eax
je 0x408cca
mov ecx, dword [ebp + 0xa8]
push ecx
jmp 0x408cde
test byte [ebp + 0x54], 4
jne 0x408ce4
mov edx, dword [ebp + 0x58]
push edx
call edi
test eax, eax
je 0x408ce4
mov eax, dword [ebp + 0x58]
push eax
call dword [sym.imp.USER32.dll_SetFocus]
mov ecx, dword [esi]
push 0
push 0
push 0x449
push ecx
mov dword [ebp + 0xa8], 0
call dword [sym.imp.USER32.dll_SendMessageA]
mov al, byte [ebp + 0x81]
test al, 2
je 0x408d41
test al, 4
je 0x408d41
and al, 0xfb
mov ecx, esi
mov byte [ebp + 0x81], al
not al
and eax, 4
shl eax, 0x12
push eax
push 0x100000
call fcn.0040b590
mov edx, dword [esi]
push 1
push 0
push edx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov eax, dword [esi]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
and byte [ebp + 0x81], 0x7f
mov ecx, dword [esp + 0x1c4]
mov eax, dword [esp + 0x14]
and eax, 0xffff
mov dword [ecx], 1
mov ecx, dword [esp + 0x20]
shl eax, 0x10
and ecx, 0xffff
or eax, ecx
mov dword [esp + 0x18], eax
jmp 0x40905f
test al, al
jne 0x40905f
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
lea esi, [ebp + 4]
movsx eax, cl
mov ecx, dword [esi]
lea edx, [esp + 0x14]
push edx
push eax
push 0x44e
push ecx
mov dword [esp + 0x24], ebx
call edi
test eax, eax
jne 0x408f29
mov edx, dword [esp + 0x1c4]
push ebx
push 0xffffffffffffffff
push 0x448
mov dword [edx], ebx
mov eax, dword [esi]
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
test byte [ebp + 0x80], 0x80
je 0x408e08
mov al, byte [ebp + 0x54]
mov ebx, dword [sym.imp.USER32.dll_IsWindow]
test al, 4
je 0x408dec
mov ecx, dword [ebp + 0xa8]
push ecx
call ebx
test eax, eax
je 0x408dec
mov edx, dword [ebp + 0xa8]
push edx
jmp 0x408e00
test byte [ebp + 0x54], 4
jne 0x408e06
mov eax, dword [ebp + 0x58]
push eax
call ebx
test eax, eax
je 0x408e06
mov ecx, dword [ebp + 0x58]
push ecx
call dword [sym.imp.USER32.dll_SetFocus]
xor ebx, ebx
mov edx, dword [esi]
push ebx
push ebx
push 0x449
push edx
mov dword [ebp + 0xa8], ebx
call edi
mov al, byte [ebp + 0x81]
test al, 2
je 0x408e5a
test al, 4
je 0x408e5a
and al, 0xfb
mov ecx, esi
mov byte [ebp + 0x81], al
not al
and eax, 4
shl eax, 0x12
push eax
push 0x100000
call fcn.0040b590
mov eax, dword [esi]
push 1
push ebx
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
mov cl, byte [ebp + 0x81]
mov al, byte [esp + 0x1bc]
and cl, 0x7f
cmp al, 0x2f
mov byte [ebp + 0x81], cl
jne 0x40905f
mov edx, dword [esi]
push edx
call dword [sym.imp.USER32.dll_GetParent]
push 0
mov ebx, eax
push 0
push 0x40c
push ebx
call edi
xor ebp, ebp
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x40905f
mov ecx, 0x12
xor eax, eax
lea edi, [esp + 0x68]
mov dword [esp + 0x60], 0x50
mov dword [esp + 0x64], 0x11
rep stosd dword es:[edi], eax
lea eax, [esp + 0x60]
push eax
push ebp
push 0x41d
push ebx
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x408edd
mov ecx, dword [esp + 0x80]
mov eax, dword [esi]
cmp ecx, eax
je 0x408eeb
mov eax, dword [esp + 0x1c]
inc ebp
cmp ebp, eax
jl 0x408e9d
jmp 0x40905f
mov eax, dword [esp + 0x68]
test ah, 2
je 0x40905f
mov edi, dword [sym.imp.USER32.dll_PostMessageA]
push 0
push ebp
push 0x42b
push ebx
call edi
mov edx, dword [esi]
push 0
push 0x28
push 0x100
push edx
call edi
mov eax, dword [esp + 0x1c4]
mov dword [eax], 1
jmp 0x40905f
mov ecx, dword [ebp + 0x58]
push ecx
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x40905f
mov ecx, dword [esi]
xor edx, edx
mov dword [esp + 0x3c], edx
lea eax, [esp + 0x38]
mov dword [esp + 0x40], edx
push eax
push ecx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x4c], edx
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [esp + 0x14]
xor edx, edx
mov dword [esp + 0x2c], edx
lea eax, [esp + 0x28]
mov dword [esp + 0x30], edx
push eax
mov dword [esp + 0x38], edx
mov edx, dword [esi]
push ecx
push 0x41d
push edx
mov dword [esp + 0x38], ebx
call edi
mov edx, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x4c], eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x50], eax
push ecx
mov dword [esp + 0x58], eax
push edx
mov dword [esp + 0x60], eax
mov eax, dword [esi]
push 0x417
push eax
mov dword [esp + 0x58], ebx
call edi
mov al, byte [esp + 0x50]
test al, 4
je 0x409058
test al, 8
jne 0x409058
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x40]
cmp ecx, eax
jg 0x409058
mov al, byte [ebp + 0x81]
test al, 2
je 0x409012
test al, 4
jne 0x409012
or al, 0xc
mov edx, dword [esi]
mov byte [ebp + 0x81], al
not al
and eax, 4
shl eax, 0x12
push eax
push 0x100000
push 0x446
push edx
call edi
mov eax, dword [esi]
push 1
push ebx
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
test byte [ebp + 0x54], 4
je 0x40902c
cmp dword [ebp + 0xa8], ebx
jne 0x40902c
call dword [sym.imp.USER32.dll_GetFocus]
mov dword [ebp + 0xa8], eax
mov edx, dword [esi]
push edx
call dword [sym.imp.USER32.dll_SetFocus]
mov eax, dword [esi]
push ebx
push 0x28
push 0x100
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov ecx, dword [esp + 0x14]
mov edx, dword [esi]
push ebx
push ecx
push 0x448
push edx
call edi
jmp 0x40905f
push ebx
call dword [sym.imp.USER32.dll_MessageBeep]
mov ecx, dword [esp + 0x1a8]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1a4
ret 0x10