Function at 0x405cc0
Capabilities:
Connect pipe
Create pipe
Read file on windows
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x4044
call fcn.00423810
mov eax, dword [0x442abc]
xor eax, esp
mov dword [esp + 0x4040], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
xor ebx, ebx
push edi
push ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x10], str..pipectaudsvc
call dword [sym.imp.ole32.dll_CoInitialize]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov ecx, dword [0x43b664]
mov edx, dword [0x43b668]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x43b66c]
mov dword [eax + 4], edx
mov edx, dword [0x43b670]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
call fcn.00405c20
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventW]
add esp, 0x10
push str.GlobalCTEventForDeviceArrivalNotification
push ebx
push 1
push ebx
call esi
push 1
push ebx
push 0xffff0001
xor ecx, ecx
mov dword [0x446ff0], eax
call fcn.00403160
mov edi, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
add esp, 0xc
cmp dword [0x446fec], ebx
jne 0x405dcf
mov eax, dword [0x443f20]
mov dword [0x449b94], eax
add eax, 1
mov dword [0x443f20], eax
mov eax, dword [0x449b60]
push 0x449b80
push eax
mov dword [0x449b88], ebx
mov dword [0x449b84], 2
mov dword [0x449b8c], ebx
mov dword [0x449b98], 0xbb8
call edi
cmp eax, ebx
jne 0x405dcf
mov edi, 0x43b7c0
call fcn.00406e30
jmp 0x406060
push ebx
push ebx
push 1
push ebx
call esi
cmp eax, ebx
mov dword [0x446fe0], eax
je 0x406070
cmp dword [0x446fec], ebx
mov dword [esp + 0x10], eax
jne 0x405e42
mov eax, dword [0x443f20]
mov ecx, dword [0x449b60]
mov dword [0x449b94], eax
push 0x449b80
add eax, 1
push ecx
mov dword [0x449b88], ebx
mov dword [0x449b84], 2
mov dword [0x449b8c], ebx
mov dword [0x449b98], 0xbb8
mov dword [0x443f20], eax
call edi
cmp eax, ebx
jne 0x405e42
mov edi, 0x43b7c0
call fcn.00406e30
jmp 0x406060
push ebx
push ebx
push 1
push ebx
call esi
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x406060
cmp dword [0x446fec], ebx
jne 0x405eb0
mov eax, dword [0x443f20]
mov edx, dword [0x449b60]
mov dword [0x449b94], eax
push 0x449b80
add eax, 1
push edx
mov dword [0x449b88], ebx
mov dword [0x449b84], 2
mov dword [0x449b8c], ebx
mov dword [0x449b98], 0xbb8
mov dword [0x443f20], eax
call edi
cmp eax, ebx
jne 0x405eb0
mov edi, 0x43b7c0
call fcn.00406e30
jmp 0x406060
push 0x14
call fcn.00421e36
mov esi, eax
add esp, 4
cmp esi, ebx
mov dword [esp + 0x2c], esi
je 0x406060
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x406060
lea eax, [esp + 0x34]
test eax, eax
mov dword [esp + 0x34], 0xc
mov dword [esp + 0x3c], 1
mov dword [esp + 0x38], esi
je 0x406090
push ebx
lea ecx, [esp + 0x3c]
push ecx
push 1
push str.D:_A_OICI_GRGWGX___BG__A_OICI_GRGWGX___AN__A_OICI_GRGWGX___AU__A_OICI_GA___BA_
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
cmp eax, ebx
je 0x406090
cmp dword [0x446fec], ebx
jne 0x405f6e
mov eax, dword [0x443f20]
mov edx, dword [0x449b60]
mov dword [0x449b94], eax
push 0x449b80
add eax, 1
push edx
mov dword [0x449b88], ebx
mov dword [0x449b84], 2
mov dword [0x449b8c], ebx
mov dword [0x449b98], 0xbb8
mov dword [0x443f20], eax
call edi
cmp eax, ebx
jne 0x405f6e
mov edi, 0x43b7c0
call fcn.00406e30
jmp 0x406060
mov eax, dword [ebp + 8]
mov esi, 1
add eax, 0xffffffff
cmp eax, esi
jbe 0x405fd8
lea edi, [esi + 1]
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + esi*4]
movzx eax, word [ecx]
cmp ax, 0x2d
je 0x405f96
cmp ax, 0x2f
jne 0x405fc2
add ecx, 2
push ecx
push str.pipe
call fcn.00421cc8
add esp, 8
test eax, eax
jne 0x405fc2
cmp edi, dword [ebp + 8]
jae 0x405fc2
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx + esi*4 + 4]
add esi, 1
add edi, 1
mov dword [esp + 0xc], edx
mov eax, dword [ebp + 8]
add esi, 1
add eax, 0xffffffff
add edi, 1
cmp esi, eax
jb 0x405f80
mov edi, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x34]
push eax
push 0x3e8
push ebx
push ebx
push 1
push 6
push 0x40000003
push ecx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40600b
mov edi, str.Unable_to_create_named_pipe
call fcn.00406e30
jmp 0x406060
cmp dword [0x446fec], ebx
jne 0x4060a5
mov edx, dword [0x449b60]
push 0x449b80
push edx
mov dword [0x449b88], 0x45
mov dword [0x449b84], 4
mov dword [0x449b8c], ebx
mov dword [0x449b98], ebx
mov dword [0x449b94], ebx
call edi
cmp eax, ebx
jne 0x4060a5
mov edi, 0x43b7c0
call fcn.00406e30
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x446fe0]
cmp eax, ebx
je 0x406070
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40607f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x406090
push eax
call fcn.00421d59
add esp, 4
mov ecx, dword [esp + 0x404c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004217dd
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x4060b0
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x14]
push eax
mov dword [esp + 0x2c], eax
call edi
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x406103
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x18]
push ecx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
jne 0x406059
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x14]
push eax
mov dword [esp + 0x2c], eax
call edi
push 0x2000
lea edx, [esp + 0x4c]
push ebx
push edx
call fcn.00422e90
add esp, 0xc
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x48]
push ecx
push 0x2000
lea edx, [esp + 0x54]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40617c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40617c
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
jne 0x406059
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x204c]
lea ecx, [esp + 0x4c]
mov dword [esp + 0x10], 0x2000
call fcn.00406280
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x18]
add esp, 4
push eax
mov dword [esp + 0x2c], eax
call edi
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x44]
push eax
push ecx
lea edx, [esp + 0x2054]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x406205
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x406205
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
jne 0x406059
push esi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x4060b0