Function at 0x217e975
Capabilities:
Stop service
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
mov eax, dword [ebp + 0x14]
push esi
push edi
mov esi, ecx
mov edi, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov dword [eax], ecx
cmp dword [edi + 0x24], ecx
je 0x217e99c
test byte [edi + 0x2c], 0x10
jne 0x217ed5a
push edi
lea eax, [ebp - 8]
push eax
mov ecx, esi
call fcn.02174fb0
cmp eax, 1
jne 0x217e9be
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
mov eax, dword [ebp - 8]
jmp 0x217ed95
mov ecx, dword [edi + 0x58]
xor ebx, ebx
test ecx, ecx
je 0x217ea0d
lea eax, [edi + 0x60]
push eax
push ecx
push dword [edi + 0x28]
push dword [edi + 0xc]
call fcn.02180120
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x217ea0d
cmp dword [edi + 0x44], ebx
jne 0x217ea0d
cmp dword [edi + 0x48], 1
jne 0x217ea0d
mov eax, dword [edi + 0x60]
mov ecx, dword [edi + 0x80]
mov dword [ecx], eax
xor eax, eax
mov edx, dword [edi + 0x84]
mov dword [edx], ebx
mov dword [edi + 0x7c], 1
mov dword [edi + 0x60], ebx
jmp 0x217ed95
test byte [edi + 0x2c], 4
je 0x217ed54
xor eax, eax
mov dword [ebp - 0x14], eax
cmp dword [esi + 0x28], eax
jne 0x217ea3e
cmp dword [esi + 0x30], eax
jne 0x217ea3e
cmp dword [edi + 0x14], eax
je 0x217ea35
mov eax, 0x80070005
jmp 0x217ed95
mov eax, dword [edi + 0xc]
add eax, 0x1c
mov dword [ebp - 0x14], eax
xor ebx, ebx
mov ecx, dword [esi + 0x44]
push ebx
push dword [ebp + 0xc]
push dword [edi + 0x28]
push dword [ebp - 0x14]
call fcn.02181bbc
mov dword [ebp - 4], eax
cmp eax, ebx
jne 0x217ea79
cmp dword [esi + 0x14], ebx
jne 0x217ea79
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
call fcn.0217f0ef
test eax, eax
mov eax, 1
jge 0x217ea74
xor eax, eax
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
xor eax, eax
cmp dword [ebp - 4], eax
jne 0x217ed4a
lea edx, [esi + 0x14]
cmp dword [edx], eax
jne 0x217ea96
mov ecx, dword [ebp + 0x18]
cmp dword [ecx], eax
je 0x217ed4a
mov ecx, dword [ebp + 0x18]
cmp dword [ecx], 0
je 0x217eab1
cmp dword [esi + 0x28], 0
jne 0x217eab1
mov eax, dword [0x218c85c]
add eax, 0x58
mov dword [ebp - 0x20], eax
jmp 0x217eab4
mov dword [ebp - 0x20], edx
lea ecx, [ebp - 0x28]
xor ebx, ebx
push dword [ebp - 0x20]
call fcn.0218017d
push esi
lea ecx, [ebp - 0x38]
call fcn.021731f4
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0xc], ebx
cmp dword [ebp - 0x10], ebx
je 0x217eae4
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x1c], eax
mov dword [ebp - 0x10], ebx
push 0
mov ecx, dword [esi + 0x44]
push dword [ebp + 0xc]
push dword [edi + 0x28]
push dword [ebp - 0x14]
call fcn.02181bbc
mov dword [ebp - 4], eax
test eax, eax
jne 0x217ed04
push edi
mov ecx, esi
call fcn.02175a29
test eax, eax
jge 0x217eb1a
mov dword [ebp - 0xc], 0x80070005
jmp 0x217ed04
cmp dword [esi + 0x28], 0
jne 0x217ec15
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x34], 0
cmp dword [ecx], 0
je 0x217ebde
lea eax, [ebp - 0x34]
mov ecx, dword [0x218c85c]
push dword [ebp + 0xc]
push dword [esi + 0x20]
push dword [edi + 0x28]
push eax
push dword [ebp - 0x14]
call fcn.0217f95b
test eax, eax
je 0x217ebde
mov dword [ebp - 4], 0
cmp dword [edi + 0x14], 0
jne 0x217eb6e
push 0
call sub.RPCRT4.dll_RpcImpersonateClient
lea eax, [ebp - 0x30]
lea ecx, [esi + 4]
push eax
mov edx, dword [ebp + 0xc]
push ecx
push dword [edi + 0x40]
push dword [edi + 0x3c]
push dword [edi + 0x38]
push dword [edx]
call fcn.02181e60
cmp dword [edi + 0x14], 0
mov dword [ebp - 0x24], eax
jne 0x217eb97
call sub.RPCRT4.dll_RpcRevertToSelf
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x34]
call fcn.02174d79
cmp dword [ebp - 0x24], 0
jl 0x217ebba
cmp dword [ebp - 0x30], 0
jne 0x217ebba
mov dword [ebp - 4], 1
jmp 0x217ed04
cmp dword [ebp - 0x24], 0x80080008
je 0x217ebd4
cmp dword [ebp - 0x30], 0
jne 0x217ebd4
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0xc], eax
jmp 0x217ed04
push dword [ebp + 0xc]
mov ecx, esi
call fcn.0217f1ab
cmp dword [ebp - 4], 0
jne 0x217ec3e
mov ecx, dword [ebp + 0x18]
lea edx, [ebp - 0x1c]
push dword [ecx]
push dword [esi + 0x1c]
push dword [esi + 0x30]
push dword [esi + 0x34]
push edx
push dword [edi + 0x34]
lea edx, [esi + 4]
mov eax, dword [ebp - 0x20]
push dword [edi + 0x30]
push dword [edi + 0x28]
push dword [edi + 0xc]
push dword [esi + 0x20]
push edx
mov ecx, dword [eax]
call fcn.02180198
jmp 0x217ec31
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x2c]
push eax
mov edx, dword [ebp - 0x20]
push ecx
lea ecx, [esi + 4]
push dword [esi + 0x2c]
push dword [edi + 0xc]
push ecx
mov ecx, dword [edx]
call fcn.0217f1cf
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x217ecfd
mov eax, dword [ebp + 0x10]
mov dword [eax], 1
push 0x15f90
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x217eca8
cmp dword [esi + 0x28], 0
je 0x217ec90
lea eax, [ebp - 0x54]
push eax
push 4
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x217eca3
mov eax, dword [ebp - 0x50]
cmp eax, 2
je 0x217ec47
cmp eax, 4
je 0x217ec9d
cmp eax, 5
je 0x217ec47
cmp eax, 6
jb 0x217eca8
cmp eax, 7
jbe 0x217ec9d
jmp 0x217eca8
push 0
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x217eca8
cmp dword [ebp - 0x2c], 0
jne 0x217eca8
mov ebx, 1
test ebx, ebx
je 0x217ecbb
lea eax, [ebp - 0x54]
push eax
push 1
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_ControlService]
cmp dword [ebp - 0x1c], 0
je 0x217ecca
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], 0
je 0x217ecd9
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0
mov ecx, dword [esi + 0x44]
push dword [ebp + 0xc]
push dword [edi + 0x28]
push dword [ebp - 0x14]
call fcn.02181bbc
mov dword [ebp - 4], eax
test eax, eax
jne 0x217ed04
push edi
lea eax, [esi + 4]
push eax
call fcn.0217e90e
mov dword [ebp - 0xc], 0x80080005
cmp dword [ebp - 0x10], 0
je 0x217ed1b
push dword [ebp - 0x10]
push 0
push dword [0x218cb30]
call dword [0x218cb38]
cmp dword [ebp - 0xc], 0
jge 0x217ed3b
cmp dword [ebp - 4], 0
jne 0x217ed3b
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0xc]
jmp 0x217ed95
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 4], 0
je 0x217ed54
xor eax, eax
jmp 0x217ed95
test byte [edi + 0x2c], 0x10
je 0x217ed90
push edi
lea eax, [ebp - 8]
push eax
mov ecx, esi
call fcn.0217ed9e
test eax, eax
jne 0x217ed82
mov eax, dword [edi + 0x2c]
sub eax, 0x10
cmp eax, 1
sbb eax, eax
and eax, 0xfffc3ebf
sub eax, 0x7ffbfeac
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
mov eax, dword [ebp - 8]
jmp 0x217ed95
mov eax, 0x80040154
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14