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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421f96
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x434064]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 1
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
push 0
push 0
movups xmmword [ebp - 0x2c], xmm0
movq qword [ebp - 0x1c], xmm0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x4c], esi
test esi, esi
jne 0x406840
push 0xd
push str.OpenSCManager
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], 7
mov word [ebp - 0x64], ax
call fcn.00404110
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x48]
push 0xc
xor eax, eax
mov dword [ebp - 0x38], esi
push 0x430464
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
call fcn.00404110
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x64]
lea ecx, [ebp - 0x48]
call fcn.004020d0
mov edx, dword [ebp - 0x34]
add esp, 4
cmp edx, 8
jb 0x4067eb
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4067e1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cff
push edx
push ecx
call fcn.0040a239
add esp, 8
mov edx, dword [ebp - 0x50]
xor eax, eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
cmp edx, 8
jb 0x406839
mov ecx, dword [ebp - 0x64]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40682f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d04
push edx
push ecx
call fcn.0040a239
add esp, 8
xor al, al
jmp 0x406ce4
push 0x10024
push 0x430464
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
mov dword [ebp - 0x68], edi
test edi, edi
jne 0x406950
push 0xb
push str.OpenService
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], 7
mov word [ebp - 0x64], ax
call fcn.00404110
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x48]
push 0xc
xor eax, eax
mov dword [ebp - 0x38], edi
push 0x430464
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
call fcn.00404110
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x64]
lea ecx, [ebp - 0x48]
call fcn.004020d0
mov edx, dword [ebp - 0x34]
add esp, 4
cmp edx, 8
jb 0x4068f4
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4068ea
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d09
push edx
push ecx
call fcn.0040a239
add esp, 8
mov edx, dword [ebp - 0x50]
xor eax, eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
cmp edx, 8
jb 0x406942
mov ecx, dword [ebp - 0x64]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406938
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d0e
push edx
push ecx
call fcn.0040a239
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x406ce4
lea eax, [ebp - 0x2c]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x406bbe
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
mov esi, 2
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4069ac
cmp esi, 2
jg 0x4069ac
mov eax, dword [ebp - 0x28]
cmp eax, 3
jne 0x4069af
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
inc esi
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x406984
mov eax, dword [ebp - 0x28]
cmp eax, 1
je 0x406bbb
push 0x430464
lea ecx, [ebp - 0xb0]
call fcn.00405240
push 0x430464
lea ecx, [ebp - 0x64]
mov dword [ebp - 4], 4
call fcn.00405240
mov edi, eax
mov byte [ebp - 4], 5
mov ecx, edi
mov esi, dword [edi + 0x14]
mov eax, esi
mov edx, dword [edi + 0x10]
sub eax, edx
cmp eax, 0x18
jb 0x406a78
mov dword [ebp - 0x30], edi
lea eax, [edx + 0x18]
mov dword [edi + 0x10], eax
cmp esi, 8
jb 0x406a0a
mov ecx, dword [edi]
mov dword [ebp - 0x30], ecx
add edx, edx
cmp ecx, 0x430584
jae 0x406a36
lea eax, [edx + ecx]
cmp eax, str.Failed_to_stop_service:
jb 0x406a36
cmp ecx, str.Failed_to_stop_service:
ja 0x406a2a
xor esi, esi
jmp 0x406a3b
mov esi, ecx
sub esi, str.Failed_to_stop_service:
sar esi, 1
jmp 0x406a3b
mov esi, 0x18
lea eax, [edx + 2]
push eax
push ecx
lea eax, [ecx + 0x30]
push eax
call fcn.0040bbf0
add esi, esi
push esi
push str.Failed_to_stop_service:
push dword [ebp - 0x30]
call fcn.0040b670
mov eax, 0x30
sub eax, esi
push eax
lea eax, [esi + 0x430584]
push eax
mov eax, dword [ebp - 0x30]
add eax, esi
push eax
call fcn.0040b670
add esp, 0x24
jmp 0x406a8d
push 0x18
sub esp, 8
mov byte [ebp - 0x30], 0
push dword [ebp - 0x30]
push 0x18
call fcn.00408ae0
mov edi, eax
mov dword [ebp - 0x38], 0
lea edx, [ebp - 0x48]
mov dword [ebp - 0x34], 0
xor eax, eax
movups xmm0, xmmword [edi]
push ecx
lea ecx, [ebp - 0xb0]
movups xmmword [ebp - 0x48], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x38], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
call fcn.00402060
mov edx, dword [ebp - 0x34]
add esp, 4
cmp edx, 8
jb 0x406b0b
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406b01
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d13
push edx
push ecx
call fcn.0040a239
add esp, 8
xor eax, eax
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
cmp edx, 8
jb 0x406b5d
mov ecx, dword [ebp - 0x64]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406b53
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d18
push edx
push ecx
call fcn.0040a239
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x9c]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 7
mov word [ebp - 0x64], ax
cmp edx, 8
jb 0x406bb8
mov ecx, dword [ebp - 0xb0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406bae
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d1d
push edx
push ecx
call fcn.0040a239
add esp, 8
mov edi, dword [ebp - 0x68]
mov esi, dword [ebp - 0x4c]
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x406cd6
push 0xd
push 0x430588
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], 7
mov word [ebp - 0x98], ax
call fcn.00404110
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x80]
push 0xc
xor eax, eax
mov dword [ebp - 0x70], 0
push 0x430464
mov dword [ebp - 0x6c], 7
mov word [ebp - 0x80], ax
call fcn.00404110
mov byte [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x98]
lea ecx, [ebp - 0x80]
call fcn.004020d0
mov edx, dword [ebp - 0x6c]
add esp, 4
cmp edx, 8
jb 0x406c76
mov ecx, dword [ebp - 0x80]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406c6c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d22
push edx
push ecx
call fcn.0040a239
add esp, 8
mov edx, dword [ebp - 0x84]
xor eax, eax
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 7
mov word [ebp - 0x80], ax
cmp edx, 8
jb 0x406cc6
mov ecx, dword [ebp - 0x98]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406cbc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d27
push edx
push ecx
call fcn.0040a239
add esp, 8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
xor al, al
jmp 0x406ce4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040a1f8
mov esp, ebp
pop ebp
ret
call fcn.004101f6
call fcn.004101f6
call fcn.004101f6
call fcn.004101f6
call fcn.004101f6
call fcn.004101f6
call fcn.004101f6
call fcn.004101f6
call fcn.004101f6
int3