Function at 0x580320
Capabilities:
Enumerate services
Modify service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xe0
mov ecx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
xor edi, edi
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x580385
mov ecx, dword [ecx + 0x14]
test ecx, ecx
je 0x580385
add ecx, eax
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
mov word [esp + 0x2c], 0
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
call fcn.00568d00
mov edi, dword [esp + 0x10]
cmp dword [esp + 0x14], 0
je 0x580385
mov eax, dword [0x607460]
push edi
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
push 0xf003f
push 0
push edi
call sub.advapi32.dll_OpenSCManagerW
mov dword [esp + 0xc8], eax
call sub.KERNEL32.dll_GetLastError
test eax, eax
mov dword [esp + 0xd4], eax
je 0x580454
lea eax, [esp + 0xd4]
mov dword [esp + 0x20], 0x6064d8
mov dword [esp + 0x24], 1
mov dword [esp + 0x30], 0
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x14], 0x42baa0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 1
lea eax, [esp + 0x20]
push eax
call fcn.0044fbf0
add esp, 4
mov ebx, dword [esi + 8]
mov eax, dword [esi]
test ebx, ebx
mov dword [esp + 0x50], eax
je 0x580439
mov eax, dword [esp + 0x50]
mov edi, dword [0x607460]
lea esi, [eax + 4]
jmp 0x580426
add esi, 0x10
dec ebx
je 0x580439
cmp dword [esi], 0
je 0x580420
push dword [esi - 4]
push 0
push dword [edi]
call sub.KERNEL32.dll_HeapFree
jmp 0x580420
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 0
je 0x580f8d
mov eax, dword [0x607460]
push dword [esp + 0x50]
jmp 0x580f84
mov ecx, dword [esi + 8]
mov edi, dword [esi]
mov eax, dword [esi + 4]
mov ebx, ecx
mov dword [esp + 0xa4], edi
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], edi
shl ebx, 4
add ebx, edi
test ecx, ecx
mov dword [esp + 0xb0], ebx
je 0x580f6e
add edi, 0x10
jmp 0x58049e
add esi, 0x10
add edi, 0x10
cmp esi, ebx
je 0x580f37
cmp byte [edi - 4], 2
je 0x580f39
mov ecx, dword [edi - 0xc]
mov eax, dword [edi - 0x10]
mov dword [esp + 0x98], ecx
mov ecx, dword [edi - 8]
mov dword [esp + 0x70], ecx
push ecx
mov dword [esp + 0x54], eax
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00428910
add esp, 0xc
xor eax, eax
cmp dword [esp + 0x20], 0
jne 0x5804e7
mov eax, dword [esp + 0x28]
mov dword [esp + 0xd0], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0xd0]
test eax, eax
mov edx, 9
mov dword [esp + 0x20], 1
cmove ecx, edx
mov edx, str._unknown_cannot_start_restart_manager_session:
cmove eax, edx
add ecx, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
mov word [esp + 0x2c], 0
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
call fcn.00568d00
mov esi, dword [esp + 0x10]
push 0x2f
push esi
push dword [esp + 0xd0]
call sub.advapi32.dll_OpenServiceW
mov dword [esp + 0x6c], eax
cmp dword [esp + 0x14], 0
je 0x580553
push esi
push 0
mov eax, dword [0x607460]
push dword [eax]
call sub.KERNEL32.dll_HeapFree
call sub.KERNEL32.dll_GetLastError
test eax, eax
mov dword [esp + 0xd8], eax
je 0x58063b
push dword [esp + 0x70]
push dword [esp + 0x54]
lea eax, [esp + 0x28]
push eax
call fcn.00428910
add esp, 0xc
cmp dword [esp + 0x20], 0
setne al
jne 0x580591
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xcc], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x20], 0x6065fc
mov dword [esp + 0x24], 2
mov dword [esp + 0x30], 0
test ecx, ecx
sete dl
or al, dl
mov eax, str._unknown_cannot_start_restart_manager_session:
cmovne ecx, eax
mov eax, dword [esp + 0xcc]
mov dword [esp + 0x58], ecx
mov ecx, 9
cmovne eax, ecx
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x58]
mov dword [esp + 0x10], eax
lea eax, [esp + 0xd8]
mov dword [esp + 0x14], 0x561b20
mov dword [esp + 0x18], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x1c], 0x42baa0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 2
lea eax, [esp + 0x20]
push eax
call fcn.0044fbf0
add esp, 4
cmp dword [esp + 0x98], 0
lea esi, [edi - 0x10]
je 0x580490
push dword [esp + 0x50]
push 0
mov eax, dword [0x607460]
push dword [eax]
call sub.KERNEL32.dll_HeapFree
jmp 0x580490
mov dword [esp + 0x7c], 1
mov dword [esp + 0x80], 0
mov dword [esp + 0xac], edi
mov dword [esp + 0x78], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0x84], 0
lea eax, [esp + 0x9c]
push eax
lea eax, [esp + 0x7c]
push eax
push 0
push 0
push 1
push dword [esp + 0x80]
call sub.advapi32.dll_EnumDependentServicesW
mov esi, 1
test eax, eax
mov ebx, 0
mov dword [esp + 0xc], 0
jne 0x580788
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xea
mov dword [esp + 0x58], eax
jne 0x58070a
mov edi, dword [esp + 0x78]
test edi, edi
je 0x580760
xor edx, edx
lea ecx, [esp + 0x7c]
push edi
call fcn.00567520
add esp, 4
mov esi, dword [esp + 0x7c]
mov ebx, dword [esp + 0x84]
cmp edi, 2
lea eax, [esi + ebx]
jb 0x580700
lea ecx, [edi - 1]
push ecx
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea ebx, [ebx + edi - 1]
lea eax, [esi + ebx]
mov byte [eax], 0
inc ebx
mov eax, dword [esp + 0x78]
jmp 0x580764
lea eax, [esp + 0x58]
mov dword [esp + 0x20], 0x60624c
mov dword [esp + 0x24], 1
mov dword [esp + 0x30], 0
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x14], 0x561b80
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 1
lea eax, [esp + 0x20]
push eax
call fcn.0044fbf0
add esp, 4
xor edi, edi
xor ecx, ecx
mov dword [esp + 0x68], 4
jmp 0x580997
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x84], ebx
lea ecx, [esp + 0x9c]
push ecx
lea ecx, [esp + 0x7c]
push ecx
push eax
push esi
push 1
push dword [esp + 0x80]
call sub.advapi32.dll_EnumDependentServicesW
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x88], 4
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0
test eax, eax
mov dword [esp + 0x94], eax
je 0x580c08
mov dword [esp + 0x74], ebx
mov edi, 4
xor ebx, ebx
mov dword [esp + 0x54], esi
mov dword [esp + 0xc], 0
jmp 0x58082e
movsd xmm0, qword [esp + 0x38]
mov eax, esi
inc ebx
inc esi
shl eax, 5
cmp ebx, dword [esp + 0x94]
mov dword [esp + 0xc], esi
movsd qword [edi + eax + 0x18], xmm0
movsd xmm0, qword [esp + 0x30]
movsd qword [edi + eax + 0x10], xmm0
movsd xmm0, qword [esp + 0x20]
movsd xmm1, qword [esp + 0x28]
movsd qword [edi + eax + 8], xmm1
movsd qword [edi + eax], xmm0
mov dword [esp + 0x90], esi
je 0x58096b
cmp ebx, 0x71c71c7
je 0x580fa9
lea eax, [ebx*4]
mov esi, edi
lea edi, [eax + eax*8]
lea eax, [edi + 0x24]
cmp eax, dword [esp + 0x74]
ja 0x580f95
mov eax, dword [esp + 0x54]
mov eax, dword [eax + edi]
test eax, eax
je 0x5808c0
mov ecx, 0xffffffff
nop word cs:[eax + eax]
nop dword [eax]
cmp word [eax + ecx*2 + 2], 0
lea ecx, [ecx + 1]
jne 0x580870
push ecx
push eax
lea eax, [esp + 0x60]
push eax
call fcn.0052f440
add esp, 0xc
mov eax, dword [esp + 0x54]
mov eax, dword [eax + edi + 4]
test eax, eax
je 0x5808e9
mov ecx, 0xffffffff
mov edi, esi
nop dword [eax]
cmp word [eax + ecx*2 + 2], 0
lea ecx, [ecx + 1]
jne 0x5808a0
push ecx
push eax
lea eax, [esp + 0x18]
push eax
call fcn.0052f440
add esp, 0xc
mov esi, dword [esp + 0xc]
jmp 0x58090c
mov dword [esp + 0x58], 1
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
mov byte [esp + 0x64], 1
mov eax, dword [esp + 0x54]
mov eax, dword [eax + edi + 4]
test eax, eax
jne 0x580896
mov edi, esi
mov esi, dword [esp + 0xc]
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov byte [esp + 0x1c], 1
movsd xmm0, qword [esp + 0x58]
movsd xmm1, qword [esp + 0x60]
cmp esi, dword [esp + 0x8c]
movsd xmm2, qword [esp + 0x18]
lea eax, [esp + 0x30]
movsd qword [esp + 0x20], xmm0
movsd xmm0, qword [esp + 0x10]
movsd qword [esp + 0x28], xmm1
movsd qword [eax + 8], xmm2
movsd qword [eax], xmm0
jne 0x5807e0
lea ecx, [esp + 0x88]
mov edx, esi
call fcn.00567200
mov edi, dword [esp + 0x88]
mov esi, dword [esp + 0x90]
jmp 0x5807e0
mov dword [esp + 0x68], edi
mov edi, dword [esp + 0x8c]
mov esi, dword [esp + 0x54]
cmp dword [esp + 0x80], 0
je 0x580993
push esi
push 0
mov eax, dword [0x607460]
push dword [eax]
call sub.KERNEL32.dll_HeapFree
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x68]
mov ebx, ecx
mov dword [esp + 0x10], 4
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
shl ebx, 5
add ebx, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edi
test ecx, ecx
mov edi, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebx
je 0x580aaf
mov eax, dword [esp + 0x68]
xor esi, esi
mov ecx, 4
mov dword [esp + 0xc4], ebx
lea edi, [eax + 0x20]
jmp 0x580a07
mov eax, dword [esp + 0xc4]
add ebx, 0x20
add edi, 0x20
cmp ebx, eax
mov ebx, eax
je 0x580af5
cmp byte [edi - 4], 2
je 0x580aaf
mov ebx, dword [edi - 0x1c]
mov edx, dword [edi - 0x14]
mov eax, dword [edi - 0x20]
cmp esi, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov ebx, dword [edi - 0x18]
mov dword [esp + 0x74], edx
mov edx, dword [edi - 0x10]
mov dword [esp + 0x54], eax
mov dword [esp + 0x94], ebx
mov ebx, dword [edi - 0xc]
mov dword [esp + 0xa0], edx
jne 0x580a56
lea ecx, [esp + 0x10]
mov edx, esi
call fcn.00567160
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x54]
mov eax, esi
inc esi
shl eax, 4
test ebx, ebx
lea ebx, [edi - 0x20]
mov dword [ecx + eax], edx
mov edx, dword [esp + 0xc]
mov dword [ecx + eax + 4], edx
mov edx, dword [esp + 0x74]
mov dword [ecx + eax + 0xc], edx
mov edx, dword [esp + 0x94]
mov dword [ecx + eax + 8], edx
mov dword [esp + 0x18], esi
je 0x5809f0
push dword [esp + 0xa0]
push 0
mov eax, dword [0x607460]
push dword [eax]
mov dword [esp + 0x18], ecx
call sub.KERNEL32.dll_HeapFree
mov ecx, dword [esp + 0xc]
jmp 0x5809f0
sub ebx, edi
mov dword [esp + 0x28], edi
je 0x580af5
shr ebx, 5
add edi, 0x14
jmp 0x580ac6
add edi, 0x20
dec ebx
je 0x580af5
cmp dword [edi - 0x10], 0
je 0x580add
push dword [edi - 0x14]
push 0
mov eax, dword [0x607460]
push dword [eax]
call sub.KERNEL32.dll_HeapFree
cmp dword [edi], 0
je 0x580ac0
push dword [edi - 4]
push 0
mov eax, dword [0x607460]
push dword [eax]
call sub.KERNEL32.dll_HeapFree
jmp 0x580ac0
cmp dword [esp + 0x24], 0
je 0x580b0e
push dword [esp + 0x68]
push 0
mov eax, dword [0x607460]
push dword [eax]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [esp + 0x18]
movsd xmm0, qword [esp + 0x10]
mov dword [esp + 0x28], eax
movsd qword [esp + 0x20], xmm0
lea eax, [esp + 0x20]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.00580320
add esp, 8
mov edi, 0x28
xorps xmm0, xmm0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 0
movaps xmmword [esp + 0x20], xmm0
lea eax, [esp + 0x20]
push eax
push 1
push dword [esp + 0x74]
call sub.advapi32.dll_ControlService
test eax, eax
je 0x580c01
call fcn.00532e80
mov dword [esp + 0xc], eax
mov ebx, edx
mov esi, ecx
nop dword [eax]
xorps xmm0, xmm0
mov dword [esp + 0x40], 0
mov dword [esp + 0x58], 0
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x20], xmm0
lea eax, [esp + 0x58]
push eax
push 0x24
lea eax, [esp + 0x28]
push eax
push 0
push dword [esp + 0x7c]
call sub.advapi32.dll_QueryServiceStatusEx
test eax, eax
je 0x580c25
cmp dword [esp + 0x24], 1
je 0x580cd9
call fcn.00532e80
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
push esi
push ebx
push dword [esp + 0x14]
lea eax, [esp + 0x2c]
push eax
call fcn.00532f10
add esp, 0x10
cmp ecx, 0x3b9aca00
je 0x580b80
cmp edi, eax
mov ecx, 0
sbb ecx, edx
jae 0x580b80
mov eax, 0x102
jmp 0x580c27
call sub.KERNEL32.dll_GetLastError
jmp 0x580c27
mov dword [esp + 0x68], 4
xor edi, edi
cmp dword [esp + 0x80], 0
jne 0x580984
jmp 0x580993
xor eax, eax
mov dword [esp + 0x7c], eax
push dword [esp + 0x70]
push dword [esp + 0x54]
lea eax, [esp + 0x28]
push eax
call fcn.00428910
add esp, 0xc
cmp dword [esp + 0x20], 0
setne al
jne 0x580c55
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xc0], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x20], 0x606584
mov dword [esp + 0x24], 2
mov dword [esp + 0x30], 0
test ecx, ecx
sete dl
or al, dl
mov eax, str._unknown_cannot_start_restart_manager_session:
cmovne ecx, eax
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x58], ecx
mov ecx, 9
cmovne eax, ecx
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x58]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x7c]
mov dword [esp + 0x14], 0x561b20
mov dword [esp + 0x18], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x1c], 0x42baa0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 2
lea eax, [esp + 0x20]
push eax
call fcn.0044fbf0
add esp, 4
jmp 0x580d7a
mov dword [esp + 0x7c], 0
push dword [esp + 0x70]
push dword [esp + 0x54]
lea eax, [esp + 0x28]
push eax
call fcn.00428910
add esp, 0xc
cmp dword [esp + 0x20], 0
setne al
jne 0x580d0b
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xb4], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x20], 0x60655c
mov dword [esp + 0x24], 2
mov dword [esp + 0x30], 0
test ecx, ecx
sete dl
or al, dl
mov eax, str._unknown_cannot_start_restart_manager_session:
cmovne ecx, eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x10], ecx
mov ecx, 9
cmovne eax, ecx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
mov dword [esp + 0x5c], 0x561b20
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 1
lea eax, [esp + 0x20]
push eax
call fcn.0044fbf0
add esp, 4
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 4
push 0xffffffffffffffff
push dword [esp + 0x94]
call sub.advapi32.dll_ChangeServiceConfigW
test eax, eax
je 0x580e4b
mov dword [esp + 0x88], 0
push dword [esp + 0x70]
push dword [esp + 0x54]
lea eax, [esp + 0x28]
push eax
call fcn.00428910
add esp, 0xc
cmp dword [esp + 0x20], 0
setne al
jne 0x580dd7
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xbc], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x20], 0x6065a0
mov dword [esp + 0x24], 2
mov dword [esp + 0x30], 0
test ecx, ecx
sete dl
or al, dl
mov eax, str._unknown_cannot_start_restart_manager_session:
cmovne ecx, eax
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x10], ecx
mov ecx, 9
cmovne eax, ecx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
mov dword [esp + 0x5c], 0x561b20
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 1
lea eax, [esp + 0x20]
push eax
call fcn.0044fbf0
add esp, 4
jmp 0x580f03
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 0x88], eax
push dword [esp + 0x70]
push dword [esp + 0x54]
lea eax, [esp + 0x28]
push eax
call fcn.00428910
add esp, 0xc
cmp dword [esp + 0x20], 0
setne al
jne 0x580e81
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xb8], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x20], 0x6065cc
mov dword [esp + 0x24], 2
mov dword [esp + 0x30], 0
test ecx, ecx
sete dl
or al, dl
mov eax, str._unknown_cannot_start_restart_manager_session:
cmovne ecx, eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x58], ecx
mov ecx, 9
cmovne eax, ecx
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x58]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x88]
mov dword [esp + 0x14], 0x561b20
mov dword [esp + 0x18], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x1c], 0x42baa0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 2
lea eax, [esp + 0x20]
push eax
call fcn.0044fbf0
add esp, 4
cmp dword [esp + 0x98], 0
je 0x580f1f
push dword [esp + 0x50]
push 0
mov eax, dword [0x607460]
push dword [eax]
call sub.KERNEL32.dll_HeapFree
mov edi, dword [esp + 0xac]
mov ebx, dword [esp + 0xb0]
cmp edi, ebx
jne 0x580487
jmp 0x580f6e
mov edi, ebx
sub ebx, edi
je 0x580f6e
shr ebx, 4
add edi, 4
jmp 0x580f56
add edi, 0x10
dec ebx
je 0x580f6e
cmp dword [edi], 0
je 0x580f50
push dword [edi - 4]
push 0
mov eax, dword [0x607460]
push dword [eax]
call sub.KERNEL32.dll_HeapFree
jmp 0x580f50
cmp dword [esp + 0xa8], 0
je 0x580f8d
mov eax, dword [0x607460]
push dword [esp + 0xa4]
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x606290
push dword [esp + 0x78]
push eax
call fcn.004287f0
add esp, 0xc
jmp 0x580fba
push 0x606290
push 0x20
push 0xfffffffffffffffc
call fcn.00428850
add esp, 0xc
ud2