Function at 0x408d52
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword fs:[0x30]
push ebx
push esi
push edi
mov esi, 0x2000
xor ebx, ebx
push esi
push ebx
push dword [eax + 0x18]
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ecx, dword fs:[0x30]
mov edi, eax
push esi
push ebx
mov dword [ebp - 0x20], edi
push dword [ecx + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], ebx
call dword [sym.imp.USER32.dll_GetMenu]
test eax, eax
je 0x408f4c
push dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
mov esi, eax
test esi, esi
je 0x408f4c
push 0x30
lea eax, [ebp - 0x54]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x54], 0x30
lea eax, [ebp - 0x54]
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x48], 3
push eax
push ebx
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 0x408df2
push ebx
lea ecx, [ebp - 4]
call fcn.0040a619
lea eax, [ebp - 4]
push eax
push 0x4019d0
push MenuHelp
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x408f43
lea eax, [ebp - 8]
xor ecx, ecx
push eax
push dword [ebp - 0x10]
lea eax, [ebp - 0x1c]
push eax
push ecx
lea eax, [ebp - 0xc]
push eax
push edi
push ecx
jmp 0x408f24
test ebx, ebx
jne 0x408eb0
xor eax, eax
push 0x30
push eax
lea eax, [ebp - 0x54]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x54], 0x30
lea eax, [ebp - 0x54]
mov dword [ebp - 0x50], 1
xor ecx, ecx
mov dword [ebp - 0x48], 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 - 0x54]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x54], 0x30
lea eax, [ebp - 0x54]
mov dword [ebp - 0x50], 0x10
mov dword [ebp - 0x4c], 0x800
push eax
push 2
push 0xffffffffffffffff
push esi
call dword [sym.imp.USER32.dll_InsertMenuItemW]
xor eax, eax
mov dword [ebp - 0x54], 0x30
mov ecx, edi
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
lea edx, [ebx + 0x502]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
lea eax, [ecx + 2]
mov dword [ebp - 0x50], 0x13
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x18], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x14]
jne 0x408eec
sub ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x54]
push eax
xor eax, eax
sar ecx, 1
push eax
push edx
push esi
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.USER32.dll_InsertMenuItemW]
lea eax, [ebp - 8]
inc ebx
push eax
push dword [ebp - 0x10]
lea eax, [ebp - 0x1c]
push eax
xor eax, eax
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push ebx
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 0x408e42
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DrawMenuBar]
cmp dword [ebp - 4], 0
je 0x408f5b
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x20]
call fcn.004156df
mov ecx, dword [ebp - 0x24]
call fcn.004156df
pop edi
pop esi
pop ebx
leave
ret 8