Function at 0x410fb0
Capabilities:
Enumerate services
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x580028
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x634f58]
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 dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], ecx
push 0xf003f
push 0
push 0
mov dword [ebp - 0x40], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x2c], 0
xor esi, esi
mov dword [ebp - 0x34], ebx
xor edi, edi
test ebx, ebx
jne 0x411024
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x615de0
call fcn.004102f0
add esp, 8
jmp 0x41112e
push ebx
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [ebp - 0x3c], eax
test eax, eax
jne 0x41104b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LockServiceDatabase_failed_w_err_0x_08lx_n
call fcn.004102f0
add esp, 8
jmp 0x41112b
push 0x10000
push 0x40
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x38], esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0
mov edi, eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x48], edi
push eax
push 0x10000
push edi
push 3
push 0x30
push ebx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov ebx, eax
test ebx, ebx
jne 0x4110d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4110ce
mov ebx, dword [ebp - 0x38]
test edi, edi
je 0x41109f
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0
mov edi, eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x48], edi
push eax
push ebx
push edi
push 3
push 0x30
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov ebx, eax
test ebx, ebx
je 0x411084
jmp 0x4110d2
test ebx, ebx
je 0x411111
xor ebx, ebx
cmp dword [ebp - 0x30], ebx
jbe 0x411111
nop dword [eax]
push dword [edi]
push dword [ebp - 0x4c]
call fcn.00559690
add esp, 8
test eax, eax
jne 0x411108
push 3
push dword [edi]
mov dword [ebp - 0x44], esi
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x41116b
inc ebx
add edi, 0x24
cmp ebx, dword [ebp - 0x30]
jb 0x4110e0
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x411121
push eax
call ebx
test esi, esi
je 0x411128
push esi
call ebx
mov ebx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x3c]
push edi
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov eax, dword [ebp - 0x2c]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x411145
push eax
call esi
test ebx, ebx
je 0x41114c
push ebx
call esi
mov eax, dword [ebp - 0x40]
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.0054cfc8
mov esp, ebp
pop ebp
ret
mov edi, 0x1000
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
lea eax, [ebp - 0x44]
push eax
push edi
push esi
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov ebx, eax
test ebx, ebx
jne 0x4111d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4111ca
add edi, edi
test esi, esi
je 0x4111a8
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
lea eax, [ebp - 0x44]
push eax
push edi
push esi
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov ebx, eax
test ebx, ebx
je 0x411190
jmp 0x4111d2
test ebx, ebx
je 0x411111
push dword [esi + 0xc]
mov edi, dword [ebp - 0x50]
push edi
call fcn.00559690
add esp, 8
test eax, eax
je 0x411283
push 0x6110cc
lea ecx, [ebp - 0x28]
call fcn.004029c0
push edi
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.00402a10
push 0x6110cc
lea ecx, [ebp - 0x28]
call fcn.00402a10
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0
cmovae eax, dword [ebp - 0x28]
push 0
push 0
push 0
push 0
push 0
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x40], eax
cmp edx, 8
jb 0x41128a
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x411269
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41129a
push edx
push ecx
call fcn.0054cfd9
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
add esp, 8
push esi
call ebx
xor esi, esi
jmp 0x411117
mov dword [ebp - 0x40], 1
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call ebx
xor esi, esi
jmp 0x411117
call fcn.00558f09
int3