MCPcopy Create free account
hub / github.com/bytecode77/r77-rootkit / DeleteWindowsService

Function DeleteWindowsService

r77api/r77win.c:567–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565 return result;
566}
567BOOL DeleteWindowsService(LPCWSTR name)
568{
569 BOOL result = FALSE;
570
571 SC_HANDLE serviceManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
572 if (serviceManager)
573 {
574 SC_HANDLE service = OpenServiceW(serviceManager, name, SC_MANAGER_ALL_ACCESS);
575 if (service)
576 {
577 if (DeleteService(service))
578 {
579 result = TRUE;
580 }
581
582 CloseServiceHandle(service);
583 }
584
585 CloseServiceHandle(serviceManager);
586 }
587
588 return result;
589}
590HANDLE CreatePublicNamedPipe(LPCWSTR name)
591{
592 // Get security attributes for "EVERYONE", so the named pipe is accessible to all processes.

Callers 3

mainFunction · 0.85
mainFunction · 0.85
ControlCallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected