Function at 0x431570
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [ebp + 0xc]
mov ecx, 0x1d4c0
push ebx
push esi
or esi, 0xffffffff
test eax, eax
cmovne ecx, eax
cmp dword [0x5fdc84], 0
mov dword [ebp - 4], ecx
je 0x4317f6
mov ebx, dword [ebp + 8]
lea eax, [ebp + 4]
sub eax, 4
push ebx
push eax
call fcn.00420ea0
add esp, 8
push 0x2c
push dword [eax]
push dword [0x5fdc84]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.0053b3a0
add esp, 4
mov dword [ebp + 0xc], eax
test eax, eax
je 0x4317f6
lea ecx, [ebp - 8]
push ecx
push 0x24
lea ecx, [ebp - 0x2c]
push ecx
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
push eax
call fcn.0053b370
add esp, 4
test eax, eax
jne 0x43160a
push ebx
push str.failed_query_service_status__s:__m
push 0x550003
call fcn.00424200
add esp, 0xc
test eax, eax
jne 0x4317af
mov eax, dword [ebp - 0x28]
cmp eax, 1
jne 0x43162c
push ebx
push str.service__s_already_stopped
push 0x550005
call fcn.00424200
add esp, 0xc
xor esi, esi
jmp 0x4317af
mov ebx, dword [ebp - 0x18]
xor esi, esi
push edi
xor edi, edi
cmp eax, 3
jne 0x431690
nop dword [eax]
cmp edi, 0xea60
jge 0x431690
cmp esi, dword [ebp - 4]
jge 0x431690
push dword [ebp + 8]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 0xc]
call fcn.00431520
add esp, 0xc
test eax, eax
jne 0x4317a0
cmp dword [ebp - 0x28], 1
je 0x4316e3
mov eax, dword [ebp - 0x18]
cmp eax, ebx
jbe 0x431678
xor edi, edi
mov ebx, eax
push 0
push 0x64
call fcn.00425cc0
add esp, 8
add edi, 0x64
add esi, 0x64
cmp dword [ebp - 0x28], 3
je 0x431640
lea eax, [ebp - 0x2c]
push eax
push 1
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_ControlService]
push eax
call fcn.0053b370
add esp, 4
test eax, eax
jne 0x431709
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov eax, dword [eax + 0x28f0]
test eax, eax
jne 0x4316c3
call fcn.005414b2
cmp dword [eax], 0x6d
je 0x431709
mov ebx, dword [ebp + 8]
push ebx
push str.ControlService_failed_for__s:__m
push 0x550003
call fcn.00424200
add esp, 0xc
jmp 0x4317ab
cmp dword [0x601c94], 6
mov ebx, dword [ebp + 8]
jl 0x431702
push ebx
push str.service__s__stopped_successfully
push 0x550006
call fcn.00424200
add esp, 0xc
xor esi, esi
jmp 0x4317ae
mov eax, dword [ebp - 0x28]
xor edi, edi
cmp eax, 1
je 0x431787
cmp edi, 0xea60
jge 0x431782
cmp esi, dword [ebp - 4]
jge 0x431782
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
push eax
call fcn.0053b370
add esp, 4
test eax, eax
jne 0x43175b
push dword [ebp + 8]
push str.failed_query_service_status__s:__m
push 0x550003
call fcn.00424200
add esp, 0xc
test eax, eax
jne 0x4317a8
mov eax, dword [ebp - 0x18]
cmp eax, ebx
jbe 0x431766
xor edi, edi
mov ebx, eax
push 0
push 0x64
add edi, 0x64
add esi, 0x64
call fcn.00425cc0
mov eax, dword [ebp - 0x28]
add esp, 8
cmp eax, 1
jne 0x431713
jmp 0x431787
cmp eax, 1
jne 0x4317a8
push str.service_stopped_successfully
push 0x550005
call fcn.00424200
mov ebx, dword [ebp + 8]
add esp, 8
xor esi, esi
jmp 0x4317ae
mov ebx, dword [ebp + 8]
or esi, 0xffffffff
jmp 0x4317ae
mov ebx, dword [ebp + 8]
or esi, 0xffffffff
pop edi
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.0053b370
add esp, 4
test eax, eax
jne 0x4317d7
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00424200
add esp, 8
test esi, esi
je 0x4317ee
push ebx
push str.error_stopping_service__s
push 0x550003
call fcn.00424200
add esp, 0xc
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret