Function at 0x406eb0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
lea esi, [ebp - 0x220]
push ebx
mov ebx, eax
mov eax, esi
sub esp, 0x37c
shr eax, 0x10
mov dword [ebp - 0x364], eax
jmp 0x406ee0
mov dword [esp + 8], esi
mov edx, 0x104
mov dword [esp + 0xc], edx
mov dword [esp + 4], edi
mov eax, dword [ebx]
mov dword [esp], eax
call sub.advapi32.dll_RegEnumKeyW
sub esp, 0x10
cmp eax, 0x103
je 0x4071f8
test eax, eax
je 0x406f58
test byte [0x419090], 2
jne 0x406f20
inc edi
jmp 0x406ee0
mov dword [esp + 0x10], eax
mov eax, str.Error__d_reading_key__d_name___skipping_n
mov dword [esp + 0xc], eax
mov eax, str.scmdatabase_load_services
mov dword [esp + 8], eax
mov eax, 0x419090
mov dword [esp + 0x14], edi
inc edi
mov dword [esp + 4], eax
mov dword [esp], 1
call fcn.00406030
jmp 0x406ee0
mov dword [esp], esi
lea eax, [ebp - 0x354]
mov dword [esp + 4], eax
call fcn.004063f0
test eax, eax
jne 0x4071f8
test byte [0x419090], 8
jne 0x407040
mov dword [esp + 4], esi
lea eax, [ebp - 0x350]
mov dword [esp + 0x10], eax
mov eax, 0x20019
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp], eax
call sub.advapi32.dll_RegOpenKeyExW
sub esp, 0x14
test eax, eax
mov edx, eax
je 0x406fd0
test byte [0x419090], 2
jne 0x407521
mov eax, dword [ebp - 0x354]
mov dword [esp], eax
inc edi
call fcn.00406c90
jmp 0x406ee0
mov eax, dword [ebp - 0x354]
xor edx, edx
mov dword [ebp - 0x34c], edx
mov ecx, dword [ebp - 0x350]
mov dword [ebp - 0x35c], eax
add eax, 0x40
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 8], eax
mov eax, str.ImagePath
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [ebp - 0x360], ecx
call fcn.00409940
test eax, eax
mov edx, eax
je 0x407208
mov dword [ebp - 0x35c], edx
mov eax, dword [ebp - 0x350]
mov dword [esp], eax
call sub.advapi32.dll_RegCloseKey
push edx
mov edx, dword [ebp - 0x35c]
jmp 0x406faf
mov eax, dword [ebp - 0x364]
test eax, eax
je 0x4074de
mov dword [esp], esi
mov eax, 0xffffffff
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40758b
cmp word [ebp - 0x220], 0
je 0x40756d
lea esi, [esi]
mov edx, eax
cmp word [esi + edx*2 + 2], 0
lea eax, [eax + 1]
jne 0x407080
mov dword [ebp - 0x360], edi
lea ecx, [ebp - 0x34a]
mov eax, 0x224c
mov word [ebp - 0x34c], ax
mov dword [ebp - 0x368], ebx
mov dword [ebp - 0x35c], esi
jmp 0x4070f3
cmp eax, 9
je 0x407180
cmp eax, 0xa
jne 0x40719a
mov word [ecx], 0x6e5c
add ecx, 2
lea esi, [esi]
lea edi, [edi]
lea eax, [edx - 1]
test edx, edx
jle 0x407130
lea ebx, [ebp - 0x22a]
cmp ecx, ebx
ja 0x407130
mov edx, eax
add dword [ebp - 0x35c], 2
mov eax, dword [ebp - 0x35c]
movzx eax, word [eax - 2]
cmp eax, 0xd
je 0x407170
jbe 0x4070b8
cmp eax, 0x22
je 0x4071e8
cmp eax, 0x5c
jne 0x40718d
mov word [ecx], 0x5c5c
lea eax, [edx - 1]
add ecx, 2
test edx, edx
jg 0x4070e7
nop
lea esi, [esi]
test eax, eax
mov edi, dword [ebp - 0x360]
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x368]
jle 0x407583
mov word [ecx + 1], 0x2e2e
lea eax, [ecx + 4]
mov byte [ecx + 3], 0x2e
mov byte [eax], 0
lea eax, [ebp - 0x34c]
mov dword [esp], eax
call fcn.00417b60
jmp 0x4074f1
mov word [ecx], 0x725c
add ecx, 2
jmp 0x4070e0
mov word [ecx], 0x745c
add ecx, 2
jmp 0x4070e0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x407565
mov byte [ecx], 0x5c
mov edi, eax
add ecx, 5
shr edi, 0xc
movzx ebx, byte [edi + str.0123456789abcdefvalidate_service_config]
mov edi, eax
shr edi, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefvalidate_service_config]
mov edi, eax
shr edi, 4
and eax, 0xf
and edi, 0xf
movzx eax, byte [eax + str.0123456789abcdefvalidate_service_config]
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefvalidate_service_config]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x4070e0
mov word [ecx], 0x225c
add ecx, 2
jmp 0x4070e0
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x35c]
mov ecx, dword [ebp - 0x360]
add eax, 0x44
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, str.Group
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.00409940
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x35c]
mov dword [esp + 4], str.ObjectName
mov ecx, dword [ebp - 0x360]
add eax, 0x50
mov dword [esp + 0xc], eax
mov dword [esp], ecx
call fcn.00409940
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x35c]
mov dword [esp + 4], str.DisplayName
mov ecx, dword [ebp - 0x360]
add eax, 0x54
mov dword [esp + 0xc], eax
mov dword [esp], ecx
call fcn.00409940
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x35c]
mov dword [esp + 4], str.Description
mov ecx, dword [ebp - 0x360]
add eax, 0x5c
mov dword [esp + 0xc], eax
mov dword [esp], ecx
call fcn.00409940
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x35c]
mov dword [esp + 4], str.DependOnService
mov ecx, dword [ebp - 0x360]
add eax, 0x60
mov dword [esp + 0xc], eax
mov dword [esp], ecx
call fcn.00409b70
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x35c]
mov dword [esp + 4], str.DependOnGroup
mov ecx, dword [ebp - 0x360]
add eax, 0x64
mov dword [esp + 0xc], eax
mov dword [esp], ecx
call fcn.00409b70
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 4], str.Type
mov eax, dword [ebp - 0x35c]
mov ecx, dword [ebp - 0x360]
add eax, 0x34
mov dword [esp + 8], eax
mov dword [esp], ecx
call fcn.00409d30
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 4], str.Start
mov eax, dword [ebp - 0x35c]
mov ecx, dword [ebp - 0x360]
add eax, 0x38
mov dword [esp + 8], eax
mov dword [esp], ecx
call fcn.00409d30
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 4], str.ErrorControl
mov eax, dword [ebp - 0x35c]
mov ecx, dword [ebp - 0x360]
add eax, 0x3c
mov dword [esp + 8], eax
mov dword [esp], ecx
call fcn.00409d30
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 4], 0x41b560
mov eax, dword [ebp - 0x35c]
mov ecx, dword [ebp - 0x360]
add eax, 0x48
mov dword [esp + 8], eax
mov dword [esp], ecx
call fcn.00409d30
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 4], str.PreshutdownTimeout
mov eax, dword [ebp - 0x35c]
mov ecx, dword [ebp - 0x360]
add eax, 0x58
mov dword [esp + 8], eax
mov dword [esp], ecx
call fcn.00409d30
test eax, eax
mov edx, eax
jne 0x40701b
mov dword [esp + 4], str.WOW64
mov ecx, dword [ebp - 0x360]
lea edx, [ebp - 0x34c]
mov dword [esp + 8], edx
mov dword [esp], ecx
call fcn.00409d30
lea edx, [ebp - 0x34c]
test eax, eax
jne 0x407466
cmp dword [ebp - 0x34c], 1
jne 0x407466
mov eax, dword [ebp - 0x35c]
mov dword [eax + 0x78], 1
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x360]
mov dword [esp + 4], str.DelayedAutoStart
mov dword [esp], eax
call fcn.00409d30
test eax, eax
jne 0x40749a
cmp dword [ebp - 0x34c], 1
jne 0x40749a
mov eax, dword [ebp - 0x35c]
mov dword [eax + 0x7c], 1
movzx edx, byte [0x419090]
test dl, 8
jne 0x407773
mov eax, dword [ebp - 0x35c]
mov ecx, dword [eax + 0x60]
mov eax, ecx
mov ecx, edi
mov edi, eax
mov al, dl
and al, 8
cmp word [edi], 0
je 0x4075dc
test al, al
je 0x4074d3
jmp 0x407595
add edi, 2
cmp word [edi], 0
jne 0x4074d0
add edi, 2
jmp 0x4074b9
mov dword [esp], 0x41ac00
movzx eax, si
mov dword [esp + 4], eax
call fcn.004060c0
mov dword [esp + 0x10], eax
mov edx, str.scmdatabase_load_services
mov ecx, 0x419090
mov dword [esp + 8], edx
mov eax, str.Loading_service__s_n
mov dword [esp + 0xc], eax
mov dword [esp + 4], ecx
mov dword [esp], 3
call fcn.00406030
jmp 0x406f7f
mov dword [ebp - 0x35c], edx
mov eax, esi
call fcn.00406120
mov edx, dword [ebp - 0x35c]
mov dword [esp + 0xc], str.Error__d_reading_registry_key_for_service__s___skipping_n
mov dword [esp + 8], str.scmdatabase_load_services
mov dword [esp + 4], 0x419090
mov dword [esp + 0x10], edx
mov dword [esp], 1
mov dword [esp + 0x14], eax
call fcn.00406030
jmp 0x406fbc
mov byte [ecx], al
inc ecx
jmp 0x4070e0
mov word [ebp - 0x34c], 0x224c
lea ecx, [ebp - 0x34a]
mov byte [ebp - 0x34a], 0x22
lea eax, [ecx + 1]
jmp 0x407154
mov eax, 0x41ac0d
jmp 0x4074f1
mov dword [ebp - 0x360], ecx
mov eax, edi
call fcn.00406120
mov dword [esp + 0xc], str.______s_n
mov dword [esp + 8], str.load_service_config
mov dword [esp + 4], 0x419090
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00406030
movzx edx, byte [0x419090]
mov ecx, dword [ebp - 0x360]
jmp 0x4074d3
test al, al
mov edi, ecx
je 0x407624
mov eax, dword [ebp - 0x35c]
mov edx, str._none_
mov eax, dword [eax + 0x64]
cmp word [eax], 0
mov eax, 0x41ada1
mov dword [esp + 0xc], str.Group_dependencies___:__s_n
mov dword [esp + 8], str.load_service_config
mov dword [esp + 4], 0x419090
cmove eax, edx
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.00406030
mov eax, dword [ebp - 0x35c]
mov edx, dword [eax + 0x64]
cmp word [edx], 0
je 0x407690
test byte [0x419090], 8
jne 0x40764e
mov eax, edx
jmp 0x407643
add eax, 2
cmp word [eax], 0
jne 0x407640
lea edx, [eax + 2]
jmp 0x40762d
mov dword [ebp - 0x35c], edx
mov eax, edx
call fcn.00406120
mov dword [esp + 0xc], str.______s_n
mov dword [esp + 8], str.load_service_config
mov dword [esp + 4], 0x419090
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00406030
mov edx, dword [ebp - 0x35c]
jmp 0x40763c
mov eax, dword [ebp - 0x350]
mov dword [esp], eax
call sub.advapi32.dll_RegCloseKey
mov eax, dword [ebp - 0x354]
mov ecx, dword [eax + 0x34]
sub esp, 4
test ecx, ecx
jne 0x4076f0
test byte [0x419090], 8
je 0x406fc2
mov eax, esi
call fcn.00406120
mov dword [esp + 0xc], str.Even_the_service_type_not_set_for_service__s___skipping_n
mov dword [esp + 8], str.scmdatabase_load_services
mov dword [esp + 4], 0x419090
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00406030
jmp 0x406fbc
mov dword [esp], eax
call fcn.00406920
test eax, eax
jne 0x407740
test byte [0x419090], 2
je 0x406fbc
mov eax, esi
call fcn.00406120
mov dword [esp + 0xc], str.Invalid_configuration_of_service__s___skipping_n
mov dword [esp + 8], str.scmdatabase_load_services
mov dword [esp + 4], 0x419090
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.00406030
jmp 0x406fbc
mov eax, dword [ebp - 0x354]
inc edi
mov dword [eax + 8], ebx
mov edx, dword [eax + 0x34]
mov dword [eax + 0x14], edx
lea edx, [ebx + 0x10]
mov dword [eax], edx
mov edx, dword [ebx + 0x14]
mov dword [eax + 4], edx
mov dword [edx], eax
mov dword [ebx + 0x14], eax
mov eax, dword [ebp - 0x354]
mov dword [esp], eax
call fcn.00406e20
jmp 0x406ee0
mov eax, dword [ebp - 0x35c]
mov eax, dword [eax + 0x40]
call fcn.00406120
mov dword [esp + 0xc], str.Image_path_____________s_n
mov dword [esp + 8], str.load_service_config
mov dword [esp + 4], 0x419090
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00406030
movzx edx, byte [0x419090]
test dl, 8
je 0x4074aa
mov eax, dword [ebp - 0x35c]
mov eax, dword [eax + 0x44]
call fcn.00406120
mov dword [esp + 0xc], str.Group__________________s_n
mov dword [esp + 8], str.load_service_config
mov dword [esp + 4], 0x419090
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00406030
movzx edx, byte [0x419090]
test dl, 8
je 0x4074aa
mov eax, dword [ebp - 0x35c]
mov eax, dword [eax + 0x50]
call fcn.00406120
mov dword [esp + 0xc], str.Service_account_name___s_n
mov dword [esp + 8], str.load_service_config
mov dword [esp + 4], 0x419090
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00406030
movzx edx, byte [0x419090]
test dl, 8
je 0x4074aa
mov eax, dword [ebp - 0x35c]
mov eax, dword [eax + 0x54]
call fcn.00406120
mov dword [esp + 0xc], str.Display_name___________s_n
mov dword [esp + 8], str.load_service_config
mov dword [esp + 4], 0x419090
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00406030
movzx edx, byte [0x419090]
test dl, 8
je 0x4074aa
mov eax, dword [ebp - 0x35c]
mov edx, str._none_
mov eax, dword [eax + 0x60]
cmp word [eax], 0
mov eax, 0x41ada1
mov dword [esp + 0xc], str.Service_dependencies_:__s_n
mov dword [esp + 8], str.load_service_config
mov dword [esp + 4], 0x419090
cmove eax, edx
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.00406030
movzx edx, byte [0x419090]
jmp 0x4074aa