Function at 0x10041870
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10070f4b
mov eax, dword fs:[0]
push eax
mov eax, 0x1210
call fcn.100562c0
mov eax, dword [0x100f38c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x1f4
mov esi, ecx
lea ecx, [ebp - 0x11f4]
xor ebx, ebx
push 0x4b
push ecx
mov dword [ebp - 0x1210], eax
mov dword [ebp - 0x1204], ebx
mov dword [ebp - 0x11f8], ebx
call fcn.10056000
mov ecx, 0x1f4
xor eax, eax
lea edi, [ebp - 0x1000]
add esp, 0xc
rep stosd dword es:[edi], eax
mov eax, dword [esi]
mov dword [ebp - 4], ebx
cmp eax, 0xffffffff
je 0x10041c21
lea edx, [ebp - 0x11fc]
push edx
push ebx
push ebx
lea ecx, [ebp - 0x1218]
push ecx
push 1
lea edi, [esi + 4]
push edi
push eax
mov dword [ebp - 0x11fc], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
mov eax, dword [ebp - 0x11fc]
cmp eax, ebx
jbe 0x10041c21
add eax, 0xa
push eax
call fcn.10054d74
add esp, 4
mov ebx, eax
mov eax, dword [ebp - 0x11fc]
lea edx, [ebp - 0x11fc]
push edx
mov edx, dword [esi]
push eax
push ebx
lea ecx, [ebp - 0x1218]
push ecx
push 1
push edi
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x10041c1f
mov ecx, dword [ebp - 0x11fc]
lea eax, [ebp - 0x11f8]
push eax
push ecx
push ebx
mov ecx, esi
call fcn.10041230
mov edx, dword [ebp - 0x11f8]
test edx, edx
je 0x10041bcd
lea eax, [ebp - 0x11f4]
jmp 0x1004198f
mov edx, dword [ebp - 0x11f8]
mov eax, dword [ebp - 0x1200]
cmp dword [ebp - 0x1204], 0
jne 0x10041bcd
mov ecx, 7
mov esi, str.SYSTEMCurrentControlSetEnum_
lea edi, [ebp - 0x628]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor ebx, ebx
movsb byte es:[edi], byte [esi]
cmp eax, ebx
je 0x100419f6
lea ecx, [ebp - 0x11f4]
sub eax, ecx
inc eax
lea ecx, [eax - 1]
cmp ecx, 0x1f3
ja 0x100419f6
cmp eax, edx
jae 0x100419de
lea eax, [ebp + eax - 0x11f4]
mov dword [ebp - 0x1200], eax
jmp 0x100419e4
mov dword [ebp - 0x1200], ebx
cmp ecx, edx
jae 0x100419fc
cmp ecx, 0xffffffff
je 0x100419fc
mov ecx, dword [ebp + ecx*4 - 0x1000]
jmp 0x100419fe
mov dword [ebp - 0x1200], ebx
xor ecx, ecx
mov eax, ecx
mov edx, ecx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10041a02
lea edi, [ebp - 0x628]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10041a12
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x1208]
push ecx
push 0x20019
push ebx
lea edx, [ebp - 0x628]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10041bba
mov ecx, dword [ebp - 0x1208]
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x10041bad
inc ebx
xor eax, eax
jmp 0x10041a80
mov cl, byte [ebp + eax - 0x628]
mov byte [ebp + eax - 0x218], cl
inc eax
test cl, cl
jne 0x10041a80
lea edi, [ebp - 0x218]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10041aa0
mov dx, word [0x10078b70]
lea eax, [ebp - 0x420]
mov word [edi], dx
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10041ac0
lea edi, [ebp - 0x218]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10041ad0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x218]
rep movsb byte es:[edi], byte [esi]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10041af0
mov ecx, dword [str.Control]
mov edx, dword [0x1007d100]
mov dword [eax], ecx
mov cl, byte [0x1007d104]
mov dword [eax + 4], edx
lea edx, [ebp - 0x120c]
push edx
push 0x20019
mov byte [eax + 8], cl
push 0
lea eax, [ebp - 0x218]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10041b6d
lea ecx, [ebp - 0x1214]
push ecx
mov ecx, dword [ebp - 0x120c]
lea edx, [ebp - 0x830]
push edx
lea eax, [ebp - 0x121c]
push eax
push 0
push str.ActiveService
push ecx
mov dword [ebp - 0x1214], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x10041b91
mov eax, dword [ebp - 0x1208]
push 0x104
lea edx, [ebp - 0x420]
push edx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
je 0x10041a74
jmp 0x10041bad
lea ecx, [ebp - 0x420]
push ecx
mov ecx, dword [ebp - 0x1210]
call fcn.1001e170
mov dword [ebp - 0x1204], 1
mov edx, dword [ebp - 0x1208]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x1200], 0
jne 0x10041983
mov edx, dword [ebp - 0x11f8]
xor ebx, ebx
xor esi, esi
cmp edx, ebx
jbe 0x10041bfb
mov eax, dword [ebp + esi*4 - 0x1000]
cmp eax, ebx
je 0x10041bf6
push eax
call fcn.100557bf
mov dword [ebp + esi*4 - 0x1000], ebx
mov edx, dword [ebp - 0x11f8]
add esp, 4
inc esi
cmp esi, edx
jb 0x10041bd5
mov eax, dword [ebp - 0x1204]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10055898
mov esp, ebp
pop ebp
ret 4
xor ebx, ebx
mov edx, dword [ebp - 0x11f8]
jmp 0x10041bcf