Function at 0x1400a7194
Capabilities:
Read file on windows
Read pipe
Write pipe

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], r9
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
xor edi, edi
mov r13d, r8d
mov r12, r9
mov rsi, rdx
mov rbx, rcx
test rdx, rdx
je 0x1400a73dd
test r9, r9
je 0x1400a73dd
lea r15, [rcx + 0x48]
lea rax, [rcx + 0x708]
mov word [r15], di
mov qword [r9], rax
call fcn.1400a41a4
test al, al
je 0x1400a73dd
lea edx, [rdi + 0x30]
mov r8d, r13d
cmp r13, rdx
lea rcx, [rbx + 0x6d8]
cmova r8d, edx
test r8, r8
je 0x1400a723e
test rcx, rcx
jne 0x1400a721f
call fcn.140143b44
mov dword [rax], 0x16
call fcn.1401439f4
jmp 0x1400a7239
cmp r8, rdx
jbe 0x1400a7231
call fcn.140143b44
mov dword [rax], 0x22
jmp 0x1400a7218
mov rdx, rsi
call fcn.14013b6b0
mov edx, 0x30
mov r14, qword [rbx + 0x4a8]
mov dword [rbp + 0x48], edi
test r14, r14
je 0x1400a726c
mov rax, qword [rbx + 0x4b8]
cmp rax, rdx
jbe 0x1400a726c
mov ecx, 0xffffffff
mov qword [r12], r14
cmp rax, rcx
mov edx, eax
cmova edx, ecx
jmp 0x1400a7273
lea r14, [rbx + 0x708]
mov al, byte [rbx + 0x470]
lea r8, [rbx + 0x478]
neg al
mov r9, r14
lea rax, [rbp + 0x48]
sbb rcx, rcx
and rcx, r8
mov r8d, r13d
mov qword [rsp + 0x30], rcx
mov rcx, qword [rbx + 0x458]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], edx
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TransactNamedPipe]
test eax, eax
setne r12b
test eax, eax
je 0x1400a72be
mov eax, edi
jmp 0x1400a72c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x7530
mov dword [rbx + 0x4c0], eax
cmp byte [rbx + 0x470], dil
je 0x1400a735c
test r12b, r12b
jne 0x1400a73b1
cmp eax, 0x3e5
jne 0x1400a7361
mov rax, qword [rbx + 0x468]
mov rcx, qword [rbx + 0x490]
test rax, rax
je 0x1400a731d
xor r8d, r8d
mov qword [rbp - 0x20], rcx
mov r9d, edx
mov qword [rbp - 0x18], rax
lea rdx, [rbp - 0x20]
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
jmp 0x1400a7323
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x1400a7369
cmp eax, 1
je 0x1400a7369
mov rcx, qword [rbx + 0x458]
lea r8, [rbp + 0x48]
xor r9d, r9d
lea rdx, [rbx + 0x478]
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
setne r12b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x4c0], eax
test r12b, r12b
jne 0x1400a73b1
cmp eax, 0x6d
jne 0x1400a737d
mov dil, 1
lock inc dword [rbx + 0x4cc]
mov rcx, rbx
call fcn.14009d2d0
mov al, dil
jmp 0x1400a73df
cmp eax, 0xea
je 0x1400a73b1
mov edx, edi
cmp r13d, 0x30
jb 0x1400a738f
mov edx, dword [rsi + 0xc]
mov dword [rsp + 0x28], eax
lea r9, [rbx + 8]
mov dword [rsp + 0x20], edx
lea r8, str._s:_TransactNamedPipe_failed__Cmd_i__ErrCode_u_
mov edx, 0x208
mov rcx, r15
call fcn.140120394
jmp 0x1400a7369
mov ecx, dword [rbp + 0x48]
cmp ecx, 0x30
jae 0x1400a73f7
mov dword [rsp + 0x28], 0x30
lea r8, str._s:_Only__i_bytes_received__required__i_bytes_at_least_
mov dword [rsp + 0x20], ecx
lea r9, [rbx + 8]
mov edx, 0x208
mov rcx, r15
call fcn.140120394
xor al, al
mov rbx, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edx, dword [rsi + 0xc]
mov r8d, dword [rbx + 0x6e4]
cmp edx, r8d
je 0x1400a7418
mov dword [rsp + 0x28], r8d
lea r8, str._s:_Invalid_CmdID_i_received__required_CmdID_i_
mov dword [rsp + 0x20], edx
jmp 0x1400a73cc
mov edx, 0xaa
cmp dword [r14 + 4], edx
je 0x1400a7438
mov eax, dword [r14 + 0xc]
lea r8, str._s:_Old_version_packet_received___i___required___i__
mov dword [rsp + 0x28], edx
mov dword [rsp + 0x20], eax
jmp 0x1400a73cc
movsxd rsi, dword [r14]
cmp esi, ecx
jae 0x1400a7453
mov dword [rsp + 0x28], ecx
lea r8, str._s:_Invalid_packet_size___i___must_be_greater_or_equal_to__i_
mov dword [rsp + 0x20], esi
jmp 0x1400a73cc
cmp eax, 0xea
jne 0x1400a75dc
mov rax, qword [rbx + 0x4a8]
test rax, rax
je 0x1400a748b
cmp dword [rbx + 0x4b8], esi
jl 0x1400a748b
lea rdx, [rbx + 0x708]
cmp r14, rdx
jne 0x1400a74a8
mov r8, rcx
mov rcx, rax
call fcn.14013b6b0
jmp 0x1400a74a5
mov r9, rcx
mov rdx, rsi
mov rcx, rbx
mov r8, r14
call fcn.14009c1ec
test rax, rax
je 0x1400a73dd
mov ecx, dword [rbp + 0x48]
mov rdx, qword [rbp + 0x58]
sub esi, ecx
mov rax, qword [rbx + 0x4a8]
mov r14d, ecx
mov qword [rdx], rax
add r14, qword [rbx + 0x4a8]
test esi, esi
jle 0x1400a75cf
lea r13, [rbx + 0x478]
mov al, byte [rbx + 0x470]
lea r9, [rbp + 0x48]
neg al
mov r8d, esi
mov rdx, r14
sbb rcx, rcx
and rcx, r13
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbx + 0x458]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne r12b
test eax, eax
je 0x1400a7509
mov eax, edi
jmp 0x1400a750f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x4c0], eax
cmp byte [rbx + 0x470], dil
je 0x1400a75b2
test r12b, r12b
jne 0x1400a75be
cmp eax, 0x3e5
jne 0x1400a75b7
mov rax, qword [rbx + 0x468]
mov rcx, qword [rbx + 0x490]
test rax, rax
je 0x1400a756a
xor r8d, r8d
mov qword [rbp - 0x10], rcx
mov r9d, 0x7530
mov qword [rbp - 8], rax
lea rdx, [rbp - 0x10]
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
jmp 0x1400a7575
mov edx, 0x7530
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x1400a7369
cmp eax, 1
je 0x1400a7369
mov rcx, qword [rbx + 0x458]
lea r8, [rbp + 0x48]
xor r9d, r9d
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
setne r12b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x4c0], eax
test r12b, r12b
jne 0x1400a75be
cmp eax, 0xea
jne 0x1400a75e3
mov eax, dword [rbp + 0x48]
sub esi, dword [rbp + 0x48]
add r14, rax
test esi, esi
jg 0x1400a74d1
mov rcx, qword [rbx + 0x458]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov al, 1
jmp 0x1400a73df
test esi, esi
je 0x1400a75cf
lea r9, [rbx + 8]
mov dword [rsp + 0x20], esi
lea r8, str._s:_Cant_read__u_bytes_
mov edx, 0x208
mov rcx, r15
call fcn.140120394
jmp 0x1400a73dd