Function at 0x10016d30
Capabilities:
Check for time delay via queryperformancecounter
Read pipe
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10032e73
mov eax, dword fs:[0]
push eax
mov eax, 0x40c8
call fcn.10020a00
mov eax, dword [0x10047074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x40b0], ecx
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x40a8], eax
mov dword [ebp - 0x64], 0x3048302
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x60], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0xf
mov byte [ebp - 0x54], 0
push 0x10
lea eax, [ebp - 0x64]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x54]
call fcn.10017d20
cmp dword [esi + 0x14], 8
mov eax, dword [esi + 0x10]
jb 0x10016dc4
mov esi, dword [esi]
lea eax, [eax*2 + 2]
push eax
push esi
lea ecx, [ebp - 0x54]
call fcn.10017d20
mov edx, dword [str._dllver]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016de0
sub ecx, esi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
lea ecx, [ebp - 0x54]
call fcn.10017d20
lea eax, [ebp - 0x9c]
push eax
call fcn.100160d0
add esp, 4
cmp dword [ebp - 0x88], 8
lea edx, [ebp - 0x9c]
mov byte [ebp - 4], 1
cmovae edx, dword [ebp - 0x9c]
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016e30
sub ecx, esi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
lea ecx, [ebp - 0x54]
call fcn.10017d20
call fcn.1001fc58
push 0
push 0x2710
push edx
push eax
call fcn.10020830
xor ecx, ecx
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 7
mov word [ebp - 0x84], cx
push edx
push eax
lea eax, [ebp - 0x12]
mov byte [ebp - 4], 2
mov esi, 7
mov dword [ebp - 0x5c], ecx
push eax
mov dword [ebp - 0x58], esi
mov word [ebp - 0x6c], cx
call fcn.10015b80
lea ecx, [ebp - 0x12]
add esp, 0xc
cmp eax, ecx
je 0x10016eb3
sub ecx, eax
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x6c]
call fcn.100119c0
mov esi, dword [ebp - 0x58]
movups xmm0, xmmword [ebp - 0x6c]
mov edx, dword [str._sentFromExtensionTimestamp]
mov ecx, edx
movups xmmword [ebp - 0x84], xmm0
movq xmm0, qword [ebp - 0x5c]
lea edi, [ecx + 2]
movq qword [ebp - 0x74], xmm0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016ed3
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
lea ecx, [ebp - 0x54]
call fcn.10017d20
cmp esi, 8
lea edx, [ebp - 0x84]
cmovae edx, dword [ebp - 0x6c]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016f05
sub ecx, esi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
lea ecx, [ebp - 0x54]
call fcn.10017d20
mov esi, dword [ebp - 0x40b0]
xorps xmm0, xmm0
mov edi, dword [ebp - 0x40a8]
movlpd qword [ebp - 0x40c4], xmm0
movlpd qword [ebp - 0x40bc], xmm0
mov eax, dword [esi + 4]
mov dword [ebp - 0x40b4], eax
test edi, edi
je 0x10017109
push 0x4004
lea eax, [ebp - 0x40a0]
push 0
push eax
call fcn.100221c0
add esp, 0xc
mov dword [ebp - 0x40ac], 0
cmp dword [ebp - 0x40], 0x10
lea ecx, [ebp - 0x40c4]
lea eax, [ebp - 0x54]
cmovae eax, dword [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x40ac]
push ecx
push 0x4004
lea ecx, [ebp - 0x40a0]
push ecx
push dword [ebp - 0x44]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
test eax, eax
jne 0x10017020
lea eax, [ebp - 0x40cc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1001718d
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x40d4]
push eax
call edi
push 0x1388
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, eax
lea eax, [ebp - 0x5c]
push eax
call edi
test esi, esi
jne 0x10017187
mov ecx, dword [ebp - 0x40b0]
lea eax, [ebp - 0x40ac]
push esi
push eax
lea eax, [ebp - 0x40c4]
push eax
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x10017187
mov edi, dword [ebp - 0x40a8]
lea edx, [ebp - 0x409c]
lea esi, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10017030
sub edx, esi
lea eax, [ebp - 0x409c]
sar edx, 1
mov ecx, edi
push edx
push eax
call fcn.100119c0
mov byte [ebp - 0x40a1], 1
mov edx, dword [ebp - 0x70]
cmp edx, 8
jb 0x10017092
mov ecx, dword [ebp - 0x84]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10017088
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100171c6
push edx
push ecx
call fcn.100200a4
add esp, 8
mov edx, dword [ebp - 0x88]
cmp edx, 8
jb 0x100170d2
mov ecx, dword [ebp - 0x9c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100170c8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100171c6
push edx
push ecx
call fcn.100200a4
add esp, 8
mov edx, dword [ebp - 0x40]
cmp edx, 0x10
jb 0x100171a3
mov ecx, dword [ebp - 0x54]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10017199
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100171c6
jmp 0x10017199
cmp dword [ebp - 0x40], 0x10
lea ecx, [ebp - 0x40c4]
push ecx
lea ecx, [ebp - 0x40a8]
mov dword [ebp - 0x40a8], 0
push ecx
push dword [ebp - 0x44]
lea eax, [ebp - 0x54]
cmovae eax, dword [ebp - 0x54]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1001704e
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1001718d
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x40d4]
push eax
call edi
push 0x1388
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, eax
lea eax, [ebp - 0x40cc]
push eax
call edi
test esi, esi
je 0x1001704e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 0x40a1], 0
jmp 0x10017055
push edx
push ecx
call fcn.100200a4
add esp, 8
mov al, byte [ebp - 0x40a1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10020811
mov esp, ebp
pop ebp
ret 0xc
call fcn.10023a8f
int3