Function at 0x40691c
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push edi
mov edi, 0x2000
mov dword [ebp - 0x14], ecx
push edi
mov ebx, edx
call dword [sym.imp.msvcrt.dll_malloc]
push edi
mov esi, eax
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
pop ecx
push dword [ebp - 0x14]
mov edi, eax
call dword [sym.imp.USER32.dll_GetMenu]
test eax, eax
jne 0x406967
push esi
call dword [sym.imp.msvcrt.dll_free]
push edi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
pop ecx
jmp 0x406b24
push ebx
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
mov ebx, eax
test ebx, ebx
je 0x406952
xor eax, eax
push 0x30
push eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x50]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x50], 0x30
lea eax, [ebp - 0x50]
mov dword [ebp - 0x4c], 1
mov dword [ebp - 0x44], 3
push eax
xor eax, eax
push eax
push 0x500
push ebx
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
push 0x400
push 2
push ebx
call dword [sym.imp.USER32.dll_DeleteMenu]
test eax, eax
jne 0x4069b1
lea eax, [ebp - 0x10]
push eax
push 0x401828
push MenuHelp
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x406b0b
lea eax, [ebp - 8]
xor ecx, ecx
push eax
push edi
lea eax, [ebp - 0x20]
mov dword [ebp - 4], ecx
push eax
push ecx
lea eax, [ebp - 0xc]
push eax
push esi
push ecx
jmp 0x406ae3
cmp dword [ebp - 4], 0
jne 0x406a69
xor eax, eax
push 0x30
push eax
lea eax, [ebp - 0x50]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x50], 0x30
lea eax, [ebp - 0x50]
mov dword [ebp - 0x4c], 1
xor ecx, ecx
mov dword [ebp - 0x44], ecx
push eax
push ecx
push 0x500
push ebx
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
xor eax, eax
push 0x30
push eax
lea eax, [ebp - 0x50]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x50], 0x30
lea eax, [ebp - 0x50]
mov dword [ebp - 0x4c], 0x10
mov dword [ebp - 0x48], 0x800
push eax
push 2
push 0xffffffffffffffff
push ebx
call dword [sym.imp.USER32.dll_InsertMenuItemW]
xor eax, eax
push 0x30
push eax
lea eax, [ebp - 0x50]
push eax
call sub.msvcrt.dll_memset
mov edx, dword [ebp - 4]
xor ecx, ecx
mov dword [ebp - 0x48], ecx
add esp, 0xc
mov dword [ebp - 0x44], ecx
add edx, 0x502
mov ecx, esi
mov dword [ebp - 0x50], 0x30
mov dword [ebp - 0x4c], 0x13
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x2c], esi
lea eax, [ecx + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x18]
jne 0x406aa7
sub ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x50]
push eax
xor eax, eax
sar ecx, 1
push eax
push edx
push ebx
mov dword [ebp - 0x28], ecx
call dword [sym.imp.USER32.dll_InsertMenuItemW]
mov eax, dword [ebp - 4]
lea ecx, [ebp - 8]
push ecx
push edi
lea ecx, [ebp - 0x20]
inc eax
push ecx
xor ecx, ecx
mov dword [ebp - 4], eax
push ecx
lea ecx, [ebp - 0xc]
push ecx
push esi
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0xc], 0x1000
mov dword [ebp - 8], 0x2000
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
je 0x4069f9
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.msvcrt.dll_free]
push edi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
pop ecx
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_DrawMenuBar]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret