Function at 0x40ce10
Capabilities:
Modify service
Query or enumerate registry value

Disassembly:
sub esp, 0x224
mov eax, dword [0x422760]
xor eax, esp
mov dword [esp + 0x220], eax
mov eax, dword [esp + 0x22c]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x240]
xor esi, esi
mov dword [esp + 0x2c], eax
mov ebp, 0x41e5d8
mov dword [esp + 0x18], esi
cmp edi, esi
je 0x40d20d
cmp word [edi], si
je 0x40d20d
push 5
call fcn.0040ca70
add esp, 4
mov dword [esp + 0x1c], eax
cmp eax, esi
jne 0x40ce86
push 0x400001fb
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00405470
add esp, 8
lea eax, [esi + 1]
jmp 0x40d2e2
movzx ecx, word [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x10], esi
mov eax, edi
cmp cx, si
je 0x40d064
movzx ecx, cx
inc esi
cmp cx, 0x2b
jne 0x40ceae
mov dword [esp + 0x10], eax
jmp 0x40ceb3
test cx, cx
je 0x40cebc
add eax, 2
cmp word [eax], 0
jne 0x40ceb3
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40cea1
cmp dword [esp + 0x10], 0
mov dword [esp + 0x18], esi
je 0x40d064
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push 0
push str.SYSTEMCurrentControlSetControlServiceGroupOrder
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40cf2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004052c0
add esp, 4
push eax
push str.SYSTEMCurrentControlSetControlServiceGroupOrder
push str._s:__s_n
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00413b96
add esp, 0x10
mov eax, 2
jmp 0x40d2e2
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea edx, [esp + 0x20]
push edx
push 0
lea eax, [esp + 0x30]
push eax
push 0
push str.List
push ecx
call esi
test eax, eax
jne 0x40d00b
mov edx, dword [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov ebp, eax
mov dword [esp + 0x10], ebp
test ebp, ebp
jne 0x40cf95
push str.set_service_dependencies__
push str.groups
push 0xc00001fa
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00405470
add esp, 0x10
lea eax, [ebp + 3]
jmp 0x40d2e2
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push eax
push ebp
lea ecx, [esp + 0x30]
push ecx
push 0
push str.List
push edx
call esi
test eax, eax
je 0x40d055
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004052c0
add esp, 4
push eax
push str.List
push str.SYSTEMCurrentControlSetControlServiceGroupOrder
push str._s_s:__s
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00413b96
add esp, 0x14
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 4
jmp 0x40d2e2
cmp eax, 2
je 0x40d055
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004052c0
add esp, 4
push eax
push str.List
push str.SYSTEMCurrentControlSetControlServiceGroupOrder
push str._s_s:__s
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00413b96
mov ecx, dword [esp + 0x28]
add esp, 0x14
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 4
jmp 0x40d2e2
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x18]
mov eax, esi
shl eax, 9
add eax, 4
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
cmp word [edi], 0
mov ebp, eax
mov dword [esp + 0x24], 0
je 0x40d1ea
lea esp, [esp]
cmp word [edi], 0x2b
jne 0x40d166
cmp word [edi + 2], 0
lea ebx, [edi + 2]
je 0x40d0d5
mov esi, dword [esp + 0x10]
mov ecx, esi
cmp word [ecx], 0
je 0x40d0d5
push ebx
push esi
call fcn.004097b0
add esp, 8
test eax, eax
jne 0x40d128
cmp word [esi], ax
je 0x40d0cc
add esi, 2
cmp word [esi], 0
jne 0x40d0c3
add esi, 2
cmp word [esi], 0
jne 0x40d0b0
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebp
push 0
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40d0f9
push eax
push 0
call ebx
push eax
call esi
push 0x433
call fcn.004052c0
add esp, 4
push eax
push edi
push str._s:__s
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00413b96
add esp, 0x10
mov eax, 5
jmp 0x40d2e2
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d130
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
push edx
push esi
push ebx
call fcn.00412760
push edi
push 0x41d4b4
push 0xffffffffffffffff
lea eax, [esp + 0x48]
push 0x100
push eax
call fcn.00412731
add esp, 0x20
jmp 0x40d188
mov edx, dword [esp + 0x1c]
push 0x100
lea ecx, [esp + 0x34]
push ecx
push 4
push edi
push edx
call fcn.0040cab0
add esp, 0x14
test eax, eax
je 0x40d271
lea eax, [esp + 0x30]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d190
mov ebx, dword [esp + 0x24]
sub eax, edx
sar eax, 1
lea esi, [eax + 1]
lea eax, [esi + esi]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [ebp + ebx*2]
push edx
call fcn.00412760
add ebx, esi
add esp, 0xc
cmp word [edi], 0
mov dword [esp + 0x24], ebx
je 0x40d1d9
jmp 0x40d1d0
add edi, 2
cmp word [edi], 0
jne 0x40d1d0
add edi, 2
cmp word [edi], 0
jne 0x40d090
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40d202
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [esp + 0x2c]
push 0
push 0
push 0
push ebp
push 0
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x40d2cc
test esi, esi
je 0x40d246
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004052c0
add esp, 4
push eax
push 0x4000020b
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00405470
add esp, 0xc
or eax, 0xffffffff
jmp 0x40d2e2
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebp
push 0
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40d295
push eax
push 0
call ebx
push eax
call esi
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x433
call fcn.004052c0
add esp, 4
push eax
push edi
push str._s:__s
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00413b96
add esp, 0x10
mov eax, 5
jmp 0x40d2e2
test esi, esi
je 0x40d2e0
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov ecx, dword [esp + 0x230]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00412cdc
add esp, 0x224
ret