Function at 0x402bd0
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41ddae
mov eax, dword fs:[0]
push eax
sub esp, 0x2b0
mov eax, dword [0x4251d4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0xd], 0
push 4
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x402c18
xor al, al
jmp 0x4030ce
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 0x10
jb 0x402c2f
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x28c], edx
jmp 0x402c3b
mov eax, dword [ebp + 8]
add eax, 4
mov dword [ebp - 0x28c], eax
push 0xf01ff
mov ecx, dword [ebp - 0x28c]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x402cfd
mov eax, dword [ebp + 8]
push eax
push 0x41f7bc
lea ecx, [ebp - 0x58]
push ecx
call fcn.0040a7c0
add esp, 0xc
mov dword [ebp - 0x290], eax
mov edx, dword [ebp - 0x290]
mov dword [ebp - 0x294], edx
mov dword [ebp - 4], 0
push str.__was_not_registered_as_a_NT_Service
mov eax, dword [ebp - 0x294]
push eax
lea ecx, [ebp - 0x74]
push ecx
call fcn.0040a870
add esp, 0xc
mov dword [ebp - 0x298], eax
mov edx, dword [ebp - 0x298]
mov dword [ebp - 0x29c], edx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x29c]
push eax
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x74]
call fcn.004077c0
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x58]
call fcn.004077c0
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x4030ce
lea edx, [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x402d66
push str.__failed_to_query_service_status
lea ecx, [ebp - 0x90]
call fcn.00406560
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x90]
push ecx
call fcn.00401580
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x90]
call fcn.004077c0
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x4030ce
cmp dword [ebp - 0x34], 1
jne 0x402e25
mov ecx, dword [ebp + 8]
push ecx
push 0x41f76c
lea edx, [ebp - 0xac]
push edx
call fcn.0040a7c0
add esp, 0xc
mov dword [ebp - 0x2a0], eax
mov eax, dword [ebp - 0x2a0]
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 4], 3
push str._has_already_stopped
mov ecx, dword [ebp - 0x2a4]
push ecx
lea edx, [ebp - 0xc8]
push edx
call fcn.0040a870
add esp, 0xc
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp - 0x2a8]
mov dword [ebp - 0x2ac], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x2ac]
push ecx
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0xc8]
call fcn.004077c0
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0xac]
call fcn.004077c0
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x4030ce
mov ecx, dword [ebp + 8]
push ecx
push str.__stopping_:
lea edx, [ebp - 0xe4]
push edx
call fcn.0040a7c0
add esp, 0xc
mov dword [ebp - 0x2b0], eax
mov eax, dword [ebp - 0x2b0]
mov dword [ebp - 0x2b4], eax
mov dword [ebp - 4], 5
mov ecx, dword [ebp - 0x2b4]
push ecx
call fcn.00401580
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0xe4]
call fcn.004077c0
lea edx, [ebp - 0x38]
push edx
push 1
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x402f05
mov ecx, dword [ebp + 8]
push ecx
push str.__Failed_to_stop:
lea edx, [ebp - 0x100]
push edx
call fcn.0040a7c0
add esp, 0xc
mov dword [ebp - 0x2b8], eax
mov eax, dword [ebp - 0x2b8]
mov dword [ebp - 0x2bc], eax
mov dword [ebp - 4], 6
mov ecx, dword [ebp - 0x2bc]
push ecx
call fcn.00401580
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x100]
call fcn.004077c0
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x4030ce
push str.__waiting_for_the_state_change
lea ecx, [ebp - 0x11c]
call fcn.00406560
mov dword [ebp - 4], 7
lea ecx, [ebp - 0x11c]
push ecx
call fcn.00401580
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x11c]
call fcn.004077c0
mov dword [ebp - 0x3c], 0
jmp 0x402f53
mov edx, dword [ebp - 0x3c]
add edx, 1
mov dword [ebp - 0x3c], edx
cmp dword [ebp - 0x3c], 0x1e
jge 0x40307c
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x402fc6
push str.__failed_to_query_service_status_while_waiting_for_the_status_change
lea ecx, [ebp - 0x138]
call fcn.00406560
mov dword [ebp - 4], 8
lea edx, [ebp - 0x138]
push edx
call fcn.00401580
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x138]
call fcn.004077c0
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x4030ce
cmp dword [ebp - 0x34], 1
jne 0x403030
push str.__stopped.
lea ecx, [ebp - 0x154]
call fcn.00406560
mov dword [ebp - 4], 9
lea edx, [ebp - 0x154]
push edx
call fcn.00401580
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x154]
call fcn.004077c0
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
jmp 0x4030ce
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x41f6b4
lea ecx, [ebp - 0x170]
call fcn.00406560
mov dword [ebp - 4], 0xa
lea edx, [ebp - 0x170]
push edx
call fcn.00401580
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x170]
call fcn.004077c0
jmp 0x402f4a
push str.__Failed_to_stop_the_service
lea ecx, [ebp - 0x18c]
call fcn.00406560
mov dword [ebp - 4], 0xb
lea eax, [ebp - 0x18c]
push eax
call fcn.00401580
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x18c]
call fcn.004077c0
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret