Function at 0x431520
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 0x4317a6
mov ebx, dword [ebp + 8]
lea eax, [ebp + 4]
sub eax, 4
push ebx
push eax
call fcn.00420e40
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 0x4317a6
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 0x4315ba
push ebx
push str.failed_query_service_status__s:__m
push 0x550003
call fcn.004241a0
add esp, 0xc
test eax, eax
jne 0x43175f
mov eax, dword [ebp - 0x28]
cmp eax, 1
jne 0x4315dc
push ebx
push str.service__s_already_stopped
push 0x550005
call fcn.004241a0
add esp, 0xc
xor esi, esi
jmp 0x43175f
mov ebx, dword [ebp - 0x18]
xor esi, esi
push edi
xor edi, edi
cmp eax, 3
jne 0x431640
nop dword [eax]
cmp edi, 0xea60
jge 0x431640
cmp esi, dword [ebp - 4]
jge 0x431640
push dword [ebp + 8]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 0xc]
call fcn.004314d0
add esp, 0xc
test eax, eax
jne 0x431750
cmp dword [ebp - 0x28], 1
je 0x431693
mov eax, dword [ebp - 0x18]
cmp eax, ebx
jbe 0x431628
xor edi, edi
mov ebx, eax
push 0
push 0x64
call fcn.00425c60
add esp, 8
add edi, 0x64
add esi, 0x64
cmp dword [ebp - 0x28], 3
je 0x4315f0
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 0x4316b9
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov eax, dword [eax + 0x28f0]
test eax, eax
jne 0x431673
call fcn.005414b2
cmp dword [eax], 0x6d
je 0x4316b9
mov ebx, dword [ebp + 8]
push ebx
push str.ControlService_failed_for__s:__m
push 0x550003
call fcn.004241a0
add esp, 0xc
jmp 0x43175b
cmp dword [0x601c94], 6
mov ebx, dword [ebp + 8]
jl 0x4316b2
push ebx
push str.service__s__stopped_successfully
push 0x550006
call fcn.004241a0
add esp, 0xc
xor esi, esi
jmp 0x43175e
mov eax, dword [ebp - 0x28]
xor edi, edi
cmp eax, 1
je 0x431737
cmp edi, 0xea60
jge 0x431732
cmp esi, dword [ebp - 4]
jge 0x431732
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 0x43170b
push dword [ebp + 8]
push str.failed_query_service_status__s:__m
push 0x550003
call fcn.004241a0
add esp, 0xc
test eax, eax
jne 0x431758
mov eax, dword [ebp - 0x18]
cmp eax, ebx
jbe 0x431716
xor edi, edi
mov ebx, eax
push 0
push 0x64
add edi, 0x64
add esi, 0x64
call fcn.00425c60
mov eax, dword [ebp - 0x28]
add esp, 8
cmp eax, 1
jne 0x4316c3
jmp 0x431737
cmp eax, 1
jne 0x431758
push str.service_stopped_successfully
push 0x550005
call fcn.004241a0
mov ebx, dword [ebp + 8]
add esp, 8
xor esi, esi
jmp 0x43175e
mov ebx, dword [ebp + 8]
or esi, 0xffffffff
jmp 0x43175e
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 0x431787
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.004241a0
add esp, 8
test esi, esi
je 0x43179e
push ebx
push str.error_stopping_service__s
push 0x550003
call fcn.004241a0
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