Function at 0x10004220
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007a900
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x10094610]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x100824b4
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [ebp + 0x14]
push 0x100824b4
mov ebx, eax
call fcn.10004f10
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
push 0x20019
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x100042f0
mov eax, dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x10095a00]
je 0x100042b3
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x100042b3
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.10066c8a
add esp, 4
mov eax, dword [ebp + 0x10]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x10095a00]
je 0x100042da
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x100042da
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.10066c8a
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
xor ecx, ecx
mov eax, 0x100
mov edx, 2
mul edx
seto cl
mov dword [ebp - 0x10], 0x200
neg ecx
or ecx, eax
push ecx
call fcn.1006555b
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
add esp, 4
mov edi, eax
lea eax, [ebp - 0x10]
push eax
push edi
push 0
push 0
push ecx
push edx
call esi
mov dword [ebp + 8], eax
test eax, eax
je 0x1000439b
push edi
cmp eax, 0xea
je 0x1000434c
call fcn.10066c8a
add esp, 4
jmp 0x10004286
add dword [ebp - 0x10], 2
call fcn.10066c8a
mov eax, dword [ebp - 0x10]
xor ecx, ecx
shr eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1006555b
mov edi, eax
mov eax, dword [ebp - 0x10]
push eax
push 0
push edi
call fcn.10066c10
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x14]
add esp, 0x14
lea ecx, [ebp - 0x10]
push ecx
push edi
push 0
push 0
push edx
push eax
call esi
mov dword [ebp + 8], eax
test eax, eax
jne 0x100043b5
test edi, edi
jne 0x100043a3
xor eax, eax
jmp 0x100043aa
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [ebp + 0x14]
push edi
mov ebx, eax
call fcn.10004f10
push edi
call fcn.10066c8a
mov ecx, dword [ebp - 0x14]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
xor edx, edx
cmp dword [ebp + 8], edx
lea ecx, [eax - 0xc]
sete dl
mov edi, edx
cmp ecx, dword [0x10095a00]
je 0x100043ff
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x100043ff
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.10066c8a
add esp, 4
mov eax, dword [ebp + 0x10]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x10095a00]
je 0x10004426
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x10004426
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.10066c8a
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10