Function at 0x1004883
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x14
mov eax, 0x1004c3a
call fcn.01002df7
mov esi, ecx
mov dword [ebp - 0x20], esi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x14], edi
mov dword [ebp + 8], ebx
mov dword [ebp - 0x1c], ebx
cmp edi, ebx
jne 0x10048d4
mov eax, dword [section..data]
cmp eax, section..data
je 0x10048ca
test byte [eax + 0x1c], 1
je 0x10048ca
push 0x1001a20
push 0xa
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ba5
mov eax, 0x80070057
jmp 0x1004a88
lea ecx, [esi + 0x20]
call fcn.01004575
test eax, eax
je 0x10048ea
mov eax, 0xe0000000
jmp 0x1004a88
cmp dword [esi + 4], ebx
je 0x1004a75
cmp dword [esi], ebx
jne 0x1004a75
lea ebx, [esi + 0x14]
mov ecx, ebx
call fcn.0100456c
test eax, eax
jne 0x1004923
xor ebx, ebx
cmp dword [ebp - 0x14], ebx
je 0x1004958
cmp dword [ebp - 0x14], edi
je 0x1004958
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_RegCloseKey]
mov dword [ebp - 0x14], edi
jmp 0x1004958
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 0xc]
or eax, 0x20019
push eax
push 0
mov ecx, ebx
call fcn.01004564
push eax
push edi
call dword [sym.imp.KERNEL32.dll_RegOpenKeyExW]
test eax, eax
je 0x100494f
mov esi, 0x80004005
jmp 0x1004a86
mov dword [ebp - 0x1c], 1
xor ebx, ebx
lea eax, [ebp + 8]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
push ebx
lea ecx, [esi + 0x20]
call fcn.01004564
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_RegQueryValueExW]
cmp eax, ebx
je 0x1004982
mov esi, 0x80004005
jmp 0x1004a77
mov eax, dword [ebp - 0x18]
xor edx, edx
inc edx
cmp eax, edx
je 0x100499c
cmp eax, 2
je 0x100499c
cmp eax, 7
jne 0x100499f
add dword [ebp + 8], 2
jmp 0x100499f
inc dword [ebp + 8]
push eax
call fcn.01004771
mov ecx, dword [esi + 0xc]
cmp ecx, eax
je 0x10049f0
cmp ecx, 9
je 0x10049f0
cmp ecx, 5
jne 0x10049ba
cmp eax, edx
je 0x10049f0
cmp ecx, edx
jne 0x10049c3
cmp eax, 5
je 0x10049f0
cmp ecx, ebx
jne 0x10049cb
cmp eax, edx
je 0x10049f0
mov eax, dword [section..data]
cmp eax, section..data
je 0x1004978
test byte [eax + 0x1c], dl
je 0x1004978
push 0x1001a20
push 0xb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ba5
jmp 0x1004978
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x1004a04
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
mov dword [esi + 8], ebx
push dword [ebp + 8]
mov dword [ebp - 4], ebx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
or dword [ebp - 4], 0xffffffff
pop ecx
mov dword [esi + 8], eax
jmp 0x1004a28
mov eax, dword [esi + 8]
cmp eax, ebx
jne 0x1004a36
mov esi, 0x8007000e
jmp 0x1004a77
push dword [ebp + 8]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp + 8]
push eax
push dword [esi + 8]
lea eax, [ebp - 0x18]
push eax
push ebx
lea ecx, [esi + 0x20]
call fcn.01004564
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_RegQueryValueExW]
test eax, eax
jne 0x1004978
mov eax, dword [ebp + 8]
mov dword [esi], 1
mov dword [esi + 0x10], eax
xor esi, esi
cmp dword [ebp - 0x1c], 0
je 0x1004a86
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_RegCloseKey]
mov eax, esi
call fcn.01002e6d
ret 8