Function at 0x40e45d
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4af45c
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x4d9114]
xor eax, esp
mov dword [esp + 0x7c], eax
push ebx
push esi
mov eax, dword [0x4d9114]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, ecx
lea ecx, [esp + 0x1c]
push ecx
push 0x20019
xor ebx, ebx
push ebx
push eax
push edi
mov dword [esp + 0x44], eax
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40e6cf
push ebx
push ebx
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x24]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [esp + 0x48]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x40e6c5
cmp dword [esp + 0x14], ebx
je 0x40e6c5
cmp dword [esp + 0x24], ebx
je 0x40e6c5
mov dword [esp + 0x10], ebx
cmp dword [esp + 0x14], ebx
jbe 0x40e6c5
mov eax, dword [esp + 0x24]
add eax, 2
push ebx
push eax
lea ecx, [esp + 0x74]
mov dword [esp + 0x28], eax
call fcn.0040f9bb
mov dword [esp + 0x98], ebx
mov eax, dword [esp + 0x28]
shr eax, 1
inc eax
push ebx
inc eax
push eax
lea ecx, [esp + 0x58]
call fcn.0040f9bb
mov byte [esp + 0x98], 1
mov eax, dword [esp + 0x64]
add eax, eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2c]
push eax
push ebx
lea ecx, [esp + 0x58]
mov dword [esp + 0x20], ebx
call fcn.0040fa27
push eax
lea eax, [esp + 0x20]
push eax
push ebx
lea eax, [esp + 0x30]
push eax
push ebx
lea ecx, [esp + 0x84]
call fcn.0040fa27
push eax
push dword [esp + 0x28]
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x40e68c
cmp dword [esp + 0x20], ebx
je 0x40e68c
cmp dword [esp + 0x18], 1
je 0x40e5c2
cmp dword [esp + 0x18], 7
je 0x40e5c2
cmp dword [esp + 0x18], 2
jne 0x40e68c
push dword [esp + 0x20]
lea ecx, [esp + 0x70]
call fcn.0040fa27
xor ecx, ecx
mov word [eax], cx
mov eax, dword [esp + 0x2c]
shr eax, 1
push eax
lea ecx, [esp + 0x54]
call fcn.0040fa27
xor ecx, ecx
mov word [eax], cx
lea eax, [esp + 0x34]
push eax
call fcn.0040c009
mov byte [esp + 0x98], 2
push dword [esp + 0x30]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x38], edi
call fcn.00405c8e
cmp dword [esp + 0x84], 8
mov eax, dword [esp + 0x70]
jae 0x40e61e
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x40]
call fcn.00405c8e
cmp dword [esp + 0x68], 8
mov eax, dword [esp + 0x54]
jae 0x40e637
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x44]
call fcn.00405c8e
mov byte [esp + 0x4c], bl
lea ecx, [esp + 0x44]
cmp edi, 0x80000001
jne 0x40e658
push str.User
jmp 0x40e65d
push str.System
call fcn.00405c8e
push str.Enabled
lea ecx, [esp + 0x4c]
call fcn.00405c8e
lea eax, [esp + 0x34]
push eax
call fcn.00410412
mov byte [esp + 0x98], 1
lea eax, [esp + 0x34]
push eax
call fcn.0040e6ef
mov byte [esp + 0x98], bl
push ebx
push 1
lea ecx, [esp + 0x58]
call fcn.0040515f
or dword [esp + 0x98], 0xffffffff
push ebx
push 1
lea ecx, [esp + 0x74]
call fcn.0040515f
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x14]
jb 0x40e51a
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x7c]
xor ecx, esp
call fcn.004876e8
mov esp, ebp
pop ebp
ret