Function at 0x10021530
Capabilities:
Read pipe
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x10087004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x110], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x128], eax
mov eax, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x124], eax
mov eax, dword [ebp + 0x18]
push edi
mov dword [ebp - 0x120], eax
mov edi, edx
lea eax, [ebp - 0x108]
mov dword [ebp - 0x11c], ecx
push str..pipeK7TSMngrService1
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
xor ebx, ebx
add esp, 8
xor eax, eax
mov dword [ebp - 0x10c], ebx
test edi, edi
jle 0x100215ad
cmp dword [esi + eax*8], 0
je 0x100215a2
add ebx, dword [esi + eax*8 + 4]
inc eax
cmp eax, edi
jl 0x10021598
mov dword [ebp - 0x10c], ebx
mov eax, dword [ebp - 0x110]
add eax, 0x40
add eax, ebx
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x114], eax
test eax, eax
jne 0x100215e3
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10029e88
mov esp, ebp
pop ebp
ret
lea ecx, [eax + 0x1c]
mov dword [eax], 0x4b375453
add ecx, ebx
mov dword [eax + 4], 0x1010
mov dword [ebp - 0x118], ecx
mov ecx, dword [ebp - 0x11c]
mov dword [eax + 0x10], ecx
mov ecx, dword [ebp - 0x110]
mov dword [eax + 8], 0x1c
mov dword [eax + 0xc], 0
mov dword [eax + 0x14], ebx
mov dword [eax + 0x18], ecx
test ebx, ebx
je 0x10021653
lea ebx, [eax + 0x1c]
test edi, edi
jle 0x1002164d
add esi, 4
nop dword [eax]
mov eax, dword [esi - 4]
test eax, eax
je 0x10021645
push dword [esi]
push eax
push ebx
call fcn.1002b2f0
add esp, 0xc
add ebx, dword [esi]
add esi, 8
sub edi, 1
jne 0x10021630
mov ebx, dword [ebp - 0x10c]
push 0
call fcn.1004659e
add esp, 4
lea esi, [eax + 5]
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x100216de
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
je 0x100216a9
push 0
call fcn.1004659e
add esp, 4
cmp eax, esi
ja 0x1002170b
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x2710
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x10021683
push 0
push 0
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x11c], 2
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jne 0x1002171d
mov ebx, dword [ebp - 0x114]
xor esi, esi
jmp 0x100217d6
cmp edi, 0xffffffff
jne 0x100216de
mov ebx, dword [ebp - 0x114]
xor esi, esi
jmp 0x100217e2
push 0
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x10c], 0
push eax
mov eax, dword [ebp - 0x110]
add eax, 0x24
push eax
push dword [ebp - 0x118]
lea eax, [ebx + 0x1c]
mov ebx, dword [ebp - 0x114]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
test eax, eax
jne 0x1002175a
xor esi, esi
jmp 0x100217d6
mov ecx, dword [ebp - 0x10c]
cmp ecx, 0x24
jae 0x10021769
xor esi, esi
jmp 0x100217d6
mov edx, dword [ebp - 0x118]
mov eax, dword [edx + 0x1c]
test eax, eax
je 0x1002177a
xor esi, esi
jmp 0x100217ce
lea eax, [ecx - 0x24]
mov esi, 1
mov ecx, eax
mov dword [ebp - 0x10c], eax
cmp eax, dword [ebp - 0x110]
jbe 0x100217a0
mov ecx, dword [ebp - 0x110]
mov eax, ecx
mov dword [ebp - 0x10c], eax
mov ebx, dword [ebp - 0x124]
mov dword [ebx], eax
mov ebx, dword [ebp - 0x114]
test ecx, ecx
je 0x100217cb
push eax
lea eax, [edx + 0x24]
push eax
push dword [ebp - 0x128]
call fcn.1002b2f0
mov edx, dword [ebp - 0x118]
add esp, 0xc
mov eax, dword [edx + 0x20]
mov ecx, dword [ebp - 0x120]
mov dword [ecx], eax
cmp edi, 0xffffffff
je 0x100217e2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10029e88
mov esp, ebp
pop ebp
ret