Function at 0x4058e5
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push esi
lea eax, [ebp - 0xc]
push eax
xor esi, esi
push 0x20019
push esi
push str.SOFTWAREMicrosoftOle
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x30], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x405ac6
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 8]
push eax
push esi
push esi
push esi
mov ebx, str.MachineAccessRestriction
push ebx
push dword [ebp - 0xc]
mov dword [ebp - 8], esi
call edi
cmp eax, esi
mov dword [ebp - 0x14], eax
jne 0x40596c
push dword [ebp - 8]
call fcn.004064db
cmp eax, esi
pop ecx
mov dword [ebp - 4], eax
je 0x40596c
push dword [ebp - 8]
push esi
push eax
call fcn.00405ad0
add esp, 0xc
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push esi
push esi
push ebx
push dword [ebp - 0xc]
call edi
mov dword [ebp - 0x14], eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x14], esi
jne 0x405ab6
cmp dword [ebp - 4], esi
je 0x405ac4
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 4]
mov dword [ebp - 8], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
cmp dword [ebp - 8], esi
je 0x405ab6
lea eax, [ebp - 0x2c]
push eax
push 0x40b984
push esi
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x2c], esi
call fcn.004055b8
add esp, 0x14
test al, al
je 0x405ab6
mov ebx, dword [ebp - 0x18]
mov edx, dword [ebx + 4]
test dl, 4
jne 0x405ab6
push 7
pop ecx
xor eax, eax
lea edi, [ebp - 0x58]
rep stosd dword es:[edi], eax
xor edi, edi
or edx, 4
inc edi
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x58], edi
movzx eax, byte [ebx + 1]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x5c]
push eax
add ebx, 8
push edi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], 5
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x14], esi
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 4]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
call fcn.00405780
add esp, 0x18
test al, al
je 0x405aa8
push esi
push dword [ebp - 0x14]
push edi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x1c], esi
call fcn.00405693
add esp, 0xc
test al, al
je 0x405a8c
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00405716
add esp, 0x14
cmp dword [ebp - 0x14], esi
je 0x405ab6
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], esi
je 0x405ac4
push dword [ebp - 4]
call fcn.00405f31
pop ecx
pop edi
pop ebx
mov eax, dword [ebp - 0x30]
pop esi
leave
ret