Function at 0x408f06
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x2028
call fcn.0041e500
mov eax, dword [0x41f024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword fs:[0x30]
push ebx
push esi
push edi
mov edi, 0x2000
xor ebx, ebx
push edi
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp - 0x2014], eax
mov eax, dword fs:[0x30]
push edi
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp - 0x200c], eax
lea ecx, [ebp - 0x200c]
lea eax, [ebp - 0x2014]
mov dword [ebp - 0x2024], ecx
mov dword [ebp - 0x2028], eax
mov esi, 0x460818
xor eax, eax
mov byte [ebp - 0x2020], 1
mov dword [ebp - 0x2008], ebx
cmp ax, word [0x460818]
jne 0x408fd6
push 0x104
push esi
push 0x22
push dword [0x41fe14]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jne 0x408faf
mov word [0x460818], ax
jmp 0x409160
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x408fb4
sub ecx, edx
sar ecx, 1
mov dword [0x460a3c], ecx
cmp word [0x460818], bx
je 0x409160
push ebx
lea ecx, [ebp - 0x2008]
call fcn.0040ace6
lea eax, [ebp - 0x2008]
push eax
push 0x4019a8
push MenuHelp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x409160
lea eax, [ebp - 0x2010]
mov dword [ebp - 0x2010], edi
push eax
push dword [ebp - 0x200c]
lea eax, [ebp - 0x201c]
xor edi, edi
push eax
push ebx
lea eax, [ebp - 0x2018]
inc edi
push eax
push dword [ebp - 0x2014]
push ebx
jmp 0x409142
cmp dword [ebp - 0x201c], 1
jne 0x409160
cmp dword [ebp - 0x2010], ebx
jbe 0x409160
push 0x5c
push dword [ebp - 0x200c]
call dword [sym.imp.SHLWAPI.dll_StrChrIW]
push 0x460818
push dword [ebp - 0x200c]
mov esi, eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
mov ecx, eax
test ecx, ecx
je 0x409112
cmp ecx, dword [ebp - 0x200c]
jne 0x409112
test esi, esi
je 0x409112
mov eax, dword [0x460a3c]
lea eax, [ecx + eax*2]
cmp eax, esi
jne 0x409112
push 0x1000
lea eax, [ebp - 0x2004]
push eax
push 0x13
push dword [0x41fe14]
call dword [sym.imp.USER32.dll_LoadStringW]
push 0x1000
lea eax, [ebp - 0x2004]
push eax
call dword [sym.imp.api_ms_win_core_path_l1_1_0.dll_PathCchAddBackslash]
lea eax, [esi + 2]
mov edx, 0x1000
push eax
lea ecx, [ebp - 0x2004]
call fcn.00405231
lea ecx, [ebp - 0x2004]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4090df
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x2004]
push eax
push 1
push ebx
push dword [ebp - 0x2014]
push dword [ebp - 0x2008]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0x2010]
mov dword [ebp - 0x2010], 0x2000
push ecx
push dword [ebp - 0x200c]
lea ecx, [ebp - 0x201c]
mov eax, edi
push ecx
push ebx
lea ecx, [ebp - 0x2018]
inc edi
push ecx
push dword [ebp - 0x2014]
push eax
push dword [ebp - 0x2008]
mov dword [ebp - 0x2018], 0x1000
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
je 0x409032
cmp dword [ebp - 0x2008], 0
pop edi
pop esi
pop ebx
je 0x409178
push dword [ebp - 0x2008]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x2028]
call fcn.0040aade
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041dc30
leave
ret