Function at 0x1004d1b0
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10227200
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x154
mov eax, dword [0x102db080]
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 - 0xd8], ecx
mov byte [ebp - 0xc9], 0
mov dword [ebp - 0xd4], 0
mov dword [ebp - 0xd0], 0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0xd8]
call fcn.10083220
movzx eax, al
test eax, eax
je 0x1004d23d
push 0x102b0320
lea ecx, [ebp - 0x124]
call fcn.10085150
push 0x102ca5a8
lea ecx, [ebp - 0x124]
push ecx
call sub.VCRUNTIME140.dll__CxxThrowException
mov ecx, dword [ebp - 0xd8]
call fcn.1004d590
mov dword [ebp - 0xe4], eax
cmp dword [ebp - 0xe4], 1
jne 0x1004d25e
mov al, 1
jmp 0x1004d56c
push 1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0xd4], eax
cmp dword [ebp - 0xd4], 0
jne 0x1004d2b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xe8], eax
push 0x102b0338
call fcn.10081d80
push eax
mov edx, dword [ebp - 0xe8]
push edx
lea ecx, [ebp - 0x138]
call fcn.10081d90
push 0x102ca4a8
lea eax, [ebp - 0x138]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push 0x24
mov ecx, dword [ebp - 0xd8]
call fcn.1007dd30
push eax
mov ecx, dword [ebp - 0xd4]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0xd0], eax
cmp dword [ebp - 0xd0], 0
jne 0x1004d32c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xe0], eax
cmp dword [ebp - 0xe0], 0x424
jne 0x1004d2fe
mov byte [ebp - 0xc9], 1
jmp 0x1004d32c
push 0x102b0350
call fcn.10081d80
push eax
mov edx, dword [ebp - 0xe0]
push edx
lea ecx, [ebp - 0x14c]
call fcn.10081d90
push 0x102ca4a8
lea eax, [ebp - 0x14c]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
movzx ecx, byte [ebp - 0xc9]
test ecx, ecx
jne 0x1004d522
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov ecx, eax
mov esi, edx
mov eax, dword [ebp + 8]
cdq
add eax, ecx
adc edx, esi
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x110], edx
xor edx, edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], edx
mov ecx, dword [ebp - 0xd8]
call fcn.1004d590
mov dword [ebp - 0xec], eax
cmp dword [ebp - 0xec], 3
je 0x1004d3db
lea eax, [ebp - 0x30]
push eax
push 1
mov ecx, dword [ebp - 0xd0]
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x1004d3db
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xf0], eax
push str.Failed_to_stop_service
call fcn.10081d80
push eax
mov edx, dword [ebp - 0xf0]
push edx
lea ecx, [ebp - 0x160]
call fcn.10081d90
push 0x102ca4a8
lea eax, [ebp - 0x160]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov dword [ebp - 0xdc], 0
mov ecx, dword [ebp - 0xdc]
mov dword [ebp - 0xf4], ecx
mov edx, dword [ebp - 0xdc]
add edx, 1
mov dword [ebp - 0xdc], edx
cmp dword [ebp - 0xf4], 0
jle 0x1004d411
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0xd0]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x1004d4d7
mov byte [ebp - 0xc9], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xfc], eax
push 0x98
lea ecx, [ebp - 0xc8]
call fcn.1004c4a0
push 1
lea ecx, [ebp - 0xc8]
call fcn.100846c0
mov dword [ebp - 0x118], eax
mov byte [ebp - 4], 1
push str.QueryServiceStatus_failed_:__
lea edx, [ebp - 0xc8]
push edx
call fcn.10082bb0
add esp, 8
mov dword [ebp - 0xf8], eax
mov eax, dword [ebp - 0xf8]
mov dword [ebp - 0x100], eax
mov ecx, dword [ebp - 0xfc]
push ecx
mov ecx, dword [ebp - 0x100]
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 - 0x104], eax
push 0x102b037c
mov edx, dword [ebp - 0x104]
push edx
call fcn.10082bb0
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xc8]
call fcn.10082f70
jmp 0x1004d515
cmp dword [ebp - 0x2c], 1
je 0x1004d515
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x108], edx
mov eax, dword [ebp - 0x108]
cmp eax, dword [ebp - 0x110]
jb 0x1004d3e5
ja 0x1004d515
mov ecx, dword [ebp - 0x10c]
cmp ecx, dword [ebp - 0x114]
jb 0x1004d3e5
cmp dword [ebp - 0x2c], 1
jne 0x1004d522
mov byte [ebp - 0xc9], 1
jmp 0x1004d52a
mov dword [ebp - 4], 0xffffffff
jmp 0x1004d53a
cmp dword [ebp - 0xd0], 0
je 0x1004d550
mov edx, dword [ebp - 0xd0]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0xd4], 0
je 0x1004d566
mov eax, dword [ebp - 0xd4]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, byte [ebp - 0xc9]
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.100b9f43
mov esp, ebp
pop ebp
ret 4