Function at 0x485ce0
Capabilities:
Create service
Delete service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5ac004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 2
push 0
mov esi, ecx
push 0
mov dword [ebp - 0x10], esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x24], ebx
test ebx, ebx
jne 0x485d36
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x485efc
movzx eax, ax
or eax, 0xc0070000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e068
mov esp, ebp
pop ebp
ret
xor ecx, ecx
mov edx, 0x5b3834
xor eax, eax
lock cmpxchg dword [edx], ecx
mov edi, eax
test edi, edi
je 0x485e01
lock inc dword [edi - 4]
push dword ds:[esi + 0x28]
push dword [edi + 4]
push str.__s___ras___s_
call sym.ProcessHacker.exe_PhFormatString
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov esi, eax
mov ecx, dword [ecx + 0x28]
push 0x54a060
push str.LocalSystem
push 0
push 0
push 0
push dword [esi + 4]
push 0
push 3
push 0x10
push 0xf01ff
push ecx
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword ds:[ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esi - 8]
mov ebx, eax
or esi, 0xffffffff
mov edx, esi
lock xadd dword [ecx + 4], edx
dec edx
jne 0x485dbd
call fcn.004b3960
lea ecx, [edi - 8]
mov eax, esi
lock xadd dword [ecx + 4], eax
dec eax
jne 0x485dcf
call fcn.004b3960
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [ebp - 0x14]
test esi, esi
jne 0x485e49
nop
test ebx, ebx
jle 0x485ded
movzx ebx, bx
or ebx, 0xc0070000
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e068
mov esp, ebp
pop ebp
ret
push 0
push dword [0x5b1d78]
call sym.ProcessHacker.exe_PhGetDllFileName
mov edi, eax
mov edx, 0x5b3834
mov ecx, edi
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x485e28
lock inc dword [edi - 4]
test edi, edi
jne 0x485d51
mov eax, 0xc0000229
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e068
mov esp, ebp
pop ebp
ret
call fcn.00485b80
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov eax, dword [ebp - 0x10]
push dword [eax + 0x28]
push str.BaseNamedObjects_
call sym.ProcessHacker.exe_PhConcatStrings2
mov ebx, eax
mov edi, 0x32
movzx ecx, word [ebx]
mov word [ebp - 0xc], cx
movzx ecx, word [ebx]
add cx, 2
mov word [ebp - 0xa], cx
mov ecx, dword [ebx + 4]
mov dword [ebp - 8], ecx
lea ecx, [ebp - 0xc]
call fcn.00456000
mov esi, eax
test esi, esi
jns 0x485ec5
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0xfff0bdc0
push eax
push 0
mov dword [ebp - 0x1c], 0xffffffff
call dword [sym.imp.ntdll.dll_NtDelayExecution]
mov edi, edi
sub edi, 1
jne 0x485e95
lea ecx, [ebx - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x485ed8
call fcn.004b3960
test esi, esi
js 0x485ef0
mov edx, dword [ebp - 0x10]
mov ecx, 0xc
call fcn.004562e0
mov esi, eax
call fcn.004561a0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051e068
mov esp, ebp
pop ebp
ret