Function at 0x40cd70
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c6c2b
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x7f4
mov eax, dword [0x671330]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x2a0], ecx
mov byte [ebp - 0x291], 0
mov dword [ebp - 0x2a4], 0
mov dword [ebp - 0x29c], 0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x2a0]
call fcn.00416470
movzx eax, al
test eax, eax
je 0x40cdfd
push 0x606e78
lea ecx, [ebp - 0x3fc]
call fcn.00416440
push 0x638098
lea ecx, [ebp - 0x3fc]
push ecx
call sub.VCRUNTIME140.dll__CxxThrowException
mov ecx, dword [ebp - 0x2a0]
call fcn.0040d8e0
mov dword [ebp - 0x3ac], eax
cmp dword [ebp - 0x3ac], 1
jne 0x40cf18
call dword [sym.imp.Dbglog.dll_struct_boost::logging::level::holder_no_ts____cdecl_g_l_filter_void_]
mov dword [ebp - 0x3b0], eax
push 0x7d0
mov ecx, dword [ebp - 0x3b0]
call fcn.0040a130
mov byte [ebp - 0x292], al
movzx edx, byte [ebp - 0x292]
test edx, edx
jne 0x40ce4d
jmp 0x40cf11
call dword [sym.imp.Dbglog.dll_struct_boost::logging::logger_holder_struct_boost::logging::logger_format_write_struct_boost::logging::default___struct_boost::logging::default___struct_boost::logging::writer::threading::ts_write__struct_boost::logging::default___struct_boost::logging::lock_resource_finder::single_thread______cdecl_g_l_void_]
mov dword [ebp - 0x3b4], eax
mov eax, dword [ebp - 0x3b4]
push eax
call fcn.004048b0
add esp, 4
mov dword [ebp - 0x3b8], eax
lea ecx, [ebp - 0x564]
push ecx
mov ecx, dword [ebp - 0x3b8]
call fcn.00402ad0
mov dword [ebp - 0x3bc], eax
mov edx, dword [ebp - 0x3bc]
mov dword [ebp - 0x2bc], edx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x2bc]
call fcn.00402a30
mov dword [ebp - 0x2c0], eax
mov ecx, dword [ebp - 0x2c0]
call fcn.00402d20
mov dword [ebp - 0x2c4], eax
push str.Service
mov eax, dword [ebp - 0x2c4]
push eax
call fcn.00409d00
add esp, 8
mov dword [ebp - 0x2c8], eax
mov ecx, dword [ebp - 0x2a0]
push ecx
mov edx, dword [ebp - 0x2c8]
push edx
call fcn.0040e860
add esp, 8
mov dword [ebp - 0x2cc], eax
push str._is_already_stopped
mov eax, dword [ebp - 0x2cc]
push eax
call fcn.00409d00
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x564]
call fcn.00402a50
mov al, 1
jmp 0x40d8b9
call dword [sym.imp.Dbglog.dll_struct_boost::logging::level::holder_no_ts____cdecl_g_l_filter_void_]
mov dword [ebp - 0x2d0], eax
push 0x7d0
mov ecx, dword [ebp - 0x2d0]
call fcn.0040a130
mov byte [ebp - 0x293], al
movzx ecx, byte [ebp - 0x293]
test ecx, ecx
jne 0x40cf4a
jmp 0x40cff4
call dword [sym.imp.Dbglog.dll_struct_boost::logging::logger_holder_struct_boost::logging::logger_format_write_struct_boost::logging::default___struct_boost::logging::default___struct_boost::logging::writer::threading::ts_write__struct_boost::logging::default___struct_boost::logging::lock_resource_finder::single_thread______cdecl_g_l_void_]
mov dword [ebp - 0x2d4], eax
mov edx, dword [ebp - 0x2d4]
push edx
call fcn.004048b0
add esp, 4
mov dword [ebp - 0x2d8], eax
lea eax, [ebp - 0x60c]
push eax
mov ecx, dword [ebp - 0x2d8]
call fcn.00402ad0
mov dword [ebp - 0x2dc], eax
mov ecx, dword [ebp - 0x2dc]
mov dword [ebp - 0x2e0], ecx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x2e0]
call fcn.00402a30
mov dword [ebp - 0x2e4], eax
mov ecx, dword [ebp - 0x2e4]
call fcn.00402d20
mov dword [ebp - 0x2e8], eax
push str.Stopping_service
mov edx, dword [ebp - 0x2e8]
push edx
call fcn.00409d00
add esp, 8
mov dword [ebp - 0x2ec], eax
mov eax, dword [ebp - 0x2a0]
push eax
mov ecx, dword [ebp - 0x2ec]
push ecx
call fcn.0040e860
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x60c]
call fcn.00402a50
push 0x24
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x2a4], eax
cmp dword [ebp - 0x2a4], 0
jne 0x40d14f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2b0], eax
push 0x98
lea ecx, [ebp - 0x160]
call fcn.004029d0
push 1
push 2
lea ecx, [ebp - 0x160]
call fcn.00416190
mov dword [ebp - 0x3c0], eax
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x2b0]
push edx
lea eax, [ebp - 0x414]
push eax
call fcn.0040c020
add esp, 8
mov dword [ebp - 0x2f0], eax
mov ecx, dword [ebp - 0x2f0]
mov dword [ebp - 0x2fc], ecx
mov byte [ebp - 4], 4
push 0x606ec8
lea edx, [ebp - 0x160]
push edx
call fcn.00414ff0
add esp, 8
mov dword [ebp - 0x2f4], eax
mov eax, dword [ebp - 0x2b0]
push eax
mov ecx, dword [ebp - 0x2f4]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov dword [ebp - 0x2f8], eax
push 0x606ec4
mov ecx, dword [ebp - 0x2f8]
push ecx
call fcn.00414ff0
add esp, 8
mov dword [ebp - 0x300], eax
mov edx, dword [ebp - 0x2fc]
push edx
mov eax, dword [ebp - 0x300]
push eax
call fcn.0040e4e0
add esp, 8
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x414]
call fcn.0040b3b0
lea ecx, [ebp - 0x42c]
push ecx
lea ecx, [ebp - 0x160]
call fcn.00414da0
mov dword [ebp - 0x304], eax
mov edx, dword [ebp - 0x304]
mov dword [ebp - 0x308], edx
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x308]
push eax
lea ecx, [ebp - 0x3d8]
call fcn.0040b380
push 0x638088
lea ecx, [ebp - 0x3d8]
push ecx
call sub.VCRUNTIME140.dll__CxxThrowException
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x42c]
call fcn.0040b3b0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x160]
call fcn.00415390
push 0x24
mov ecx, dword [ebp - 0x2a0]
call fcn.0040bfe0
push eax
mov edx, dword [ebp - 0x2a4]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x29c], eax
cmp dword [ebp - 0x29c], 0
jne 0x40d2d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2a8], eax
cmp dword [ebp - 0x2a8], 0x424
jne 0x40d1a1
mov byte [ebp - 0x291], 1
jmp 0x40d2d1
push 0x98
lea ecx, [ebp - 0x1f8]
call fcn.004029d0
push 1
push 2
lea ecx, [ebp - 0x1f8]
call fcn.00416190
mov dword [ebp - 0x3c4], eax
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x2a8]
push eax
lea ecx, [ebp - 0x444]
push ecx
call fcn.0040c020
add esp, 8
mov dword [ebp - 0x30c], eax
mov edx, dword [ebp - 0x30c]
mov dword [ebp - 0x318], edx
mov byte [ebp - 4], 7
push 0x606ee4
lea eax, [ebp - 0x1f8]
push eax
call fcn.00414ff0
add esp, 8
mov dword [ebp - 0x310], eax
mov ecx, dword [ebp - 0x2a8]
push ecx
mov ecx, dword [ebp - 0x310]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov dword [ebp - 0x314], eax
push 0x606ee0
mov edx, dword [ebp - 0x314]
push edx
call fcn.00414ff0
add esp, 8
mov dword [ebp - 0x31c], eax
mov eax, dword [ebp - 0x318]
push eax
mov ecx, dword [ebp - 0x31c]
push ecx
call fcn.0040e4e0
add esp, 8
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x444]
call fcn.0040b3b0
lea edx, [ebp - 0x45c]
push edx
lea ecx, [ebp - 0x1f8]
call fcn.00414da0
mov dword [ebp - 0x320], eax
mov eax, dword [ebp - 0x320]
mov dword [ebp - 0x324], eax
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x324]
push ecx
lea ecx, [ebp - 0x3e4]
call fcn.0040b380
push 0x638088
lea edx, [ebp - 0x3e4]
push edx
call sub.VCRUNTIME140.dll__CxxThrowException
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x45c]
call fcn.0040b3b0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1f8]
call fcn.00415390
movzx eax, byte [ebp - 0x291]
test eax, eax
jne 0x40d7a1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, dword [ebp + 8]
mov dword [ebp - 0x344], eax
mov dword [ebp - 0x30], 0
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
lea edx, [ebp - 0x30]
push edx
push 1
mov eax, dword [ebp - 0x29c]
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40d461
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2b4], eax
push 0x98
lea ecx, [ebp - 0x290]
call fcn.004029d0
push 1
push 2
lea ecx, [ebp - 0x290]
call fcn.00416190
mov dword [ebp - 0x3c8], eax
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x2b4]
push ecx
lea edx, [ebp - 0x474]
push edx
call fcn.0040c020
add esp, 8
mov dword [ebp - 0x328], eax
mov eax, dword [ebp - 0x328]
mov dword [ebp - 0x334], eax
mov byte [ebp - 4], 0xa
push str.Failed_to_stop_service:__
lea ecx, [ebp - 0x290]
push ecx
call fcn.00414ff0
add esp, 8
mov dword [ebp - 0x32c], eax
mov edx, dword [ebp - 0x2b4]
push edx
mov ecx, dword [ebp - 0x32c]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov dword [ebp - 0x330], eax
push 0x606efc
mov eax, dword [ebp - 0x330]
push eax
call fcn.00414ff0
add esp, 8
mov dword [ebp - 0x338], eax
mov ecx, dword [ebp - 0x334]
push ecx
mov edx, dword [ebp - 0x338]
push edx
call fcn.0040e4e0
add esp, 8
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x474]
call fcn.0040b3b0
lea eax, [ebp - 0x48c]
push eax
lea ecx, [ebp - 0x290]
call fcn.00414da0
mov dword [ebp - 0x33c], eax
mov ecx, dword [ebp - 0x33c]
mov dword [ebp - 0x340], ecx
mov byte [ebp - 4], 0xb
mov edx, dword [ebp - 0x340]
push edx
lea ecx, [ebp - 0x3f0]
call fcn.0040b380
push 0x638088
lea eax, [ebp - 0x3f0]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x48c]
call fcn.0040b3b0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x290]
call fcn.00415390
cmp dword [ebp - 0x2c], 1
je 0x40d6b5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, dword [ebp - 0x344]
jae 0x40d6b5
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x29c]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40d6b0
mov byte [ebp - 0x291], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2b8], eax
push 0x98
lea ecx, [ebp - 0xc8]
call fcn.004029d0
push 1
push 2
lea ecx, [ebp - 0xc8]
call fcn.00416190
mov dword [ebp - 0x3cc], eax
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x2b8]
push eax
lea ecx, [ebp - 0x4a4]
push ecx
call fcn.0040c020
add esp, 8
mov dword [ebp - 0x348], eax
mov edx, dword [ebp - 0x348]
mov dword [ebp - 0x354], edx
mov byte [ebp - 4], 0xd
push str.QueryServiceStatus_failed_:__
lea eax, [ebp - 0xc8]
push eax
call fcn.00414ff0
add esp, 8
mov dword [ebp - 0x34c], eax
mov ecx, dword [ebp - 0x2b8]
push ecx
mov ecx, dword [ebp - 0x34c]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov dword [ebp - 0x350], eax
push 0x606f1c
mov edx, dword [ebp - 0x350]
push edx
call fcn.00414ff0
add esp, 8
mov dword [ebp - 0x358], eax
mov eax, dword [ebp - 0x354]
push eax
mov ecx, dword [ebp - 0x358]
push ecx
call fcn.0040e4e0
add esp, 8
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x4a4]
call fcn.0040b3b0
call dword [sym.imp.Dbglog.dll_struct_boost::logging::level::holder_no_ts____cdecl_g_l_filter_void_]
mov dword [ebp - 0x35c], eax
push 0xfa0
mov ecx, dword [ebp - 0x35c]
call fcn.0040a130
mov byte [ebp - 0x294], al
movzx edx, byte [ebp - 0x294]
test edx, edx
jne 0x40d5aa
jmp 0x40d690
lea eax, [ebp - 0x4bc]
push eax
lea ecx, [ebp - 0xc8]
call fcn.00414da0
mov dword [ebp - 0x360], eax
mov ecx, dword [ebp - 0x360]
mov dword [ebp - 0x37c], ecx
mov byte [ebp - 4], 0xe
call dword [sym.imp.Dbglog.dll_struct_boost::logging::logger_holder_struct_boost::logging::logger_format_write_struct_boost::logging::default___struct_boost::logging::default___struct_boost::logging::writer::threading::ts_write__struct_boost::logging::default___struct_boost::logging::lock_resource_finder::single_thread______cdecl_g_l_void_]
mov dword [ebp - 0x364], eax
mov edx, dword [ebp - 0x364]
push edx
call fcn.004048b0
add esp, 4
mov dword [ebp - 0x368], eax
lea eax, [ebp - 0x6b4]
push eax
mov ecx, dword [ebp - 0x368]
call fcn.00402ad0
mov dword [ebp - 0x36c], eax
mov ecx, dword [ebp - 0x36c]
mov dword [ebp - 0x370], ecx
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x370]
call fcn.00402a30
mov dword [ebp - 0x374], eax
mov ecx, dword [ebp - 0x374]
call fcn.00402d20
mov dword [ebp - 0x378], eax
push 0x606f40
mov edx, dword [ebp - 0x378]
push edx
call fcn.00409d00
add esp, 8
mov dword [ebp - 0x380], eax
mov ecx, dword [ebp - 0x37c]
call fcn.0040beb0
push eax
mov eax, dword [ebp - 0x380]
push eax
call fcn.00409d00
add esp, 8
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x6b4]
call fcn.00402a50
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x4bc]
call fcn.0040b3b0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xc8]
call fcn.00415390
jmp 0x40d6b5
jmp 0x40d461
cmp dword [ebp - 0x2c], 1
jne 0x40d6c7
mov byte [ebp - 0x291], 1
jmp 0x40d7a1
call dword [sym.imp.Dbglog.dll_struct_boost::logging::level::holder_no_ts____cdecl_g_l_filter_void_]
mov dword [ebp - 0x384], eax
push 0xfa0
mov ecx, dword [ebp - 0x384]
call fcn.0040a130
mov byte [ebp - 0x295], al
movzx ecx, byte [ebp - 0x295]
test ecx, ecx
jne 0x40d6f9
jmp 0x40d7a1
call dword [sym.imp.Dbglog.dll_struct_boost::logging::logger_holder_struct_boost::logging::logger_format_write_struct_boost::logging::default___struct_boost::logging::default___struct_boost::logging::writer::threading::ts_write__struct_boost::logging::default___struct_boost::logging::lock_resource_finder::single_thread______cdecl_g_l_void_]
mov dword [ebp - 0x388], eax
mov edx, dword [ebp - 0x388]
push edx
call fcn.004048b0
add esp, 4
mov dword [ebp - 0x38c], eax
lea eax, [ebp - 0x75c]
push eax
mov ecx, dword [ebp - 0x38c]
call fcn.00402ad0
mov dword [ebp - 0x390], eax
mov ecx, dword [ebp - 0x390]
mov dword [ebp - 0x394], ecx
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x394]
call fcn.00402a30
mov dword [ebp - 0x398], eax
mov ecx, dword [ebp - 0x398]
call fcn.00402d20
mov dword [ebp - 0x39c], eax
push 0x606f68
mov edx, dword [ebp - 0x39c]
push edx
call fcn.00409d00
add esp, 8
mov dword [ebp - 0x3a0], eax
push str.Service_did_not_stop_in_time
mov eax, dword [ebp - 0x3a0]
push eax
call fcn.00409d00
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x75c]
call fcn.00402a50
jmp 0x40d877
mov dword [ebp - 4], 0xffffffff
jmp 0x40d887
cmp dword [ebp - 0x29c], 0
je 0x40d89d
mov eax, dword [ebp - 0x29c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x2a4], 0
je 0x40d8b3
mov ecx, dword [ebp - 0x2a4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, byte [ebp - 0x291]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00544286
mov esp, ebp
pop ebp
ret 4