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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006578b
mov eax, dword fs:[0]
push eax
mov eax, 0x1210
call fcn.1004be20
mov eax, dword [0x100e57c0]
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.1004bb60
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 0x1003a1a1
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 0x1003a1a1
add eax, 0xa
push eax
call fcn.1004a7bc
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 0x1003a19f
mov ecx, dword [ebp - 0x11fc]
lea eax, [ebp - 0x11f8]
push eax
push ecx
push ebx
mov ecx, esi
call fcn.100397b0
mov edx, dword [ebp - 0x11f8]
test edx, edx
je 0x1003a14d
lea eax, [ebp - 0x11f4]
jmp 0x10039f0f
mov edx, dword [ebp - 0x11f8]
mov eax, dword [ebp - 0x1200]
cmp dword [ebp - 0x1204], 0
jne 0x1003a14d
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 0x10039f76
lea ecx, [ebp - 0x11f4]
sub eax, ecx
inc eax
lea ecx, [eax - 1]
cmp ecx, 0x1f3
ja 0x10039f76
cmp eax, edx
jae 0x10039f5e
lea eax, [ebp + eax - 0x11f4]
mov dword [ebp - 0x1200], eax
jmp 0x10039f64
mov dword [ebp - 0x1200], ebx
cmp ecx, edx
jae 0x10039f7c
cmp ecx, 0xffffffff
je 0x10039f7c
mov ecx, dword [ebp + ecx*4 - 0x1000]
jmp 0x10039f7e
mov dword [ebp - 0x1200], ebx
xor ecx, ecx
mov eax, ecx
mov edx, ecx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10039f82
lea edi, [ebp - 0x628]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10039f92
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 0x1003a13a
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 0x1003a12d
inc ebx
xor eax, eax
jmp 0x1003a000
mov cl, byte [ebp + eax - 0x628]
mov byte [ebp + eax - 0x218], cl
inc eax
test cl, cl
jne 0x1003a000
lea edi, [ebp - 0x218]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1003a020
mov dx, word [0x1006d2c8]
lea eax, [ebp - 0x420]
mov word [edi], dx
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003a040
lea edi, [ebp - 0x218]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1003a050
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 0x1003a070
mov ecx, dword [str.Control]
mov edx, dword [0x100709c0]
mov dword [eax], ecx
mov cl, byte [0x100709c4]
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 0x1003a0ed
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 0x1003a111
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 0x10039ff4
jmp 0x1003a12d
lea ecx, [ebp - 0x420]
push ecx
mov ecx, dword [ebp - 0x1210]
call fcn.1001bcd0
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 0x10039f03
mov edx, dword [ebp - 0x11f8]
xor ebx, ebx
xor esi, esi
cmp edx, ebx
jbe 0x1003a17b
mov eax, dword [ebp + esi*4 - 0x1000]
cmp eax, ebx
je 0x1003a176
push eax
call fcn.1004b207
mov dword [ebp + esi*4 - 0x1000], ebx
mov edx, dword [ebp - 0x11f8]
add esp, 4
inc esi
cmp esi, edx
jb 0x1003a155
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.1004bb49
mov esp, ebp
pop ebp
ret 4
xor ebx, ebx
mov edx, dword [ebp - 0x11f8]
jmp 0x1003a14f