Function at 0x409277
Capabilities:
Get number of processors
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword fs:[0x30]
push ebx
push esi
push edi
mov esi, 0x2000
xor edi, edi
push esi
push edi
push dword [eax + 0x18]
mov dword [ebp - 0x1c], edi
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ecx, dword fs:[0x30]
mov ebx, eax
push esi
push edi
mov dword [ebp - 0x14], ebx
push dword [ecx + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push dword [ebp + 8]
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ecx
mov byte [ebp - 0x28], 1
mov dword [ebp - 4], edi
call dword [sym.imp.USER32.dll_GetMenu]
test eax, eax
je 0x409481
push dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
mov esi, eax
test esi, esi
je 0x409481
push 0x30
lea eax, [ebp - 0x60]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x60], 0x30
lea eax, [ebp - 0x60]
mov dword [ebp - 0x5c], 1
mov dword [ebp - 0x54], 3
push eax
push edi
push 0x500
push esi
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
push 0x400
push 2
push esi
call dword [sym.imp.USER32.dll_DeleteMenu]
test eax, eax
jne 0x409327
push edi
lea ecx, [ebp - 4]
call fcn.0040ace6
lea eax, [ebp - 4]
push eax
push 0x4019a8
push MenuHelp
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x409478
lea eax, [ebp - 8]
xor ecx, ecx
push eax
push dword [ebp - 0x10]
lea eax, [ebp - 0x24]
push eax
push ecx
lea eax, [ebp - 0xc]
push eax
push ebx
push ecx
jmp 0x409459
test edi, edi
jne 0x4093e5
xor eax, eax
push 0x30
push eax
lea eax, [ebp - 0x60]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x60], 0x30
lea eax, [ebp - 0x60]
mov dword [ebp - 0x5c], 1
xor ecx, ecx
mov dword [ebp - 0x54], ecx
push eax
push ecx
push 0x500
push esi
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
xor eax, eax
push 0x30
push eax
lea eax, [ebp - 0x60]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x60], 0x30
lea eax, [ebp - 0x60]
mov dword [ebp - 0x5c], 0x10
mov dword [ebp - 0x58], 0x800
push eax
push 2
push 0xffffffffffffffff
push esi
call dword [sym.imp.USER32.dll_InsertMenuItemW]
xor eax, eax
mov dword [ebp - 0x60], 0x30
mov ecx, ebx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
lea edx, [edi + 0x502]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
lea eax, [ecx + 2]
mov dword [ebp - 0x5c], 0x13
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x20], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x1c]
jne 0x409421
sub ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x60]
push eax
xor eax, eax
sar ecx, 1
push eax
push edx
push esi
mov dword [ebp - 0x38], ecx
call dword [sym.imp.USER32.dll_InsertMenuItemW]
lea eax, [ebp - 8]
inc edi
push eax
push dword [ebp - 0x10]
lea eax, [ebp - 0x24]
push eax
xor eax, eax
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push edi
push dword [ebp - 4]
mov dword [ebp - 0xc], 0x1000
mov dword [ebp - 8], 0x2000
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
je 0x409377
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DrawMenuBar]
cmp dword [ebp - 4], 0
je 0x409490
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x30]
call fcn.0040aade
pop edi
pop esi
pop ebx
leave
ret 8