Function at 0x102f670
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x102f6fc
cmp dword [ebp + 0xc], ebx
je 0x102f6fc
cmp dword [ebp + 0x10], ebx
je 0x102f6fc
xor edi, edi
mov dword [ebp - 8], ebx
cmp dword [ebp - 4], ebx
jbe 0x102f845
mov eax, dword [ebp - 0x10]
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
pop ecx
cmp edi, ebx
je 0x102f6fc
mov eax, dword [ebp - 0x14]
mov esi, dword [sym.imp.msvcrt.dll_malloc]
add eax, 2
push eax
call esi
pop ecx
mov dword [ebp - 0xc], eax
cmp eax, ebx
jne 0x102f705
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc
mov eax, dword [ebp - 4]
lea eax, [eax*4 + 4]
push eax
call esi
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x102f72b
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x102f6fb
mov esi, dword [ebp - 4]
lea eax, [esi*4 + 4]
push eax
push 0xff
push ebx
call sub.msvcrt.dll_memset
add esp, 0xc
test esi, esi
jbe 0x102f7ef
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
add eax, 2
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x20]
push eax
push edi
lea eax, [esi - 1]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x102f7ef
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x102f785
sub eax, edx
sar eax, 1
push eax
push dword [ebp + 0xc]
push edi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x102f7e8
cmp dword [ebp - 0x18], 1
je 0x102f7b1
cmp dword [ebp - 0x18], 2
jne 0x102f7c3
push dword [ebp + 0x10]
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x102f81b
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x102f7c9
sub eax, edx
sar eax, 1
lea eax, [edi + eax*2]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
pop ecx
mov dword [ebp - 8], eax
mov dword [ebx + esi*4], eax
dec esi
jne 0x102f74c
push dword [ebp - 0xc]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
pop ecx
xor eax, eax
inc eax
cmp dword [ebp - 4], eax
jb 0x102f832
mov ecx, dword [ebx + eax*4]
cmp ecx, dword [ebp - 8]
je 0x102f811
inc eax
cmp eax, dword [ebp - 4]
jbe 0x102f803
cmp eax, dword [ebp - 4]
ja 0x102f832
inc dword [ebp - 8]
jmp 0x102f7fb
push dword [ebp - 0xc]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push ebx
call esi
pop ecx
pop ecx
mov eax, edi
jmp 0x102f6fe
push ebx
call esi
cmp dword [ebp - 8], 0x1869f
pop ecx
jg 0x102f6f5
xor ebx, ebx
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x102f84b
sub eax, edx
sar eax, 1
add eax, eax
lea ecx, [eax + 6]
mov dword [ebp - 4], eax
cmp dword [ebp - 0x10], ecx
jae 0x102f8bf
cmp edi, ebx
je 0x102f874
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
mov eax, dword [ebp - 4]
pop ecx
xor ecx, ecx
push 2
add eax, 6
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
pop ecx
cmp edi, ebx
je 0x102f6fc
mov eax, dword [ebp - 4]
push eax
push dword [ebp + 0xc]
push edi
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 4]
shr eax, 1
push 0xa
lea eax, [edi + eax*2]
push eax
push dword [ebp - 8]
call dword [sym.imp.msvcrt.dll__itow]
add esp, 0x18
jmp 0x102f82b
cmp edi, ebx
je 0x102f82b
jmp 0x102f899