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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x5142b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push 1
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
cmp edi, esi
jne 0x479508
push str.SendServiceMsg_:_Failed_to_open_Service_Control_Manager_n
call fcn.00423ad0
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048ed61
mov esp, ebp
pop ebp
ret
cmp dword [0x515be8], esi
jne 0x47951d
push 0x515be8
call fcn.0045bd50
add esp, 4
mov ecx, dword [0x515be8]
lea eax, [ebp - 0x24]
push eax
push ecx
mov dword [ebp - 0x24], esi
call fcn.004627d0
mov edx, dword [ebp - 0x24]
add esp, 8
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x479678
mov eax, dword [ebp + 8]
cmp eax, 0xc1
je 0x479678
add eax, 0xffffff80
cmp eax, 0x7f
ja 0x479678
mov eax, dword [ebp - 0x24]
cmp eax, esi
je 0x479570
push eax
call fcn.0048efd8
add esp, 4
push 4
push ebx
push edi
mov dword [ebp - 0x24], esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x4795aa
push str.SendServiceMsg_:_Failed_to_open_the_Service_n
call fcn.00423ad0
add esp, 4
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048ed61
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 0x4795e5
push str.SendServiceMsg_:_Failed_to_Query_the_Service_n
call fcn.00423ad0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 4
push ebx
call esi
push edi
call esi
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048ed61
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1c], 4
je 0x479617
push str.SendServiceMsg_:_The_service_is_not_runnig.._n
call fcn.00423ad0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 4
push edi
call esi
push ebx
call esi
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048ed61
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 0x47965d
push 0
push esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x47965d
push 0
lea ecx, [ebp - 0x28]
push ecx
push 4
lea edx, [ebp + 8]
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]
push ebx
jmp 0x479704
mov eax, dword [ebp - 0x24]
cmp eax, esi
je 0x479688
push eax
call fcn.0048efd8
add esp, 4
push 0x100
push ebx
push edi
mov dword [ebp - 0x24], esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x479583
push ebx
push str.SendServiceMsg_:_Service__S_Opened_successfully_n
call fcn.00423db0
mov ecx, dword [ebp + 8]
add esp, 8
lea eax, [ebp - 0x20]
push eax
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x4796f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SendServiceMsg_:_Notification_failed__d__n
call fcn.00423ad0
add esp, 8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048ed61
mov esp, ebp
pop ebp
ret
push str.SendServiceMsg_:_Notification_is_succeeded_n
call fcn.00423db0
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
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.0048ed61
mov esp, ebp
pop ebp
ret