Function at 0x408f6b
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov dword [ebp - 0x10], 0
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
call eax
sub esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x409178
mov eax, dword [str.WazuhSvc]
mov dword [esp + 8], 0x10020
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_OpenServiceA]
call eax
sub esp, 0xc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x409134
call dbg.CheckServiceRunning
test eax, eax
je 0x4090a0
mov eax, dword [str.WazuhSvc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Found___s__service_is_running_going_to_try_and_stop_it.
mov dword [esp + 8], global___func__.63
mov dword [esp + 4], 0xdd
mov dword [esp], str.win32_win_service.c
call dbg._plain_minfo
lea eax, [ebp - 0x34]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_ControlService]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x409071
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov edx, dword [str.WazuhSvc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.Failure_stopping_service___s__before_removing_it___ld_.
mov dword [esp + 8], global___func__.63
mov dword [esp + 4], 0xe0
mov dword [esp], str.win32_win_service.c
call dbg._plain_merror
jmp 0x4090d4
mov eax, dword [str.WazuhSvc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Successfully_stopped___s_.
mov dword [esp + 8], global___func__.63
mov dword [esp + 4], 0xe2
mov dword [esp], str.win32_win_service.c
call dbg._plain_minfo
jmp 0x4090d4
mov eax, dword [str.WazuhSvc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Found___s__service_is_not_running.
mov dword [esp + 8], global___func__.63
mov dword [esp + 4], 0xe5
mov dword [esp], str.win32_win_service.c
call dbg._plain_minfo
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0
je 0x409122
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_DeleteService]
call eax
sub esp, 4
test eax, eax
je 0x409122
mov eax, dword [str.WazuhSvc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Successfully_removed___s__from_the_service_database.
mov dword [esp + 8], global___func__.63
mov dword [esp + 4], 0xea
mov dword [esp], str.win32_win_service.c
call dbg._plain_minfo
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
jmp 0x409168
mov eax, dword [str.WazuhSvc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Service_does_not_exist___s__nothing_to_remove.
mov dword [esp + 8], global___func__.63
mov dword [esp + 4], 0xef
mov dword [esp], str.win32_win_service.c
call dbg._plain_minfo
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call eax
sub esp, 4
cmp dword [ebp - 0x10], 0
jne 0x4091ab
mov eax, dword [str.WazuhSvc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Failure_removing___s__from_the_service_database.
mov dword [esp + 8], global___func__.63
mov dword [esp + 4], 0xf6
mov dword [esp], str.win32_win_service.c
call dbg._plain_merror
mov eax, dword [ebp - 0x10]
leave
ret