Function at 0xd8bad0
Capabilities:
Connect pipe
Create pipe
Query service status
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0xdc451c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
push edi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
cmp eax, esi
jne 0xd8bb45
push 1
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
cmp edi, esi
jne 0xd8bb48
call fcn.00d8d7d0
push str._ERROR_
call fcn.00d9f6dc
add esp, 4
push str.SendServiceMsg_:_Failed_to_open_Service_Control_Manager_n
call fcn.00d9f6dc
add esp, 4
call fcn.00d9e1f2
add eax, 0x20
push eax
call fcn.00d9ece2
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00d9c668
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x24]
push str.AgentServiceName
lea ecx, [ebp - 0x28]
call fcn.00d8cc80
mov esi, dword [ebp - 0x28]
add esp, 4
push 4
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test esi, esi
je 0xd8bb74
push esi
call fcn.00d9e1b8
add esp, 4
test ebx, ebx
jne 0xd8bbc2
call fcn.00d8d7d0
push str._ERROR_
call fcn.00d9f6dc
add esp, 4
push str.SendServiceMsg_:_Failed_to_open_the_Service_n
call fcn.00d9f6dc
add esp, 4
call fcn.00d9e1f2
add eax, 0x20
push eax
call fcn.00d9ece2
add esp, 4
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00d9c668
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0xd8bc20
call fcn.00d8d7d0
push str._ERROR_
call fcn.00d9f6dc
add esp, 4
push str.SendServiceMsg_:_Failed_to_Query_the_Service_n
call fcn.00d9f6dc
add esp, 4
call fcn.00d9e1f2
add eax, 0x20
push eax
call fcn.00d9ece2
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 4
push ebx
call esi
push edi
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00d9c668
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1c], 4
je 0xd8bc75
call fcn.00d8d7d0
push str._ERROR_
call fcn.00d9f6dc
add esp, 4
push str.SendServiceMsg_:_The_service_is_not_runnig.._n
call fcn.00d9f6dc
add esp, 4
call fcn.00d9e1f2
add eax, 0x20
push eax
call fcn.00d9ece2
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 4
push edi
call esi
push ebx
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00d9c668
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0x4000
push 0x4000
push 1
push 0
push 3
push str..pipecoreagent_service
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov esi, eax
cmp esi, 0xffffffff
je 0xd8bcbb
push 0
push esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0xd8bcbb
push 0
lea ecx, [ebp - 0x24]
push ecx
push 4
lea edx, [ebp + 0xc]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push edi
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.00d9c668
mov esp, ebp
pop ebp
ret