Function at 0x408480
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4448e0
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x454670]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
jne 0x4084be
xor eax, eax
jmp 0x4088a7
mov eax, 0xf
mov dword [ebp - 0x90], ebx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
push 0xe
push str.StopNTService_
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x58], ebx
mov byte [ebp - 0x68], 0
call fcn.00401253
mov eax, esi
mov byte [ebp - 4], 1
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084f7
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x68]
call fcn.0040181b
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x30]
push str.___u_:
push ecx
call fcn.0041b190
lea eax, [ebp - 0x30]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408525
sub eax, edx
push eax
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x68]
call fcn.0040181b
push 0x20000
push str.ServicesActive
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x98], eax
cmp eax, ebx
jne 0x4085d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x68]
mov edi, 0x10
cmp dword [ebp - 0x54], edi
jae 0x40856c
lea edx, [ebp - 0x68]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408571
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x4c]
call fcn.00401253
push 0x20
push str.OpenSCManager_FAILED_with_ErrNo
lea ecx, [ebp - 0x4c]
call fcn.0040181b
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085a0
sub eax, edx
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x4c]
call fcn.0040181b
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x38], edi
jae 0x4085c1
lea eax, [ebp - 0x4c]
push ebx
push eax
push str.UtlSvrHelp
call fcn.00401875
add esp, 0xc
jmp 0x408868
push 0x20020
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x94], eax
cmp eax, ebx
jne 0x40868e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x30]
push 0x44b058
push ecx
call fcn.0041b190
mov edx, dword [ebp - 0x68]
mov ebx, 0x10
add esp, 0xc
cmp dword [ebp - 0x54], ebx
jae 0x408618
lea edx, [ebp - 0x68]
mov eax, edx
lea edi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408620
sub eax, edi
push eax
push edx
lea ecx, [ebp - 0x4c]
call fcn.00401253
push 0xc
push str.OpenService_
lea ecx, [ebp - 0x4c]
call fcn.0040181b
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408647
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x4c]
call fcn.0040181b
push 0x14
push str.__FAILED_with_ErrNo
lea ecx, [ebp - 0x4c]
call fcn.0040181b
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408670
sub eax, edx
push eax
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x4c]
call fcn.0040181b
cmp dword [ebp - 0x38], ebx
jmp 0x408834
lea ecx, [ebp - 0x84]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x408760
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
lea edx, [ebp - 0x30]
push 0x44b058
push edx
call fcn.0041b190
mov edx, dword [ebp - 0x68]
add esp, 0xc
cmp dword [ebp - 0x54], 0x10
jae 0x4086cc
lea edx, [ebp - 0x68]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086d1
sub eax, edi
push eax
push edx
lea ecx, [ebp - 0x4c]
call fcn.00401253
push 0x14
push str.ControlService_stop
lea ecx, [ebp - 0x4c]
call fcn.0040181b
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086f8
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x4c]
call fcn.0040181b
push 0x14
push str.__FAILED_with_ErrNo
lea ecx, [ebp - 0x4c]
call fcn.0040181b
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408720
sub eax, edx
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x4c]
call fcn.0040181b
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x408742
lea eax, [ebp - 0x4c]
push 0
push eax
push str.UtlSvrHelp
call fcn.00401875
add esp, 0xc
cmp ebx, 0x425
jne 0x40884c
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
je 0x40884c
lea ecx, [ebp - 0x88]
push ecx
xor edi, edi
push esi
mov dword [ebp - 0x88], edi
mov dword [ebp - 0x8c], edi
call fcn.004014b5
add esp, 8
test eax, eax
je 0x408809
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 1
cmp dword [ebp - 0x88], eax
je 0x4087c2
add edi, eax
cmp edi, 0x12c
ja 0x4087d6
push 0x64
call ebx
lea edx, [ebp - 0x88]
push edx
push esi
call fcn.004014b5
add esp, 8
test eax, eax
jne 0x408791
jmp 0x4087ce
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x90], eax
cmp edi, 0x12c
jbe 0x408800
cmp dword [ebp - 0x54], 0x10
mov eax, dword [ebp - 0x68]
jae 0x4087e2
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x4c]
call fcn.0040134d
push 0xa
push str._time_out.
lea ecx, [ebp - 0x4c]
call fcn.0040181b
cmp dword [ebp - 0x38], 0x10
jmp 0x408834
cmp dword [ebp - 0x8c], 0
jne 0x40884c
mov eax, dword [ebp - 0x68]
mov esi, 0x10
cmp dword [ebp - 0x54], esi
jae 0x408819
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x4c]
call fcn.0040134d
push 0x18
push str._GetServiceState_FAILED.
lea ecx, [ebp - 0x4c]
call fcn.0040181b
cmp dword [ebp - 0x38], esi
mov eax, dword [ebp - 0x4c]
jae 0x40883c
lea eax, [ebp - 0x4c]
push 0
push eax
push str.UtlSvrHelp
call fcn.00401875
add esp, 0xc
mov eax, dword [ebp - 0x98]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
mov eax, dword [ebp - 0x94]
test eax, eax
je 0x408868
push eax
call esi
mov esi, 0x10
cmp dword [ebp - 0x54], esi
jb 0x40887e
mov ecx, dword [ebp - 0x68]
push ecx
call fcn.0041a6fe
add esp, 4
mov dword [ebp - 0x54], 0xf
mov dword [ebp - 0x58], 0
mov byte [ebp - 0x68], 0
cmp dword [ebp - 0x38], esi
jb 0x4088a1
mov edx, dword [ebp - 0x4c]
push edx
call fcn.0041a6fe
add esp, 4
mov eax, dword [ebp - 0x90]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041b181
mov esp, ebp
pop ebp
ret