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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x100603c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
xor ebx, ebx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x20], ebx
cmp eax, ebx
je 0x1004e1e
cmp ecx, ebx
je 0x1004e1e
push esi
push edi
push ebx
mov edi, 0x10024e8
push edi
mov esi, 0x80000002
push esi
call fcn.01004acd
test eax, eax
je 0x1004cbd
lea eax, [ebp - 0x20]
push eax
push 0x20019
push ebx
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x1004cae
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
cmp eax, ebx
je 0x1004cbd
jle 0x1004cba
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x28]
cmp eax, ebx
je 0x1004ddb
cmp dword [ebp - 0x38], 8
mov esi, 0x80004005
je 0x1004cd6
mov dword [ebp - 0x1c], esi
cmp dword [ebp - 0x1c], ebx
jl 0x1004df3
shl eax, 2
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x1004d35
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, ebx
jle 0x1004d11
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
jge 0x1004d2d
call edi
cmp eax, ebx
jg 0x1004d21
mov dword [ebp - 0x1c], eax
jmp 0x1004ddb
and eax, 0xffff
or eax, 0x80070000
jmp 0x1004d19
mov dword [ebp - 0x1c], esi
jmp 0x1004ddb
push 4
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], eax
pop esi
mov ecx, dword [ebp - 0x34]
cmp ecx, dword [ebp - 0x28]
jae 0x1004ddb
xor eax, eax
push ebx
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
push ebx
push ebx
stosb byte es:[edi], al
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push ecx
push dword [ebp - 0x20]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x48], 9
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, ebx
jne 0x1004daf
lea eax, [ebp - 0x2c]
push eax
push 0x20019
push ebx
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x1004daf
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x30]
push ebx
push ebx
push 0x1001494
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
je 0x1004dbe
jle 0x1004dbb
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x2c], ebx
je 0x1004dcc
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x34]
add dword [ebp - 0x30], esi
cmp dword [ebp - 0x1c], ebx
jge 0x1004d3e
cmp dword [ebp - 0x1c], ebx
jl 0x1004df3
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x44]
mov dword [eax], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x24], ebx
mov dword [eax], ecx
pop edi
pop esi
cmp dword [ebp - 0x20], ebx
je 0x1004e03
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x24], ebx
je 0x1004e19
push dword [ebp - 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x1c]
jmp 0x1004e23
mov eax, 0x80070057
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.010032ed
leave
ret 8