Function at 0x407240
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x5c7004]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [ebx + 8]
push 0x20
push dword [eax + 4]
call sym.ProcessHacker.exe_PhOpenService
mov esi, eax
test esi, esi
je 0x4072a9
lea eax, [esp + 0x18]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
test eax, eax
je 0x4072a3
mov bl, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4072be
movzx esi, si
or esi, 0xc0070000
mov eax, dword [ebx + 8]
push dword [eax + 4]
push str.Unable_to_stop
call sym.ProcessHacker.exe_PhConcatStrings2
push eax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
lea ecx, ds:[esp + 0x13]
push ecx
push esi
mov edx, dword [eax + 4]
mov ecx, edi
call fcn.00401700
test al, al
je 0x40743b
xor al, al
cmp byte [esp + 0x13], al
je 0x407503
mov ecx, dword [ebx + 8]
mov edx, 4
mov ecx, dword [ecx + 4]
call fcn.0045bf40
mov esi, eax
test esi, esi
js 0x40732c
mov bl, 1
call sym.ProcessHacker.exe__PhUiDisconnectFromPhSvc_0
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 8
mov eax, dword ds:[ebx + 8]
push dword [eax + 4]
push str.stop
push str.Unable_to__s__s.
call fcn.004015a0
add esp, 0xc
mov ebx, dword [eax + 4]
cmp esi, 0xc0000022
je 0x40736e
cmp esi, 0xc0000005
je 0x40736e
mov eax, esi
and eax, 0xfff0000
cmp eax, 0x70000
jne 0x40737c
movzx eax, si
jmp 0x407378
push esi
lfence
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
test eax, eax
jne 0x407387
push esi
lfence
call sym.ProcessHacker.exe_PhGetNtMessage
jmp 0x407390
push eax
lfence
call sym.ProcessHacker.exe_PhGetWin32Message
mov esi, eax
test esi, esi
je 0x4073fb
lfence
lfence
push dword [esi + 4]
push 0x5634d8
test ebx, ebx
je 0x4073bb
push ebx
push 0xfffe
push 0x20
push edi
call sym.ProcessHacker.exe_PhShowMessage2
add esp, 0x18
jmp 0x4073c8
push 0x10
push edi
call sym.ProcessHacker.exe_PhShowMessage
add esp, 0x10
lea ecx, [esi - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x40741c
lfence
call fcn.004c1f60
xor bl, bl
call sym.ProcessHacker.exe__PhUiDisconnectFromPhSvc_0
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 8
test ebx, ebx
je 0x407407
push ebx
push 0x5981b0
jmp 0x407411
push str.Unable_to_perform_the_operation.
push 0x5634d8
push 0x10
push edi
call sym.ProcessHacker.exe_PhShowMessage
add esp, 0x10
xor bl, bl
call sym.ProcessHacker.exe__PhUiDisconnectFromPhSvc_0
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 8]
push dword [eax + 4]
push str.stop
push str.Unable_to__s__s.
call fcn.004015a0
add esp, 0xc
mov ebx, dword [eax + 4]
cmp esi, 0xc0000022
je 0x40747b
mov edi, edi
cmp esi, 0xc0000005
je 0x40747b
mov eax, esi
and eax, 0xfff0000
cmp eax, 0x70000
jne 0x40748a
movzx eax, si
jmp 0x407486
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
test eax, eax
jne 0x407492
push esi
call sym.ProcessHacker.exe_PhGetNtMessage
jmp 0x407498
push eax
call sym.ProcessHacker.exe_PhGetWin32Message
mov esi, eax
test esi, esi
je 0x4074de
mov eax, dword [esi + 4]
push eax
push 0x5634d8
test ebx, ebx
je 0x4074be
push ebx
push 0xfffe
push 0x20
push edi
call sym.ProcessHacker.exe_PhShowMessage2
add esp, 0x18
jmp 0x4074c9
push 0x10
push edi
call sym.ProcessHacker.exe_PhShowMessage
add esp, 0x10
lea ecx, [esi - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x407501
call fcn.004c1f60
jmp 0x407501
mov edi, edi
test ebx, ebx
je 0x4074ec
push ebx
push 0x5981b0
jmp 0x4074f6
push str.Unable_to_perform_the_operation.
push 0x5634d8
push 0x10
push edi
call sym.ProcessHacker.exe_PhShowMessage
add esp, 0x10
xor al, al
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 8