Function at 0x10021d58
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x30
mov eax, 0x1004990b
call fcn.10046eeb
mov edi, ecx
lea ecx, [ebp - 0x3c]
call fcn.1003f5ed
xor ebx, ebx
mov esi, 0x800
push 0x1002
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], esi
call sub.MSVCR100.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
push eax
push ebx
push esi
lea ecx, [ebp - 0x3c]
call fcn.1002c790
mov esi, eax
test esi, esi
js 0x10021f7d
lea ebx, [edi + 0x28]
push ebx
push dword [edi + 0x20]
call fcn.1002c790
mov esi, eax
pop ecx
pop ecx
test esi, esi
js 0x10021f7d
cmp byte [edi + 0x5c], 0
jne 0x10021f7d
and dword [ebp - 0x10], 0
lea eax, [ebp - 0x18]
push eax
push ebx
mov byte [ebp - 4], 1
call dword [sym.imp.ole32.dll_StringFromCLSID]
mov esi, eax
test esi, esi
js 0x10021f6a
push 0x100057b0
push dword [ebp - 0x18]
lea ecx, [ebp - 0x3c]
push 0x100057d0
call fcn.1002c790
mov esi, eax
test esi, esi
js 0x10021f6a
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push dword [ebp - 0x38]
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10021f13
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x38]
lea eax, [ebp - 0x20]
push eax
push 0
push 0x100057e0
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10021f13
cmp dword [ebp - 0x1c], eax
jbe 0x10021f13
mov edx, dword [ebp - 0x38]
mov ecx, 0x10005800
mov eax, edx
mov bx, word [eax]
cmp bx, word [ecx]
jne 0x10021e79
test bx, bx
je 0x10021e75
mov bx, word [eax + 2]
cmp bx, word [ecx + 2]
jne 0x10021e79
add eax, 4
add ecx, 4
test bx, bx
jne 0x10021e53
xor eax, eax
jmp 0x10021e7e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10021ea2
push dword [edi + 0x20]
mov esi, 0x8000ffff
push esi
push 0x7f5
push 0x827
call fcn.1003d19b
add esp, 0x10
jmp 0x10021f6a
mov ecx, 0x1000580c
mov eax, edx
mov bx, word [eax]
cmp bx, word [ecx]
jne 0x10021ecf
test bx, bx
je 0x10021ecb
mov bx, word [eax + 2]
cmp bx, word [ecx + 2]
jne 0x10021ecf
add eax, 4
add ecx, 4
test bx, bx
jne 0x10021ea9
xor eax, eax
jmp 0x10021ed4
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10021f0c
mov eax, 0x10005818
mov cx, word [edx]
cmp cx, word [eax]
jne 0x10021f03
test cx, cx
je 0x10021eff
mov cx, word [edx + 2]
cmp cx, word [eax + 2]
jne 0x10021f03
add edx, 4
add eax, 4
test cx, cx
jne 0x10021edd
xor eax, eax
jmp 0x10021f08
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10021f10
mov byte [edi + 0x5d], 1
lea ebx, [edi + 0x28]
cmp byte [edi + 0x5d], 0
mov byte [edi + 0x5c], 1
je 0x10021f6a
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push eax
push 0x1000835c
push 7
push 0
push ebx
mov byte [ebp - 4], 2
call fcn.1002c790
mov esi, eax
test esi, esi
js 0x10021f4b
push dword [ebp - 0x14]
lea ecx, [edi + 0x10]
call fcn.1002c790
mov esi, eax
cmp dword [ebp - 0x14], 0
mov byte [ebp - 4], 1
je 0x10021f6a
xor ecx, ecx
lea eax, [ebp - 0x14]
xchg dword [eax], ecx
test ecx, ecx
je 0x10021f66
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
and dword [ebp - 0x14], 0
cmp dword [ebp - 0x10], 0
je 0x10021f7d
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 0x10], 0
cmp dword [ebp - 0x18], 0
je 0x10021f8c
push dword [ebp - 0x18]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.1003f607
mov eax, esi
call fcn.10046fc3
ret