Function at 0x41f790
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword fs:[0x18]
push ebx
push esi
push edi
mov eax, dword [eax + 0x30]
push 0x3c
push 0
push 0x54c380
mov ecx, dword [eax + 0x10]
movzx eax, word [ecx + 0x40]
mov dword [ebp - 8], eax
mov eax, dword [ecx + 0x44]
mov dword [ebp - 4], eax
call fcn.004dce30
add esp, 0xc
lea eax, [ebp - 8]
push 0
push 0x41f250
push 3
push 0x1c
push 0x546208
push eax
call sym.ProcessHacker.exe_PhParseCommandLine
test al, al
je 0x41f7ec
mov eax, dword [0x54c380]
test eax, 0x4000
je 0x41f811
push str.Command_line_options:_n_n_c_n_ctype_command_type_n_cobject_command_object_n_caction_command_action_n_cvalue_command_value_n_debug_n_elevate_n_help_n_hide_n_installkph_n_newinstance_n_nokph_n_noplugins_n_nosettings_n_plugin_pluginname:value_n_priority_rhnl_n_s_n_selectpid_pid_to_select_n_selecttab_name_of_tab_to_select_n_settings_filename_n_sysinfo__section_name__n_uninstallkph_n_v_n
push 0x40
push 0
call sym.ProcessHacker.exe_PhShowMessage
mov eax, dword [0x54c380]
add esp, 0xc
test eax, 0x4000
je 0x41f811
push 0
call dword [sym.imp.ntdll.dll_RtlExitUserProcess]
test al, 0x20
je 0x41f866
mov eax, dword [0x5491d0]
push str.kprocesshacker.sys
push dword [eax + 4]
call sym.ProcessHacker.exe_PhConcatStrings2
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], 2
mov byte [ebp - 0xc], 1
push ecx
mov edx, dword [eax + 4]
call fcn.004b3b50
mov esi, eax
test esi, esi
jns 0x41f85f
test dword [0x54c380], 0x2000
jne 0x41f85f
push 0
push esi
push str.Unable_to_install_KProcessHacker
push 0
call sym.ProcessHacker.exe_PhShowStatus
push esi
call dword [sym.imp.ntdll.dll_RtlExitUserProcess]
test al, 0x40
je 0x41f926
push 1
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x41f897
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x41f902
movzx esi, si
or esi, 0xc0070000
jmp 0x41f900
push 0x10020
push str.KProcessHacker3
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
je 0x41f8e4
lea eax, [ebp - 0x3c]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x41f8db
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x41f8db
movzx esi, si
or esi, 0xc0070000
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x41f8f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x41f8f9
movzx esi, si
or esi, 0xc0070000
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
jns 0x41f91f
test dword [0x54c380], 0x2000
jne 0x41f91f
push 0
push esi
push str.Unable_to_uninstall_KProcessHacker
push 0
call sym.ProcessHacker.exe_PhShowStatus
push esi
call dword [sym.imp.ntdll.dll_RtlExitUserProcess]
test eax, 0x1000
je 0x41f95c
lea eax, [ebp - 0x20]
push eax
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
test byte [eax + 4], 1
jne 0x41f957
push 0
push 0
push 5
push 1
push 5
push 0
push 0
call sym.ProcessHacker.exe__PhShellProcessHacker_28
push 0
call dword [sym.imp.ntdll.dll_RtlExitUserProcess]
mov eax, dword [0x54c380]
test al, al
jns 0x41f965
call fcn.0040e780
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret