Function at 0x4115b0
Capabilities:
Enumerate services
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x580988
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x636f58]
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 0x411624
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.004107f0
add esp, 8
jmp 0x41172e
push ebx
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [ebp - 0x3c], eax
test eax, eax
jne 0x41164b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LockServiceDatabase_failed_w_err_0x_08lx_n
call fcn.004107f0
add esp, 8
jmp 0x41172b
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 0x4116d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4116ce
mov ebx, dword [ebp - 0x38]
test edi, edi
je 0x41169f
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 0x411684
jmp 0x4116d2
test ebx, ebx
je 0x411711
xor ebx, ebx
cmp dword [ebp - 0x30], ebx
jbe 0x411711
nop dword [eax]
push dword [edi]
push dword [ebp - 0x4c]
call fcn.00559bc0
add esp, 8
test eax, eax
jne 0x411708
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 0x41176b
inc ebx
add edi, 0x24
cmp ebx, dword [ebp - 0x30]
jb 0x4116e0
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x411721
push eax
call ebx
test esi, esi
je 0x411728
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 0x411745
push eax
call esi
test ebx, ebx
je 0x41174c
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.0054d4f5
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 0x4117d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4117ca
add edi, edi
test esi, esi
je 0x4117a8
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 0x411790
jmp 0x4117d2
test ebx, ebx
je 0x411711
push dword [esi + 0xc]
mov edi, dword [ebp - 0x50]
push edi
call fcn.00559bc0
add esp, 8
test eax, eax
je 0x411883
push 0x6120bc
lea ecx, [ebp - 0x28]
call fcn.004029c0
push edi
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.00402a10
push 0x6120bc
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 0x41188a
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x411869
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41189a
push edx
push ecx
call fcn.0054d506
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
add esp, 8
push esi
call ebx
xor esi, esi
jmp 0x411717
mov dword [ebp - 0x40], 1
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call ebx
xor esi, esi
jmp 0x411717
call fcn.00559439
int3