Function at 0x408140
Capabilities:
Read pipe
Write pipe

Disassembly:
sub esp, 0x11c
mov eax, dword [0x41a07c]
xor eax, esp
mov dword [esp + 0x118], eax
mov eax, dword [esp + 0x124]
push ebx
push ebp
push esi
push edi
mov esi, ecx
lea ecx, [esp + 0x24]
push str..pipeK7TSMngrService1
push ecx
mov dword [esp + 0x20], eax
call dword [sym.imp.USER32.dll_wsprintfA]
xor ebx, ebx
xor ebp, ebp
add esp, 8
mov dword [esp + 0x10], ebp
cmp dword [esi], ebx
je 0x40818d
mov edx, dword [esi + 4]
mov dword [esp + 0x10], edx
mov ebp, edx
lea eax, [ebp + 0x40]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
cmp edi, ebx
jne 0x4081ac
xor eax, eax
jmp 0x408346
mov ecx, dword [esp + 0x130]
mov dword [edi], 0x4b375453
mov dword [edi + 4], 0x1010
mov dword [edi + 8], 0x1c
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], ebp
mov dword [edi + 0x18], ebx
cmp ebp, ebx
je 0x4081ee
mov eax, dword [esi]
lea ecx, [edi + 0x1c]
cmp eax, ebx
je 0x4081ee
mov edx, dword [esi + 4]
push edx
push eax
push ecx
call fcn.0040d270
add esp, 0xc
push ebx
call fcn.00409afb
add esp, 4
push ebx
push ebx
push 3
push ebx
add eax, 5
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x34], eax
push 0xc0000000
lea eax, [esp + 0x3c]
push eax
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x40827c
mov ebp, dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
je 0x40824f
push 0
call fcn.00409afb
add esp, 4
cmp eax, dword [esp + 0x20]
ja 0x4082c5
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x2710
lea ecx, [esp + 0x28]
push ecx
call ebp
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea edx, [esp + 0x3c]
push edx
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x408223
mov ebp, dword [esp + 0x10]
xor ebx, ebx
push ebx
push ebx
lea eax, [esp + 0x24]
push eax
push esi
mov dword [esp + 0x2c], 2
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
je 0x408328
push ebx
lea ecx, [esp + 0x18]
push ecx
push 0x24
mov dword [esp + 0x20], ebx
lea ebx, [edi + ebp + 0x1c]
push ebx
add ebp, 0x1c
push ebp
push edi
push esi
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
test eax, eax
jne 0x4082ce
xor ebx, ebx
jmp 0x408328
cmp esi, 0xffffffff
jne 0x408278
xor ebx, ebx
jmp 0x408334
mov ecx, dword [esp + 0x14]
cmp ecx, 0x24
jae 0x4082db
xor ebx, ebx
jmp 0x408328
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x4082ec
mov edx, dword [esp + 0x18]
xor ebx, ebx
mov dword [edx], eax
jmp 0x408328
sub ecx, 0x24
mov ebx, 1
mov dword [esp + 0x14], ecx
je 0x408304
mov dword [esp + 0x14], 0
jmp 0x40831b
test ecx, ecx
je 0x40831b
mov eax, dword [esp + 0x10]
push ecx
add eax, 0x24
push eax
push 0
call fcn.0040d270
add esp, 0xc
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x20]
mov eax, dword [esp + 0x18]
mov dword [eax], edx
cmp esi, 0xffffffff
je 0x408334
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
mov ecx, dword [esp + 0x128]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00408c7e
add esp, 0x11c
ret