Function at 0x140001000
Capabilities:
Check for time delay via gettickcount
Print debug messages
Read file on windows
Read pipe
Write file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
mov eax, 0x82a0
call fcn.140010d80
sub rsp, rax
mov dword [rsp + 0x40], 0
mov eax, dword [rsp + 0x82c0]
add rax, 0x14
cmp rax, 0x4000
ja 0x140001413
mov r8d, 0x4000
xor edx, edx
lea rcx, [rsp + 0x4070]
call fcn.140002a80
lea r11, [rsp + 0x4070]
mov qword [rsp + 0x4060], r11
mov ecx, 0xdada
mov rax, qword [rsp + 0x4060]
mov word [rax], cx
mov ecx, 0x14
mov rax, qword [rsp + 0x4060]
mov word [rax + 2], cx
lea rax, [0x140019540]
mov ecx, 1
lock xadd dword [rax], ecx
add ecx, 1
mov rax, qword [rsp + 0x4060]
mov word [rax + 4], cx
mov rax, qword [rsp + 0x4060]
mov dword [rax + 0xc], 1
mov rax, qword [rsp + 0x4060]
mov dword [rax + 8], 0
mov rcx, qword [rsp + 0x4060]
movzx eax, word [rsp + 0x82c0]
mov word [rcx + 6], ax
mov rax, qword [rsp + 0x4060]
mov dword [rax + 0x10], 0
mov rax, qword [rsp + 0x4060]
add rax, 0x14
mov qword [rsp + 0x50], rax
mov r8d, dword [rsp + 0x82c0]
mov rdx, qword [rsp + 0x82b8]
mov rcx, qword [rsp + 0x50]
call fcn.140002730
mov r8d, 0x4000
xor edx, edx
lea rcx, [rsp + 0x60]
call fcn.140002a80
mov dword [rsp + 0x4068], 0
mov qword [rsp + 0x48], 0xffffffffffffffff
mov edx, 0x3a98
mov rcx, qword [rsp + 0x82b0]
call qword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x140001186
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, qword [rsp + 0x82b0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x140001190
jmp 0x1400011c3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x8070], eax
cmp dword [rsp + 0x8070], 0xe7
jne 0x1400011ac
jmp 0x140001138
mov ecx, dword [rsp + 0x8070]
call fcn.140002620
mov dword [rsp + 0x40], eax
jmp 0x1400011c3
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x1400012f4
mov dword [rsp + 0x8074], 0x4000
mov dword [rsp + 0x8078], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x8078]
mov r8d, dword [rsp + 0x8074]
lea rdx, [rsp + 0x4070]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rsp + 0x8078]
cmp dword [rsp + 0x8074], eax
je 0x140001229
mov dword [rsp + 0x40], 0x80004005
cmp dword [rsp + 0x40], 0
jl 0x1400012e9
mov dword [rsp + 0x8074], 0x4000
mov dword [rsp + 0x8078], 0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0x807c], eax
cmp dword [rsp + 0x8078], 0
jne 0x1400012ab
mov eax, dword [rsp + 0x82e0]
mov ebx, dword [rsp + 0x807c]
add ebx, eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp ebx, eax
jbe 0x1400012ab
mov qword [rsp + 0x28], 0
lea rax, [rsp + 0x8078]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, dword [rsp + 0x8074]
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
jmp 0x140001257
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x4068]
mov r8d, dword [rsp + 0x8074]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400012e9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140002620
mov dword [rsp + 0x40], eax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x40], 0
jge 0x140001341
lea rax, str.SendMessageReceiveReply
mov qword [rsp + 0x8080], rax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x8080]
lea r8, str._s:_Cannot_Send_Request___Recive_Reply._Error_code__08.8Xh_n_n
mov edx, 0x200
lea rcx, [rsp + 0x8090]
call fcn.140002480
lea rcx, [rsp + 0x8090]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [rsp + 0x40], 0
jl 0x14000135d
mov eax, dword [rsp + 0x4068]
cmp rax, 0x14
jae 0x14000135d
mov dword [rsp + 0x40], 0x80004005
cmp dword [rsp + 0x40], 0
jl 0x140001411
lea rax, [rsp + 0x60]
mov qword [rsp + 0x8290], rax
mov rax, qword [rsp + 0x8290]
movzx eax, word [rax + 6]
cmp eax, dword [rsp + 0x82d0]
jbe 0x140001398
mov ecx, 0x6f
call fcn.140002620
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jne 0x1400013ae
mov rax, qword [rsp + 0x8290]
mov eax, dword [rax + 0x10]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jl 0x140001411
mov rax, qword [rsp + 0x8290]
movzx eax, word [rax + 6]
test eax, eax
je 0x140001411
mov rax, qword [rsp + 0x8290]
movzx r8d, word [rax + 6]
mov rax, qword [rsp + 0x8290]
movzx eax, word [rax + 2]
lea rdx, [rsp + rax + 0x60]
mov rcx, qword [rsp + 0x82c8]
call fcn.140002730
cmp qword [rsp + 0x82d8], 0
je 0x140001411
mov rax, qword [rsp + 0x8290]
movzx ecx, word [rax + 6]
mov rax, qword [rsp + 0x82d8]
mov dword [rax], ecx
jmp 0x14000141b
mov dword [rsp + 0x40], 0x80070057
mov eax, dword [rsp + 0x40]
add rsp, 0x82a0
pop rbx
ret