Function at 0x10016d21
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x520
push ebx
xor ebx, ebx
cmp word [ebp + 8], 3
push esi
push edi
mov dword [ebp - 0xc], SysReAllocString
mov dword [ebp - 8], ebx
mov byte [ebp - 0x138], bl
jne 0x10016d55
mov eax, dword [ebp + 0x10]
cmp eax, ebx
mov dword [ebp - 0xc], eax
jge 0x10016dce
jmp 0x10016f4c
cmp word [ebp + 8], 8
jne 0x10016f4c
mov edi, dword [ebp + 0x10]
cmp edi, ebx
je 0x10016f4c
cmp word [edi], bx
je 0x10016f4c
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
call esi
cmp eax, 0xc8
jae 0x10016f4c
push edi
call esi
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.100392b0
mov esi, esp
push ebx
push ebx
push edi
push esi
push 0xffffffffffffffff
push dword [ebp + 0x10]
mov byte [esi], bl
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x138]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
push 0x1003bcf4
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10016f4c
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
lea eax, [ebp - 0x70]
push 0x63
push eax
push ebx
mov dword [ebp + 0x14], ebx
push dword [ebp - 4]
call esi
test eax, eax
jne 0x10016ee0
mov edi, 0x1f4
cmp dword [ebp - 8], ebx
jle 0x10016ebf
cmp byte [ebp - 0x138], 0x7b
lea eax, [ebp - 0x70]
push eax
jne 0x10016e33
lea eax, [ebp - 0x138]
jmp 0x10016eb4
push 0x1003bcf4
lea eax, [ebp - 0x520]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x32c]
push edi
push eax
lea eax, [ebp - 0x520]
push 0x100422e4
push eax
call fcn.10017407
add esp, 0x20
test eax, eax
je 0x10016e87
push dword [ebp - 8]
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x32c]
push eax
call fcn.1001416f
add esp, 0xc
test eax, eax
je 0x10016eeb
lea eax, [ebp - 0x32c]
push edi
push eax
lea eax, [ebp - 0x520]
push str.DisplayName
push eax
call fcn.10017407
add esp, 0x10
test eax, eax
je 0x10016ebf
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x32c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x10016eeb
mov eax, dword [ebp + 0x14]
inc dword [ebp + 0x14]
cmp dword [ebp - 0xc], eax
jbe 0x10016eeb
lea eax, [ebp - 0x70]
push 0x63
push eax
push dword [ebp + 0x14]
push dword [ebp - 4]
call esi
test eax, eax
je 0x10016e12
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x10016f4c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x70], bl
je 0x10016f4c
push 0xc
call fcn.1001ad44
mov esi, eax
pop ecx
cmp esi, ebx
je 0x10016f21
mov ecx, esi
call fcn.10016d0c
push 0x10043d9c
mov dword [esi], 0x1003bd4c
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x10016f23
xor esi, esi
cmp esi, ebx
je 0x10016f4c
lea eax, [ebp - 0x70]
push 0xffffffffffffffff
push eax
call fcn.1002e88d
pop ecx
mov dword [esi + 8], eax
cmp eax, ebx
mov eax, dword [esi]
pop ecx
je 0x10016f45
push esi
call dword [eax + 4]
mov eax, esi
jmp 0x10016f4e
push 1
mov ecx, esi
call dword [eax + 0x34]
xor eax, eax
lea esp, [ebp - 0x52c]
pop edi
pop esi
pop ebx
leave
ret