Function at 0x42311d
Capabilities:
Query or enumerate registry key
Query service status
Start service

Disassembly:
push 0x3c
mov eax, 0x4b9611
call fcn.004a27f3
push ecx
mov edi, ecx
mov eax, esp
add edi, 8
mov dword [ebp - 0x24], esp
push dword [edi]
xor ebx, ebx
push str.ScmDirectStart__s_
push eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x28], edi
call fcn.00461d60
add esp, 0xc
call fcn.00421d35
pop ecx
lea eax, [ebp - 0x18]
push eax
push 0x109
push ebx
push str.SystemCurrentControlSetServices
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
je 0x42317b
xor eax, eax
inc eax
jmp 0x4233e7
push ecx
mov eax, esp
mov dword [ebp - 0x24], esp
push dword [edi]
push str.ScmDirectStart:__s:_browsing_virt_services_under_the_real_Services_key
push eax
call fcn.00461d60
add esp, 0xc
call fcn.00421d35
pop ecx
mov dword [ebp - 0x24], ebx
call fcn.0048f565
push eax
lea ecx, [ebp - 0x10]
call fcn.0042149e
mov esi, 0x104
push esi
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], ebx
call fcn.004214d0
push esi
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
mov esi, eax
call fcn.00423750
cmp esi, ebx
jne 0x4233c3
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push edi
call fcn.0042342d
push ecx
mov byte [ebp - 4], 1
lea eax, [ebp - 0x10]
mov dword [ebp - 0x2c], esp
mov ecx, esp
push eax
call fcn.00423ad0
mov byte [ebp - 4], bl
call fcn.00421c5e
pop ecx
pop ecx
cmp eax, ebx
jne 0x423217
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
jmp 0x4233b6
mov esi, dword [ebp - 0x10]
push ecx
mov eax, esp
mov dword [ebp - 0x2c], esp
push esi
push str.ScmDirectStart:_virtual_service_found:__s
push eax
call fcn.00461d60
add esp, 0xc
call fcn.00421d35
pop ecx
push ebx
lea eax, [ebp - 0x1c]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x2c], esp
push str.OrgStartType
mov dword [ebp - 0x1c], ebx
call fcn.00423442
push ecx
mov byte [ebp - 4], 2
lea eax, [ebp - 0x10]
mov dword [ebp - 0x20], esp
mov ecx, esp
push eax
call fcn.00423ad0
push dword [ebp - 0x18]
mov byte [ebp - 4], bl
call fcn.00462f30
add esp, 0x14
cmp eax, ebx
jne 0x423298
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x2c], esp
push eax
push str.ScmDirectStart:_could_NOT_read_value_OrgStartType__LE_d_._Skipping_this_service.
push ecx
call fcn.00461d60
add esp, 0xc
call fcn.00421d35
pop ecx
jmp 0x4233af
cmp dword [ebp - 0x1c], 3
je 0x4233af
cmp dword [ebp - 0x1c], 4
je 0x4233af
cmp dword [ebp - 0x14], ebx
jne 0x4232cf
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x14], eax
call fcn.00472240
cmp dword [ebp - 0x14], ebx
je 0x4233ed
push 0x14
push esi
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x4232f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x2c], esp
push eax
push str.ScmDirectStart:_FAILED_opening_service:_LE_d
jmp 0x423284
push ecx
mov eax, esp
mov dword [ebp - 0x2c], esp
push esi
push str.ScmDirectStart:_starting_virtual_auto_start_service__s
push eax
call fcn.00461d60
add esp, 0xc
call fcn.00421d35
pop ecx
push 6
pop ecx
xor eax, eax
mov dword [ebp - 0x48], ebx
lea edi, [ebp - 0x44]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x423382
cmp dword [ebp - 0x44], 1
jne 0x42336d
push ebx
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov edi, str.TRUE
cmp eax, ebx
jne 0x42334e
mov edi, str.FALSE
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x2c], esp
push eax
push edi
push esi
push str.ScmDirectStart:_StartService__s__s__LE_d_
push ecx
call fcn.00461d60
add esp, 0x14
jmp 0x42339d
push ecx
mov eax, esp
mov dword [ebp - 0x2c], esp
push str.ScmDirectStart:_service_already_running
push eax
call fcn.00461d60
pop ecx
pop ecx
jmp 0x42339d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x2c], esp
push eax
push str.ScmDirectStart:_QueryServiceStatus_failed:_LE_d
push ecx
call fcn.00461d60
add esp, 0xc
call fcn.00421d35
pop ecx
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [ebp - 0x28]
or dword [ebp - 4], 0xffffffff
lea ecx, [esi - 0x10]
call fcn.0042101a
inc dword [ebp - 0x24]
jmp 0x42319a
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0042101a
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x14], ebx
je 0x4233e5
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
call fcn.004a28cb
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp - 0x2c], esp
push eax
push str.ScmDirectStart:_FAILED_opening_SCM:_LE_d
push ecx
call fcn.00461d60
add esp, 0xc
call fcn.00421d35
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea ecx, [esi - 0x10]
call fcn.0042101a
push 0x11
pop eax
jmp 0x4233e7