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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5c712b
mov eax, dword fs:[0]
push eax
sub esp, 0x940
mov eax, dword [0x656770]
xor eax, esp
mov dword [esp + 0x938], eax
push ebx
push esi
push edi
mov eax, dword [0x656770]
xor eax, esp
push eax
lea eax, [esp + 0x950]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x14], esi
sub esp, 0x18
mov ecx, esp
push 0x10
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push str.CCommWorker::Run
mov byte [ecx], 0
call fcn.004066b0
lea ecx, [esp + 0xa4]
call fcn.00401000
lea ecx, [eax + 0x18]
mov edx, str.Comm_Worker_Thread_Start
mov dword [esp + 0x958], 0
call fcn.00403a40
lea ecx, [esp + 0x8c]
mov dword [esp + 0x958], 0xffffffff
call fcn.00401130
push 0x7ff
lea eax, [esp + 0x149]
push 0
push eax
mov byte [esp + 0x150], 0
call fcn.00527890
add esp, 0xc
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x64
push dword [esi + 0x48]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x401a5b
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [esp + 0x74]
push 1
push eax
mov dword [esp + 0x28], 0xc
mov dword [esp + 0x30], 1
mov dword [esp + 0x2c], eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [esp + 0x20]
push eax
push 0
push 0x800
push 0x800
push 0xff
push 6
push 3
push str..pipe_ts_monitor_svc_3C08BC6F_F960_4c56_9C08_2C61CE7D106D
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401ad3
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40152a
call edi
xor ecx, ecx
cmp eax, 0x217
sete cl
cmp ecx, 1
jne 0x401875
push 0x800
lea eax, [esp + 0x148]
push 0
push eax
call fcn.00527890
add esp, 0xc
lea eax, [esp + 0x18]
push 0
push eax
push 0x800
lea eax, [esp + 0x150]
push eax
push ebx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401881
cmp dword [esp + 0x18], 0
jbe 0x401881
cmp byte [esp + 0x144], 0
mov dword [esp + 0x70], 0xf
mov dword [esp + 0x6c], 0
mov byte [esp + 0x5c], 0
jne 0x4015a2
xor ecx, ecx
jmp 0x4015b9
lea ecx, [esp + 0x144]
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4015b0
sub ecx, edx
push ecx
lea eax, [esp + 0x148]
push eax
lea ecx, [esp + 0x64]
call fcn.004066b0
mov dword [esp + 0x958], 9
push 2
push 0x632da8
lea ecx, [esp + 0x4c]
mov dword [esp + 0x60], 0xf
mov dword [esp + 0x5c], 0
mov byte [esp + 0x4c], 0
call fcn.004066b0
mov byte [esp + 0x958], 0xa
push 0x10
push str.CCommWorker::Run
lea ecx, [esp + 0x34]
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], 0
mov byte [esp + 0x34], 0
call fcn.004066b0
mov dword [esp + 0xa0], 0xf
mov dword [esp + 0x9c], 0
mov byte [esp + 0x8c], 0
sub esp, 8
lea ecx, [esp + 0xac]
mov byte [esp + 0x960], 0xc
call fcn.004028c0
mov edx, 0x632cfc
lea ecx, [esp + 0xa4]
mov byte [esp + 0x958], 0xd
call fcn.00403a40
lea edx, [esp + 0x2c]
lea ecx, [esp + 0xa4]
call fcn.00403d60
mov edx, str.___:
lea ecx, [esp + 0xa4]
call fcn.00403a40
cmp dword [esp + 0x40], 0x10
jb 0x4016aa
push dword [esp + 0x2c]
call fcn.00411632
add esp, 4
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
mov edx, str.PIPE_ReceiveData_:
lea ecx, [esp + 0xa4]
mov byte [esp + 0x958], 0xe
call fcn.00403a40
lea edx, [esp + 0x5c]
lea ecx, [esp + 0xa4]
call fcn.00403d60
lea ecx, [esp + 0x8c]
mov byte [esp + 0x958], 0xa
call fcn.00401130
sub esp, 0x18
mov ecx, esp
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x7c]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.00406300
mov ecx, esi
call fcn.00401b60
mov edx, 0x632da8
cmp al, 1
je 0x401735
mov edx, str.Fail
mov ecx, edx
lea esi, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401740
sub ecx, esi
push ecx
push edx
lea ecx, [esp + 0x4c]
call fcn.004066b0
cmp dword [esp + 0x58], 0x10
mov eax, dword [esp + 0x44]
jae 0x401763
lea eax, [esp + 0x44]
push 0
lea ecx, [esp + 0x20]
push ecx
push dword [esp + 0x5c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401808
call edi
sub esp, 0x18
mov ecx, esp
push 0x10
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push str.CCommWorker::Run
mov edi, eax
mov byte [ecx], 0
call fcn.004066b0
lea ecx, [esp + 0xa4]
call fcn.00401000
lea esi, [eax + 0x18]
mov edx, str.PIPE_Write_Fail_:
mov ecx, esi
mov byte [esp + 0x958], 0xf
call fcn.00403a40
mov edx, edi
lea ecx, [esp + 0x2c]
call fcn.0040b4e0
mov edx, eax
mov ecx, esi
mov byte [esp + 0x958], 0x10
call fcn.00403d60
cmp dword [esp + 0x40], 0x10
jb 0x4017f6
push dword [esp + 0x2c]
call fcn.00411632
add esp, 4
lea ecx, [esp + 0x8c]
call fcn.00401130
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
cmp dword [esp + 0x58], 0x10
jb 0x401829
push dword [esp + 0x44]
call fcn.00411632
add esp, 4
mov dword [esp + 0x958], 0xffffffff
cmp dword [esp + 0x70], 0x10
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], 0
mov byte [esp + 0x44], 0
jb 0x40185c
push dword [esp + 0x5c]
call fcn.00411632
add esp, 4
mov esi, dword [esp + 0x14]
mov dword [esp + 0x70], 0xf
mov dword [esp + 0x6c], 0
mov byte [esp + 0x5c], 0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401a40
call edi
push 0x10
push str.CCommWorker::Run
lea ecx, [esp + 0x34]
mov esi, eax
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], 0
mov byte [esp + 0x34], 0
call fcn.004066b0
mov dword [esp + 0x958], 4
mov dword [esp + 0xa0], 0xf
mov dword [esp + 0x9c], 0
mov byte [esp + 0x8c], 0
sub esp, 8
lea ecx, [esp + 0xac]
mov byte [esp + 0x960], 5
call fcn.004028c0
mov edx, 0x632cfc
lea ecx, [esp + 0xa4]
mov byte [esp + 0x958], 6
call fcn.00403a40
lea edx, [esp + 0x2c]
lea ecx, [esp + 0xa4]
call fcn.00403d60
mov edx, str.___:
lea ecx, [esp + 0xa4]
call fcn.00403a40
cmp dword [esp + 0x40], 0x10
jb 0x401937
push dword [esp + 0x2c]
call fcn.00411632
add esp, 4
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
mov edx, str.Comm_Worker_Thread_Start_:
lea ecx, [esp + 0xa4]
mov dword [esp + 0x958], 7
call fcn.00403a40
mov edx, esi
lea ecx, [esp + 0x74]
call fcn.0040b4e0
mov edx, eax
lea ecx, [esp + 0xa4]
mov byte [esp + 0x958], 8
call fcn.00403d60
cmp dword [esp + 0x88], 0x10
jb 0x40199f
push dword [esp + 0x74]
call fcn.00411632
add esp, 4
mov dword [esp + 0x958], 0xffffffff
mov eax, dword [esp + 0xa4]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0xa4], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [esp + 0xa4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [esp + ecx + 0xa0], eax
lea ecx, [esp + 0xa8]
call fcn.00402990
mov eax, dword [esp + 0xa4]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0xa4], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0xa4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [esp + ecx + 0xa0], eax
lea eax, [esp + 0xf4]
push eax
mov dword [esp + 0xf8], vtable.std::ios_base.0
call fcn.00545841
add esp, 4
cmp dword [esp + 0xa0], 0x10
jb 0x401a3c
push dword [esp + 0x8c]
call fcn.00411632
add esp, 4
mov esi, dword [esp + 0x14]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x64
push dword [esi + 0x48]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4014a3
sub esp, 0x18
mov ecx, esp
push 0x10
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push str.CCommWorker::Run
mov byte [ecx], 0
call fcn.004066b0
lea ecx, [esp + 0xa4]
call fcn.00401000
lea ecx, [eax + 0x18]
mov edx, str.Comm_Worker_Thread_Stop_Event
mov dword [esp + 0x958], 1
call fcn.00403a40
lea ecx, [esp + 0x8c]
call fcn.00401130
xor eax, eax
mov ecx, dword [esp + 0x950]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x938]
xor ecx, esp
call fcn.005259c3
mov esp, ebp
pop ebp
ret
call edi
sub esp, 0x18
mov ecx, esp
push 0x10
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push str.CCommWorker::Run
mov edi, eax
mov byte [ecx], 0
call fcn.004066b0
lea ecx, [esp + 0xa4]
call fcn.00401000
lea esi, [eax + 0x18]
mov edx, str.Comm_Worker_Thread_:_POP_Create_fail
mov ecx, esi
mov dword [esp + 0x958], 2
call fcn.00403a40
mov edx, edi
lea ecx, [esp + 0x2c]
call fcn.0040b4e0
mov edx, eax
mov ecx, esi
mov byte [esp + 0x958], 3
call fcn.00403d60
cmp dword [esp + 0x40], 0x10
jb 0x401aa1
push dword [esp + 0x2c]
call fcn.00411632
add esp, 4
jmp 0x401aa1