Function at 0x40e7d0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x83c
mov eax, dword [0x5976b8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
mov ebx, ecx
push 0x206
lea ecx, [ebp - 0x20a]
xor eax, eax
push esi
push ecx
mov dword [ebp - 0x830], ebx
mov dword [ebp - 0x828], esi
mov dword [ebp - 0x834], esi
mov word [ebp - 0x20c], ax
call fcn.005149a0
add esp, 0xc
lea edx, [ebp - 0x828]
push edx
push 0x20019
push esi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionProfileList
mov edi, 0x104
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x82c], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40e859
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514990
mov esp, ebp
pop ebp
ret
push 1
push str.SeRestorePrivilege
mov ecx, ebx
call fcn.00406a30
push 0x206
lea ecx, [ebp - 0x822]
xor eax, eax
push esi
push ecx
mov word [ebp - 0x824], ax
call fcn.005149a0
add esp, 0xc
lea edx, [ebp - 0x83c]
push edx
mov edx, dword [ebp - 0x828]
push esi
push esi
push esi
lea eax, [ebp - 0x82c]
push eax
lea ecx, [ebp - 0x20c]
push ecx
push esi
push edx
mov dword [ebp - 0x82c], edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
je 0x40ea2c
mov ebx, dword [sym.imp.SHLWAPI.dll_SHRegGetPathW]
push 9
push str.S_1_5_21
call fcn.0051611e
push eax
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x824]
push edi
push ecx
call fcn.00516051
add esp, 0x18
push str.S_1_5_21
lea edx, [ebp - 0x824]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40e9f1
lea eax, [ebp - 0x834]
push eax
push 0x20019
push 0
lea ecx, [ebp - 0x20c]
push ecx
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40e936
mov edx, dword [ebp - 0x834]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40e9df
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x61a]
push edx
mov word [ebp - 0x61c], cx
call fcn.005149a0
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x412]
push ecx
mov word [ebp - 0x414], ax
call fcn.005149a0
lea edx, [ebp - 0x20c]
push edx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionProfileList
push 0x53d734
lea eax, [ebp - 0x61c]
push edi
push eax
call fcn.00515c51
add esp, 0x2c
push 0
lea ecx, [ebp - 0x414]
push ecx
push str.ProfileImagePath
lea edx, [ebp - 0x61c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x40e9f1
push str.Ntuser.dat
lea eax, [ebp - 0x414]
push edi
push eax
call fcn.005164d9
add esp, 0xc
lea ecx, [ebp - 0x414]
push ecx
lea edx, [ebp - 0x20c]
push edx
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
test eax, eax
jne 0x40e9f1
mov ecx, dword [ebp - 0x830]
lea eax, [ebp - 0x20c]
push eax
call fcn.0040e100
lea ecx, [ebp - 0x83c]
push ecx
mov ecx, dword [ebp - 0x828]
push 0
push 0
push 0
lea edx, [ebp - 0x82c]
push edx
lea eax, [ebp - 0x20c]
push eax
inc esi
push esi
push ecx
mov dword [ebp - 0x82c], edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
jne 0x40e8c2
mov edx, dword [ebp - 0x828]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.00514990
mov esp, ebp
pop ebp
ret