Function at 0x497078
Capabilities:
Check for time delay via gettickcount
Delete service
Query service status
Stop service

Disassembly:
push 0xec
mov eax, 0x54ddcd
call fcn.0053655e
mov esi, ecx
push 1
xor ebx, ebx
lea ecx, [ebp - 0xf8]
push 3
mov dword [ebp - 4], ebx
call fcn.00404da4
push dword [ebp + 8]
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
call fcn.00403913
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0xe8]
push str.Removing_service:
push eax
call fcn.0040446a
pop ecx
pop ecx
push eax
call fcn.0040a098
pop ecx
pop ecx
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.0040257a
lea eax, [ebp - 0xf8]
push eax
push str.ServiceList::remove
push 0x8d
push str.C:workprojects_rubilnik_src_systemServiceList.cpp
push 1
call fcn.00407c20
mov ecx, eax
call fcn.00412039
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], bl
call fcn.00404fea
lea ecx, [ebp - 0x90]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
call fcn.00407c5b
call fcn.0049bcbe
test eax, eax
je 0x497158
push dword [ebp + 8]
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
call fcn.00403913
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 3
push eax
mov ecx, esi
call fcn.004973c8
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], bl
call fcn.0040257a
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x4971b3
push 1
push 3
lea ecx, [ebp - 0xf8]
call fcn.00404da4
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xe8]
push str.OpenSCManager__error
push eax
call fcn.0040446a
pop ecx
pop ecx
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int_]
lea eax, [ebp - 0xf8]
push eax
push str.ServiceList::remove
push 0x97
jmp 0x497230
push dword [ebp + 8]
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
call fcn.00403913
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0xf01ff
cmovae eax, dword [ebp - 0x28]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
lea ecx, [ebp - 0x28]
mov esi, eax
call fcn.0040257a
test esi, esi
jne 0x49725e
push 1
push 3
lea ecx, [ebp - 0xf8]
call fcn.00404da4
mov byte [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xe8]
push str.OpenService__error
push eax
call fcn.0040446a
pop ecx
pop ecx
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int_]
lea eax, [ebp - 0xf8]
push eax
push str.ServiceList::remove
push 0x9f
push str.C:workprojects_rubilnik_src_systemServiceList.cpp
push ebx
call fcn.00407c20
mov ecx, eax
call fcn.00412039
lea ecx, [ebp - 0x90]
call fcn.00404fea
lea ecx, [ebp - 0x90]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
jmp 0x4973b2
lea eax, [ebp - 0x44]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4972b8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x48], eax
jmp 0x4972b0
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x44]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x49732a
cmp dword [ebp - 0x40], 1
je 0x49732a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x48]
cmp eax, 0x2710
ja 0x49732a
cmp dword [ebp - 0x40], 1
jne 0x49727a
jmp 0x49732a
push 1
push 3
lea ecx, [ebp - 0xf8]
call fcn.00404da4
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xe8]
push str.ControlService__error
push eax
call fcn.0040446a
pop ecx
pop ecx
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int_]
lea eax, [ebp - 0xf8]
push eax
push str.ServiceList::remove
push 0xb9
push str.C:workprojects_rubilnik_src_systemServiceList.cpp
push ebx
call fcn.00407c20
mov ecx, eax
call fcn.00412039
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], bl
call fcn.00404fea
lea ecx, [ebp - 0x90]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x4973a4
push 1
push 3
lea ecx, [ebp - 0xf8]
call fcn.00404da4
mov byte [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xe8]
push str.DeleteService__error
push eax
call fcn.0040446a
pop ecx
pop ecx
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int_]
lea eax, [ebp - 0xf8]
push eax
push str.ServiceList::remove
push 0xbf
push str.C:workprojects_rubilnik_src_systemServiceList.cpp
push ebx
call fcn.00407c20
mov ecx, eax
call fcn.00412039
lea ecx, [ebp - 0x90]
call fcn.00404fea
lea ecx, [ebp - 0x90]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov bl, 1
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x4973be
call fcn.00406959
mov al, bl
call fcn.00536508
ret 8