Function at 0x408550
Capabilities:
Check os version

Disassembly:
mov eax, dword fs:[0]
mov edx, dword [esp + 0xc]
push 0xffffffffffffffff
push 0x45541b
push eax
mov eax, edx
mov dword fs:[0], esp
sub esp, 0x134
shr eax, 0x10
push ebx
mov ebx, ecx
je 0x408590
mov ecx, dword [esp + 0x154]
mov eax, 1
mov dword [ecx], 0
jmp 0x40884e
mov al, byte [ebx + 0x80]
mov cl, al
and cl, 2
jne 0x4085b8
test al, 1
jne 0x4085b8
mov edx, dword [esp + 0x154]
mov eax, 1
mov dword [edx], 0
jmp 0x40884e
test cl, cl
push esi
je 0x4085ff
test edx, edx
jne 0x4085d8
test al, 0x10
jne 0x4085d8
mov eax, dword [ebx + 4]
push edx
push edx
push 0x447
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x4085da
mov eax, edx
mov esi, dword [esp + 0x150]
mov ecx, dword [esp + 0x14c]
mov edx, dword [ebx + 4]
push eax
mov eax, dword [ebx + 0x3c]
push esi
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_CallWindowProcA]
mov dword [esp + 0xc], eax
jmp 0x408646
test edx, edx
jne 0x40861a
test al, 0x10
jne 0x40861a
mov ecx, dword [ebx + 4]
push edx
push edx
push 0x447
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x40861c
mov eax, edx
mov edx, dword [esp + 0x150]
mov ecx, dword [ebx + 0x58]
push eax
mov eax, dword [esp + 0x150]
push edx
mov edx, dword [ebx + 0x70]
push eax
push ecx
push edx
call dword [sym.imp.USER32.dll_CallWindowProcA]
mov esi, dword [esp + 0x150]
mov dword [esp + 0xc], eax
test byte [ebx + 0x80], 4
je 0x408849
push ebp
mov dword [esp + 0x44], esi
xor ebp, ebp
push esi
mov dword [esp + 0x14c], ebp
mov dword [esp + 0x10], ebp
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x4087f7
push edi
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x18]
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 + 0x18], 0x30
push eax
mov dword [esp + 0xb4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x4086d0
mov eax, dword [esp + 0xb4]
cmp eax, 5
jae 0x4086d8
cmp eax, 4
jne 0x4086d0
cmp dword [esp + 0xb8], 0x5a
jae 0x4086d8
mov dword [esp + 0x18], 0x2c
lea edx, [esp + 0x18]
lea ecx, [esp + 0x4c]
push edx
push 1
push ebp
push esi
mov dword [esp + 0x50], 0x64
mov dword [esp + 0x2c], 0x3f
mov dword [esp + 0x4c], ecx
call dword [sym.imp.USER32.dll_GetMenuItemInfoA]
mov eax, dword [esp + 0x20]
mov edi, 0x100
test edi, eax
jne 0x4087e2
push 0x14
mov dword [esp + 0x20], 0x31
call fcn.00428524
mov esi, eax
add esp, 4
test esi, esi
je 0x4087db
mov dword [esi], 0x1313
mov eax, dword [esp + 0x20]
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x24]
mov dword [esi + 0xc], ecx
mov ebp, dword [esp + 0x20]
or ebp, edi
xor eax, eax
mov dword [esp + 0x20], ebp
mov dword [esi + 0x10], 0xffffffff
mov ecx, dword [ebx + 0x4c]
test ecx, ecx
jle 0x408777
mov edx, dword [ebx + 0x48]
mov edi, dword [esp + 0x28]
xor ebp, ebp
mov bp, word [edx]
cmp ebp, edi
je 0x408774
inc eax
add edx, 2
cmp eax, ecx
jl 0x408761
jmp 0x408777
mov dword [esi + 0x10], eax
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
mov dword [esi + 4], 0
inc edi
push edi
call fcn.00428524
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esi + 4], ebp
je 0x4087b9
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp edi, eax
jbe 0x4087b9
lea ecx, [esp + 0x4c]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x158]
lea edx, [esp + 0x18]
mov dword [esp + 0x38], esi
push edx
push 1
push eax
push ecx
call dword [sym.imp.USER32.dll_SetMenuItemInfoA]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x158]
inc ebp
push esi
mov dword [esp + 0x14], ebp
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp ebp, eax
jl 0x408675
pop edi
mov ecx, dword [ebx + 0x18]
mov eax, dword [ebx + 0x1c]
cmp ecx, eax
pop ebp
jne 0x408833
test eax, eax
mov esi, 1
je 0x40880e
lea esi, [ecx + ecx]
mov eax, dword [ebx + 0x14]
lea edx, [esi*4]
push edx
push eax
call fcn.004281f5
add esp, 8
test eax, eax
je 0x408849
mov dword [ebx + 0x1c], esi
mov esi, dword [esp + 0x150]
mov dword [ebx + 0x14], eax
mov edx, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x14]
inc edx
mov eax, edx
mov dword [ebx + 0x18], edx
lea eax, [ecx + eax*4 - 4]
test eax, eax
je 0x408849
mov dword [eax], esi
mov eax, dword [esp + 0xc]
pop esi
mov ecx, dword [esp + 0x138]
pop ebx
mov dword fs:[0], ecx
add esp, 0x140
ret 0x10