Function at 0x406200
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x444966
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x455670]
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 edi, edi
cmp esi, edi
je 0x4069bb
mov eax, 0xf
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x13c], edi
mov byte [ebp - 0x14c], 0
push 0x11
push str.UninstallService_
lea ecx, [ebp - 0x168]
mov dword [ebp - 4], edi
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x158], edi
mov byte [ebp - 0x168], 0
call fcn.0040124e
mov eax, esi
mov byte [ebp - 4], 1
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406284
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x168]
call fcn.0040181b
push 3
push 0x44c154
lea ecx, [ebp - 0x168]
call fcn.0040181b
push 0x100
lea eax, [ebp - 0x130]
push edi
push eax
call fcn.0041bb50
add esp, 0xc
push 0xf003f
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [ebp - 0x18c], ebx
cmp ebx, edi
jne 0x4063eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100
lea ecx, [ebp - 0x130]
mov esi, eax
push ecx
push esi
call fcn.0040171c
push eax
push str.OpenSCManager_failed____s_n
call fcn.0041bdcb
push esi
lea edx, [ebp - 0x30]
push 0x44c130
push edx
call fcn.0041b420
mov edx, dword [ebp - 0x168]
mov ebx, 0x10
add esp, 0x20
cmp dword [ebp - 0x154], ebx
jae 0x40632e
lea edx, [ebp - 0x168]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406333
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x14c]
call fcn.0040124e
push 0x20
push str.OpenSCManager_FAILED_with_ErrNo
lea ecx, [ebp - 0x14c]
call fcn.0040181b
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406361
sub eax, edx
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x14c]
call fcn.0040181b
mov eax, dword [ebp - 0x14c]
cmp dword [ebp - 0x138], ebx
jae 0x40638e
lea eax, [ebp - 0x14c]
push edi
push eax
push str.UtlSvrHelp
call fcn.00401875
add esp, 0xc
cmp dword [ebp - 0x154], ebx
jb 0x4063b4
mov ecx, dword [ebp - 0x168]
push ecx
call fcn.0041a986
add esp, 4
mov dword [ebp - 0x154], 0xf
mov dword [ebp - 0x158], edi
mov byte [ebp - 0x168], 0
cmp dword [ebp - 0x138], ebx
jb 0x4069bb
mov edx, dword [ebp - 0x14c]
push edx
call fcn.0041a986
add esp, 4
jmp 0x4069bb
push 0xf01ff
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x188], eax
cmp eax, edi
jne 0x40654e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push 0x100
lea eax, [ebp - 0x130]
push eax
push edi
call fcn.0040171c
push eax
push esi
push str.OpenService__s__failed____s_n
call fcn.0041bdcb
push edi
lea ecx, [ebp - 0x30]
push 0x44c130
push ecx
call fcn.0041b420
mov edx, dword [ebp - 0x168]
add esp, 0x24
cmp dword [ebp - 0x154], 0x10
jae 0x406453
lea edx, [ebp - 0x168]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406458
sub eax, edi
push eax
push edx
lea ecx, [ebp - 0x14c]
call fcn.0040124e
push 0xc
push str.OpenService_
lea ecx, [ebp - 0x14c]
call fcn.0040181b
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406485
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x14c]
call fcn.0040181b
push 0x14
push str.__FAILED_with_ErrNo
lea ecx, [ebp - 0x14c]
call fcn.0040181b
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4064b3
sub eax, edx
push eax
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x14c]
call fcn.0040181b
mov eax, dword [ebp - 0x14c]
mov esi, 0x10
cmp dword [ebp - 0x138], esi
jae 0x4064e5
lea eax, [ebp - 0x14c]
push 0
push eax
push str.UtlSvrHelp
call fcn.00401875
add esp, 0xc
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x154], esi
jb 0x406513
mov eax, dword [ebp - 0x168]
push eax
call fcn.0041a986
add esp, 4
mov dword [ebp - 0x154], 0xf
mov dword [ebp - 0x158], 0
mov byte [ebp - 0x168], 0
cmp dword [ebp - 0x138], esi
jb 0x4069bb
mov ecx, dword [ebp - 0x14c]
push ecx
call fcn.0041a986
add esp, 4
jmp 0x4069bb
lea edx, [ebp - 0x184]
push edx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40665f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push 0x100
lea eax, [ebp - 0x130]
push eax
push edi
call fcn.0040171c
push eax
push esi
push str.ControlService_try_to_stop__s__failed____s_n
call fcn.0041bdcb
push edi
lea ecx, [ebp - 0x30]
push 0x44c130
push ecx
call fcn.0041b420
mov edx, dword [ebp - 0x168]
mov ebx, 0x10
add esp, 0x24
cmp dword [ebp - 0x154], ebx
jae 0x4065b7
lea edx, [ebp - 0x168]
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4065c0
sub eax, edi
push eax
push edx
lea ecx, [ebp - 0x14c]
call fcn.0040124e
push 0x14
push str.ControlService_stop
lea ecx, [ebp - 0x14c]
call fcn.0040181b
mov eax, esi
lea ecx, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4065f0
sub eax, ecx
push eax
push esi
lea ecx, [ebp - 0x14c]
call fcn.0040181b
push 0x14
push str.__FAILED_with_ErrNo
lea ecx, [ebp - 0x14c]
call fcn.0040181b
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406620
sub eax, edx
push eax
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x14c]
call fcn.0040181b
mov eax, dword [ebp - 0x14c]
cmp dword [ebp - 0x138], ebx
jae 0x40664d
lea eax, [ebp - 0x14c]
push 0
push eax
push str.UtlSvrHelp
call fcn.00401875
jmp 0x4067c3
push esi
push str.Stopping__s.
call fcn.0041bdcb
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
push 0x3e8
call edi
mov ecx, dword [ebp - 0x188]
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x184]
push eax
push ecx
call ebx
test eax, eax
je 0x4066c5
cmp dword [ebp - 0x180], 3
jne 0x4066c5
push 0x44c218
call fcn.0041bdcb
add esp, 4
push 0x3e8
call edi
mov eax, dword [ebp - 0x188]
lea edx, [ebp - 0x184]
push edx
push eax
call ebx
test eax, eax
jne 0x406694
cmp dword [ebp - 0x180], 1
push esi
jne 0x406719
push str._n_s_stopped._n
call fcn.0041bdcb
mov eax, dword [ebp - 0x168]
mov ebx, 0x10
add esp, 8
cmp dword [ebp - 0x154], ebx
jae 0x4066f5
lea eax, [ebp - 0x168]
push eax
lea ecx, [ebp - 0x14c]
call fcn.00401348
push esi
lea ecx, [ebp - 0x14c]
call fcn.00401640
push 9
push str._stopped.
jmp 0x40662e
push str._n_s_failed_to_stop._n
call fcn.0041bdcb
mov eax, dword [ebp - 0x168]
mov edi, 0x10
add esp, 8
cmp dword [ebp - 0x154], edi
jae 0x40673f
lea eax, [ebp - 0x168]
push eax
lea ecx, [ebp - 0x14c]
call fcn.00401348
push esi
lea ecx, [ebp - 0x14c]
call fcn.00401640
push 0x1d
push str._failed_to_stop_with_status:
lea ecx, [ebp - 0x14c]
call fcn.0040181b
mov ecx, dword [ebp - 0x180]
push ecx
lea edx, [ebp - 0x30]
push 0x44c130
push edx
call fcn.0041b420
lea eax, [ebp - 0x30]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406787
sub eax, edx
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x14c]
call fcn.0040181b
mov eax, dword [ebp - 0x14c]
cmp dword [ebp - 0x138], edi
jae 0x4067b4
lea eax, [ebp - 0x14c]
push 0
push eax
push str.UtlSvrHelp
call fcn.00401875
mov ebx, edi
mov ecx, dword [ebp - 0x188]
add esp, 0xc
push ecx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x4068a4
push esi
push str._s_removed._n
call fcn.0041bdcb
mov edx, dword [ebp - 0x168]
add esp, 8
cmp dword [ebp - 0x154], ebx
jae 0x4067fd
lea edx, [ebp - 0x168]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406802
sub eax, edi
push eax
push edx
lea ecx, [ebp - 0x14c]
call fcn.0040124e
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406820
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x14c]
call fcn.0040181b
push 9
push str._removed.
lea ecx, [ebp - 0x14c]
call fcn.0040181b
mov eax, dword [ebp - 0x14c]
cmp dword [ebp - 0x138], ebx
jae 0x40685c
lea eax, [ebp - 0x14c]
push 0
push eax
push str.UtlSvrHelp
call fcn.00401875
mov edx, dword [ebp - 0x188]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 0xc
push edx
call esi
mov eax, dword [ebp - 0x18c]
push eax
call esi
lea ecx, [ebp - 0x168]
call fcn.004016d6
lea ecx, [ebp - 0x14c]
call fcn.004016d6
mov eax, 1
jmp 0x4069bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100
lea ecx, [ebp - 0x130]
mov edi, eax
push ecx
push edi
call fcn.0040171c
push eax
push str.DeleteService_failed____s_n
call fcn.0041bdcb
push edi
lea edx, [ebp - 0x30]
push 0x44c130
push edx
call fcn.0041b420
mov edx, dword [ebp - 0x168]
add esp, 0x20
cmp dword [ebp - 0x154], ebx
jae 0x4068ef
lea edx, [ebp - 0x168]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4068f4
sub eax, edi
push eax
push edx
lea ecx, [ebp - 0x14c]
call fcn.0040124e
push 0xe
push str.DeleteService_
lea ecx, [ebp - 0x14c]
call fcn.0040181b
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406921
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x14c]
call fcn.0040181b
push 0x14
push str.__FAILED_with_ErrNo
lea ecx, [ebp - 0x14c]
call fcn.0040181b
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406950
sub eax, edx
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x14c]
call fcn.0040181b
mov eax, dword [ebp - 0x14c]
cmp dword [ebp - 0x138], ebx
jae 0x40697d
lea eax, [ebp - 0x14c]
push 0
push eax
push str.UtlSvrHelp
call fcn.00401875
mov ecx, dword [ebp - 0x188]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 0xc
push ecx
call esi
mov edx, dword [ebp - 0x18c]
push edx
call esi
lea ecx, [ebp - 0x168]
call fcn.004016d6
lea ecx, [ebp - 0x14c]
call fcn.004016d6
xor eax, eax
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.0041b411
mov esp, ebp
pop ebp
ret