Function at 0x4543f0
Capabilities:
Enumerate services
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x4ed018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
test edi, edi
jne 0x454441
push str.Inst_StopService:_invalid_parameter
push 1
call fcn.00446b80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push dword [ebp + 0xc]
push edi
push str.Inst_StopService:_Attempting_to_stop_service:__s__stop_dependents___d_
push 2
call fcn.00446b80
add esp, 0x10
push 0xf003f
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x454590
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x4544c0
cmp eax, 0x57
je 0x4544ad
cmp eax, 0x429
je 0x45449a
push str.Inst_StopService:_Service_Manager_open_failed
push eax
push 1
call fcn.00447040
add esp, 0xc
jmp 0x4544db
push str.Inst_StopService:_Service_Manager_open_failed:_ERROR_DATABASE_DOES_NOT_EXIST
push 1
call fcn.00446b80
push str.Inst_StopService:_Service_Manager_open_failed:_system_config_appears_to_be_corrupt
jmp 0x4544d1
push str.Inst_StopService:_Service_Manager_open_failed:_ERROR_INVALID_PARAMETER
push 1
call fcn.00446b80
push str.Inst_StopService:_Service_Manager_open_failed:_system_config_appears_to_be_corrupt
jmp 0x4544d1
push str.Inst_StopService:_Service_Manager_open_failed:_ERROR_ACCESS_DENIED
push 1
call fcn.00446b80
push str.Inst_StopService:_Service_Manager_open_failed:_you_must_be_an_administrator
push 1
call fcn.00446b80
add esp, 0x10
push closesocket
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x454584
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x454547
cmp eax, 0x57
je 0x454534
cmp eax, 0x429
je 0x454521
push str.Inst_StopService:_Service_Manager_open_failed
push eax
push 1
call fcn.00447040
add esp, 0xc
jmp 0x454562
push str.Inst_StopService:_Service_Manager_open_failed:_ERROR_DATABASE_DOES_NOT_EXIST
push 1
call fcn.00446b80
push str.Inst_StopService:_Service_Manager_open_failed:_system_config_appears_to_be_corrupt
jmp 0x454558
push str.Inst_StopService:_Service_Manager_open_failed:_ERROR_INVALID_PARAMETER
push 1
call fcn.00446b80
push str.Inst_StopService:_Service_Manager_open_failed:_system_config_appears_to_be_corrupt
jmp 0x454558
push str.Inst_StopService:_Service_Manager_open_failed:_ERROR_ACCESS_DENIED
push 1
call fcn.00446b80
push str.Inst_StopService:_Service_Manager_open_failed:_you_must_be_an_administrator
push 1
call fcn.00446b80
add esp, 0x10
push str.Inst_StopService:_service_stop_failed
push 1
call fcn.00446b80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
mov eax, 2
mov ecx, str.Inst_StopService:_Service_Manager_successfully_opened_with_reduced_permissions
jmp 0x45459a
mov eax, 0x10
mov ecx, str.Inst_StopService:_Service_Manager_successfully_opened
push ecx
push eax
call fcn.00446b80
add esp, 8
push 0xf01ff
push edi
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
mov dword [ebp - 0x34], edi
test edi, edi
jne 0x454763
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], ebx
cmp eax, 0x7b
ja 0x454606
je 0x4545f8
mov ecx, eax
sub ecx, 5
je 0x4545ea
sub ecx, 1
jne 0x45460d
push str.Inst_StopService:_Service_could_not_be_opened:_ERROR_INVALID_HANDLE
push 1
call fcn.00446b80
jmp 0x454632
push str.Inst_StopService:_Service_Manager_open_failed:_ERROR_ACCESS_DENIED
push 1
call fcn.00446b80
jmp 0x454632
push str.Inst_StopService:_Service_could_not_be_opened:_ERROR_INVALID_NAME
push 1
call fcn.00446b80
jmp 0x454632
cmp eax, 0x424
je 0x45461f
push str.Inst_StopService:_Service_could_not_be_opened
push eax
push 1
call fcn.00447040
add esp, 0xc
jmp 0x454635
push str.Inst_StopService:_Service_could_not_be_opened:_ERROR_SERVICE_DOES_NOT_EXIST
push 4
call fcn.00446b80
mov dword [ebp - 0x30], 1
add esp, 8
push 0x24
push dword [ebp - 0x28]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
mov dword [ebp - 0x34], eax
test edi, edi
jne 0x454757
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
cmp eax, 0x7b
ja 0x4546f4
je 0x4546c9
mov ecx, eax
sub ecx, 5
je 0x45469e
sub ecx, 1
jne 0x4546fb
push str.Inst_StopService:_Service_could_not_be_opened:_ERROR_INVALID_HANDLE
push 1
call fcn.00446b80
add esp, 8
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push str.Inst_StopService:_Service_Manager_open_failed:_ERROR_ACCESS_DENIED
push 1
call fcn.00446b80
add esp, 8
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push str.Inst_StopService:_Service_could_not_be_opened:_ERROR_INVALID_NAME
push 1
call fcn.00446b80
add esp, 8
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
cmp eax, 0x424
je 0x454727
push str.Inst_StopService:_Service_could_not_be_opened
push eax
push 1
call fcn.00447040
add esp, 0xc
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push str.Inst_StopService:_Service_could_not_be_opened:_ERROR_SERVICE_DOES_NOT_EXIST
push 4
call fcn.00446b80
add esp, 8
mov esi, 1
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
mov eax, 2
mov ecx, str.Inst_StopService:_Service_successfully_opened_with_reduced_permissions
jmp 0x45476d
mov eax, 0x10
mov ecx, str.Inst_StopService:_Service_successfully_opened
push ecx
push eax
call fcn.00446b80
add esp, 8
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x4547a1
push str.Inst_StopService:_Could_not_query_service_status
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
call fcn.00446e90
add esp, 0xc
jmp 0x454c46
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx - 1]
cmp eax, 6
ja 0x4547b5
mov eax, dword [ecx*4 + 0x4ef458]
jmp 0x4547ba
mov eax, dword [str.INVALID]
push dword [ebp - 0xc]
push eax
push str.Inst_StopService:_service_status:__s_cp0x_08x
push 0x20
call fcn.00446b80
mov eax, dword [ebp - 8]
add esp, 0x10
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x1c]
cmp eax, 3
jne 0x454894
nop
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
add ebx, 0x1f4
push eax
push edi
add esi, 0x1f4
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4548e8
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx - 1]
cmp eax, 6
ja 0x45481e
mov eax, dword [ecx*4 + 0x4ef458]
jmp 0x454823
mov eax, dword [str.INVALID]
push dword [ebp - 0xc]
push eax
push str.Inst_StopService:_service_status:__s_cp0x_08x
push 2
call fcn.00446b80
mov eax, dword [ebp - 0xc]
add esp, 0x10
cmp eax, dword [ebp - 0x2c]
jbe 0x45485d
push dword [ebp - 8]
mov dword [ebp - 0x2c], eax
push str.Inst_StopService:_Updating_sleep_hint:__d
push 0x20
call fcn.00446b80
mov eax, dword [ebp - 8]
add esp, 0xc
mov dword [ebp - 0x28], eax
xor ebx, ebx
jmp 0x454880
cmp ebx, dword [ebp - 0x28]
jbe 0x454880
push str.Inst_StopService:_Slept_hint_duration_without_any_progress
push 0x20
call fcn.00446b80
push esi
push 0x1e
push str.Inst_StopService:_Not_giving_up_yet_since_havent_slept_for__i_seconds:__d
push 0x20
call fcn.00446b80
add esp, 0x18
cmp esi, 0x7530
jae 0x4548ce
mov eax, dword [ebp - 0x1c]
cmp eax, 3
je 0x4547e0
cmp eax, 1
jne 0x454907
push str.Inst_StopService:_Service_already_stopped
push 0x10
call fcn.00446b80
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push 0x1e
push str.Inst_StopService:_Slept_for__i_seconds__giving_up
push 1
call fcn.00446b80
add esp, 0xc
mov dword [ebp - 0x1c], 1
jmp 0x454899
push str.Inst_StopService:_Could_not_query_service_status__presume_stopped
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
call fcn.00446e90
add esp, 0xc
mov dword [ebp - 0x1c], 1
jmp 0x454899
cmp dword [ebp + 0xc], 0
je 0x454a3b
push str.Inst_StopService:_Stopping_dependents__if_any
push 2
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
call fcn.00446b80
add esp, 8
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
push 0
push 0
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesA]
test eax, eax
je 0x454953
push str.Inst_StopService:_No_dependents_exist
push 0x10
jmp 0x454a42
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x454975
push str.Inst_StopService:_Enumeration_failed_for_unexpected_reason
push eax
push 1
call fcn.00447040
add esp, 0xc
jmp 0x454a4a
push str.Inst_StopService:_Dependents_exist
push 2
call fcn.00446b80
push dword [ebp - 0x28]
call fcn.0047ee60
mov esi, eax
add esp, 0xc
mov dword [ebp - 0x38], esi
test esi, esi
jne 0x4549a1
push str.Inst_StopService:_couldnt_allocate_memory_to_enumerate_dependencies
push 1
jmp 0x454a42
push dword [ebp - 0x28]
push 0
push esi
call fcn.00411960
add esp, 0xc
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
push esi
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesA]
test eax, eax
jne 0x4549e4
push str.Inst_StopService:_Enumeration_failed_for_unexpected_reason
push 0xea
push 1
call fcn.00447040
push esi
call fcn.0047ee40
add esp, 0x10
jmp 0x454a4a
xor ebx, ebx
cmp dword [ebp - 0x2c], ebx
jbe 0x454a30
mov edi, esi
nop dword [eax]
mov esi, dword [edi]
movups xmm0, xmmword [edi + 0x10]
push esi
push ebx
push str.Inst_StopService:_Attempting_to_stop___d__s
push 0x20
movups xmmword [ebp - 0x4c], xmm0
call fcn.00446b80
push 0
push esi
call fcn.004543f0
push esi
push ebx
push str.Inst_StopService:_Done_stopping___d__s
push 0x20
call fcn.00446b80
inc ebx
lea edi, [edi + 0x24]
add esp, 0x28
cmp ebx, dword [ebp - 0x2c]
jb 0x4549f0
mov edi, dword [ebp - 0x34]
mov esi, dword [ebp - 0x38]
push esi
call fcn.0047ee40
add esp, 4
jmp 0x454a4a
push str.Inst_StopService:_Not_told_to_stop_dependents
push 0x20
call fcn.00446b80
add esp, 8
lea eax, [ebp - 0x20]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x454ad0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x454ac4
cmp eax, 0x6d
je 0x454ab8
cmp eax, 0x41b
jne 0x454a85
push str.Inst_StopService:_Service_could_not_be_stopped:_need_to_stop_dependents
push 1
call fcn.00446b80
add esp, 8
jmp 0x454a95
push str.Inst_StopService:_Service_could_not_be_stopped
push eax
push 1
call fcn.00447040
add esp, 0xc
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push str.Inst_StopService:_Broken_pipe__service_may_already_have_stopped
push 1
jmp 0x4548a0
push str.Inst_StopService:_Service_is_already_stopped
push 1
jmp 0x4548a0
push str.Inst_StopService:_Successfully_sent_stop_command
push 0x10
call fcn.00446b80
add esp, 8
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x454786
push dword [ebp - 0xc]
push dword [ebp - 0x1c]
call fcn.00454110
add esp, 4
push eax
push str.Inst_StopService:_service_status:__s_cp0x_08x
push 0x20
call fcn.00446b80
mov eax, dword [ebp - 0xc]
add esp, 0x10
mov dword [ebp - 0x34], eax
xor ebx, ebx
mov eax, dword [ebp - 8]
xor esi, esi
cmp dword [ebp - 0x1c], 3
mov dword [ebp - 0x2c], eax
jne 0x454c10
nop word [eax + eax]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
add ebx, 0x1f4
push eax
push edi
add esi, 0x1f4
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x454bfa
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx - 1]
cmp eax, 6
ja 0x454b6e
mov eax, dword [ecx*4 + 0x4ef458]
jmp 0x454b73
mov eax, dword [str.INVALID]
push dword [ebp - 0xc]
push eax
push str.Inst_StopService:_service_status:__s_cp0x_08x
push 0x20
call fcn.00446b80
mov eax, dword [ebp - 0xc]
add esp, 0x10
cmp eax, dword [ebp - 0x34]
jbe 0x454bad
push dword [ebp - 8]
mov dword [ebp - 0x34], eax
push str.Inst_StopService:_Updating_sleep_hint:__d
push 0x20
call fcn.00446b80
mov eax, dword [ebp - 8]
add esp, 0xc
mov dword [ebp - 0x2c], eax
xor ebx, ebx
jmp 0x454bd6
cmp dword [ebp - 0x1c], 1
je 0x454bd6
cmp ebx, dword [ebp - 0x2c]
jbe 0x454bd6
push str.Inst_StopService:_Slept_hint_duration_without_any_progress
push 0x20
call fcn.00446b80
push esi
push 0x1e
push str.Inst_StopService:_Not_giving_up_yet_since_havent_slept_for__i_seconds:__d
push 0x20
call fcn.00446b80
add esp, 0x18
cmp esi, 0x7530
jae 0x454bea
cmp dword [ebp - 0x1c], 3
je 0x454b30
jmp 0x454c10
push 0x1e
push str.Inst_StopService:_Slept_for__i_seconds__giving_up
push 1
call fcn.00446b80
jmp 0x454c0d
push str.Inst_StopService:_Could_not_query_service_status
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
call fcn.00446e90
add esp, 0xc
cmp dword [ebp - 0x1c], 1
jne 0x454c2e
push str.Inst_StopService:_Service_is_stopped
push 0x10
call fcn.00446b80
add esp, 8
mov dword [ebp - 0x30], 1
jmp 0x454c46
push dword [ebp - 0x1c]
call fcn.00454110
push eax
push str.Inst_StopService:_Service_is_not_stopped:__s
push 1
call fcn.00446b80
add esp, 0x10
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x30]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00401bd5
mov esp, ebp
pop ebp
ret