Function at 0x401590
Capabilities:
Delete file
Delete service
Stop service
Terminate process

Disassembly:
sub esp, 0x1c
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x4015f0
push str._nFail_to_get_manager_
call fcn.00401e82
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x4015dc
cmp eax, 0x57
je 0x4015d5
cmp eax, 0x429
jne 0x4015e9
push str._nThe_specified_database_does_not_exist_
jmp 0x4015e1
push str._nA_specified_parameter_is_invalid_
jmp 0x4015e1
push str._nThe_requested_access_was_denied_
call fcn.00401e82
add esp, 4
push 1
call fcn.00401dad
push 0xf01ff
push str.Sense3
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x401660
push str._nFail_to_get_service_
call fcn.00401e82
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7b
ja 0x40163e
je 0x401637
sub eax, 5
je 0x401630
dec eax
jne 0x401652
push str._nThe_specified_handle_is_invalid_
jmp 0x40164a
push str._nThe_specified_service_control_manager_database_handle_does_not_have_access_to_the_service_
jmp 0x40164a
push str._nThe_specified_service_name_is_invalid_
jmp 0x40164a
cmp eax, 0x424
jne 0x401652
push str._nThe_specified_service_does_not_exist_
call fcn.00401e82
add esp, 4
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 1
call fcn.00401dad
lea eax, [esp + 8]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x4016ea
push str._nFail_to_stop_service_
call fcn.00401e82
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x41d
ja 0x4016b9
je 0x4016b2
sub eax, 5
je 0x4016ab
sub eax, 0x416
je 0x4016a4
dec eax
jne 0x4016d7
push str._nThe_requested_control_code_is_not_valid__or_it_is_unacceptable_to_the_service_
jmp 0x4016cf
push str._nThe_service_cannot_be_stopped_because_other_running_services_are_dependent_on_it_
jmp 0x4016cf
push str._nThe_specified_handle_was_not_opened_with_the_necessary_access_
jmp 0x4016cf
push str._nThe_service_did_not_respond_to_the_start_request_in_a_timely_fashion_
jmp 0x4016cf
sub eax, 0x425
je 0x4016ca
dec eax
jne 0x4016d7
push str._nThe_service_has_not_been_started_
jmp 0x4016cf
push str._nThe_requested_control_code_cannot_be_sent_to_the_service_because_the_state_of_the_service_is_SERVICE_STOPPED__SERVICE_START_PENDING__or_SERVICE_STOP_PENDING_
call fcn.00401e82
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push 1
call fcn.00401dad
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x401745
push str._nFail_to_start_service_
call fcn.00401e82
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 5
je 0x401725
dec eax
je 0x40171e
sub eax, 0x42a
jne 0x401732
push str._nThe_specified_service_has_already_been_marked_for_deletion_
jmp 0x40172a
push str._nThe_specified_handle_is_invalid_
jmp 0x40172a
push str._nThe_specified_handle_was_not_opened_with_SERVICE_START_access_
call fcn.00401e82
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push 1
call fcn.00401dad
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push str._nDelete_Sense3_service_success__n
call fcn.00401e82
push 0
call fcn.00401210
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 8
push 0x4084c0
call esi
test eax, eax
je 0x401783
push str._nDelete_sense3.sys_in_system_directory
call fcn.00401e82
add esp, 4
push 0x408520
call esi
test eax, eax
je 0x40179b
push str._nDelete_sense3.dll_in_system_directory
call fcn.00401e82
add esp, 4
pop edi
pop esi
add esp, 0x1c
ret