Function at 0x10004793
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x38
mov eax, 0x1006a726
call fcn.10043a69
xor esi, esi
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x20], esi
push 0x20019
push str.SOFTWARE
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], esi
call fcn.100020c0
cmp eax, esi
mov ebx, 0xffff
mov edi, 0x80070000
jle 0x100047e4
and eax, ebx
or eax, edi
cmp eax, esi
jl 0x10004a3d
lea eax, [ebp - 0x38]
push eax
push esi
push 4
push dword [ebp - 0x20]
mov dword [ebp - 0x38], esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegGetKeySecurity]
call esi
cmp eax, 0x7a
jne 0x10004834
push dword [ebp - 0x38]
call fcn.1003e542
test eax, eax
pop ecx
mov dword [ebp - 0x2c], eax
je 0x10004a10
push dword [ebp - 0x38]
push 0
push eax
call fcn.10042010
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x2c]
push 4
push dword [ebp - 0x20]
call esi
test eax, eax
jle 0x1000483e
and eax, ebx
or eax, edi
test eax, eax
jl 0x10004a10
and dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
push 0x10071290
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jle 0x10004866
and eax, ebx
or eax, edi
test eax, eax
jl 0x10004a10
lea ecx, [ebp - 0x20]
call fcn.100020a9
mov eax, dword [ebp - 0x1c]
and dword [ebp - 0x34], 0
lea ecx, [ebp - 0x34]
push ecx
push 0
push 4
push eax
mov dword [ebp - 0x20], eax
call esi
cmp eax, 0x7a
jne 0x100048be
push dword [ebp - 0x34]
call fcn.1003e542
test eax, eax
pop ecx
mov dword [ebp - 0x30], eax
je 0x10004a10
push dword [ebp - 0x34]
push 0
push eax
call fcn.10042010
add esp, 0xc
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x30]
push 4
push dword [ebp - 0x1c]
call esi
test eax, eax
jle 0x100048c8
and eax, ebx
or eax, edi
test eax, eax
jl 0x10004a10
push dword [ebp - 0x2c]
push 4
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test eax, eax
jle 0x100048e6
and eax, ebx
or eax, edi
test eax, eax
jl 0x10004a10
lea eax, [ebp - 0x18]
push eax
push 0x10071290
xor esi, esi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x18], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
cmp eax, esi
jle 0x1000490d
and eax, ebx
or eax, edi
cmp eax, esi
mov dword [ebp - 0x1c], eax
jl 0x10004999
lea ecx, [ebp - 0x20]
call fcn.100020a9
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
push ecx
push esi
lea ecx, [ebp - 0x3c]
push ecx
push esi
push 0x1007128c
mov dword [ebp - 0x3c], esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
mov dword [ebp - 0x20], eax
call esi
test eax, eax
jle 0x10004949
and eax, ebx
or eax, edi
test eax, eax
mov dword [ebp - 0x1c], eax
jl 0x10004999
push dword [ebp - 0x28]
call fcn.1003e542
test eax, eax
pop ecx
mov dword [ebp - 0x24], eax
jne 0x10004969
mov dword [ebp - 0x1c], 0x8007000e
jmp 0x10004999
push dword [ebp - 0x28]
push 0
push eax
call fcn.10042010
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x24]
lea eax, [ebp - 0x3c]
push eax
push 0
push 0x1007128c
push dword [ebp - 0x18]
call esi
test eax, eax
jle 0x10004996
and eax, ebx
or eax, edi
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x30]
push 4
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
cmp dword [ebp - 0x1c], 0
jl 0x10004a10
mov eax, dword [ebp - 0x28]
test al, 3
jne 0x100049f8
mov edi, dword [ebp - 0x24]
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x17], 0
mov byte [ebp - 0x16], 0
mov byte [ebp - 0x15], 0
mov byte [ebp - 0x14], 0
mov byte [ebp - 0x13], 5
lea esi, [eax + edi - 0x14]
jmp 0x100049f4
cmp dword [esi + 8], 0x15
jne 0x100049f1
push 6
lea eax, [ebp - 0x18]
push eax
lea eax, [esi + 2]
push eax
call fcn.10040871
add esp, 0xc
test eax, eax
je 0x10004a4b
sub esi, 4
cmp esi, edi
jae 0x100049d5
mov dword [ebp - 0x1c], 0x80004005
cmp dword [ebp - 0x1c], 0
jl 0x10004a10
push dword [ebp - 0x44]
push dword [ebp - 0x40]
call sub.ADVAPI32.dll_ConvertSidToStringSidW
cmp dword [ebp - 0x2c], 0
je 0x10004a1f
push dword [ebp - 0x2c]
call fcn.100421fa
pop ecx
cmp dword [ebp - 0x30], 0
je 0x10004a2e
push dword [ebp - 0x30]
call fcn.100421fa
pop ecx
cmp dword [ebp - 0x24], 0
je 0x10004a3d
push dword [ebp - 0x24]
call fcn.100421fa
pop ecx
lea ecx, [ebp - 0x20]
call fcn.100020a9
call fcn.10043aec
ret
mov dword [ebp - 0x40], esi
jmp 0x100049ff