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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10032593
mov eax, dword fs:[0]
push eax
mov eax, 0x40c8
call fcn.100201a0
mov eax, dword [0x10046074]
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.100174a0
cmp dword [esi + 0x14], 8
mov eax, dword [esi + 0x10]
jb 0x10016544
mov esi, dword [esi]
lea eax, [eax*2 + 2]
push eax
push esi
lea ecx, [ebp - 0x54]
call fcn.100174a0
mov edx, dword [str._dllver]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016560
sub ecx, esi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
lea ecx, [ebp - 0x54]
call fcn.100174a0
lea eax, [ebp - 0x9c]
push eax
call fcn.10015850
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 0x100165b0
sub ecx, esi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
lea ecx, [ebp - 0x54]
call fcn.100174a0
call fcn.1001f3f8
push 0
push 0x2710
push edx
push eax
call fcn.1001ffd0
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.10015300
lea ecx, [ebp - 0x12]
add esp, 0xc
cmp eax, ecx
je 0x10016633
sub ecx, eax
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x6c]
call fcn.10011140
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 0x10016653
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
lea ecx, [ebp - 0x54]
call fcn.100174a0
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 0x10016685
sub ecx, esi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
lea ecx, [ebp - 0x54]
call fcn.100174a0
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 0x10016889
push 0x4004
lea eax, [ebp - 0x40a0]
push 0
push eax
call fcn.10021960
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 0x100167a0
lea eax, [ebp - 0x40cc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1001690d
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 0x10016907
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 0x10016907
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 0x100167b0
sub edx, esi
lea eax, [ebp - 0x409c]
sar edx, 1
mov ecx, edi
push edx
push eax
call fcn.10011140
mov byte [ebp - 0x40a1], 1
mov edx, dword [ebp - 0x70]
cmp edx, 8
jb 0x10016812
mov ecx, dword [ebp - 0x84]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10016808
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016946
push edx
push ecx
call fcn.1001f844
add esp, 8
mov edx, dword [ebp - 0x88]
cmp edx, 8
jb 0x10016852
mov ecx, dword [ebp - 0x9c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10016848
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016946
push edx
push ecx
call fcn.1001f844
add esp, 8
mov edx, dword [ebp - 0x40]
cmp edx, 0x10
jb 0x10016923
mov ecx, dword [ebp - 0x54]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10016919
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016946
jmp 0x10016919
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 0x100167ce
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1001690d
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 0x100167ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 0x40a1], 0
jmp 0x100167d5
push edx
push ecx
call fcn.1001f844
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.1001ffb1
mov esp, ebp
pop ebp
ret 0xc
call fcn.1002322f
int3