Function at 0x14009e56c
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, 0x70
xor edi, edi
mov r13d, r8d
mov r12, r9
mov rsi, rdx
mov rbx, rcx
test rdx, rdx
je 0x14009e7c5
test r9, r9
je 0x14009e7c5
lea r15, [rcx + 0x48]
lea rax, [rcx + 0x708]
mov word [r15], di
mov qword [r9], rax
call fcn.14009b718
test al, al
je 0x14009e7c5
mov qword [rbp - 0x30], 0x30
mov r8d, r13d
mov qword [rbp - 0x28], r13
lea rcx, [rbx + 0x6d8]
cmp r13, 0x30
jbe 0x14009e5e9
lea r8d, [rdi + 0x30]
jmp 0x14009e5ee
test r13d, r13d
je 0x14009e620
test rcx, rcx
jne 0x14009e605
call fcn.140135c60
mov dword [rax], 0x16
call fcn.140135b10
jmp 0x14009e620
cmp r8, 0x30
jbe 0x14009e618
call fcn.140135c60
mov dword [rax], 0x22
jmp 0x14009e5fe
mov rdx, rsi
call fcn.14012d940
mov r14, qword [rbx + 0x4a8]
mov dword [rbp + 0x48], edi
test r14, r14
je 0x14009e64e
mov rax, qword [rbx + 0x4b8]
cmp rax, 0x30
jbe 0x14009e64e
mov edx, 0xffffffff
cmp rax, rdx
ja 0x14009e648
mov edx, eax
mov qword [r12], r14
jmp 0x14009e65a
lea r14, [rbx + 0x708]
mov edx, 0x30
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 0x14009e6a5
mov eax, edi
jmp 0x14009e6ab
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x7530
mov dword [rbx + 0x4c0], eax
cmp byte [rbx + 0x470], dil
je 0x14009e743
test r12b, r12b
jne 0x14009e799
cmp eax, 0x3e5
jne 0x14009e748
mov rax, qword [rbx + 0x468]
mov rcx, qword [rbx + 0x490]
test rax, rax
je 0x14009e704
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 0x14009e70a
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x14009e750
cmp eax, 1
je 0x14009e750
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 0x14009e799
cmp eax, 0x6d
jne 0x14009e765
mov dil, 1
lock inc dword [rbx + 0x4cc]
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + 0x10]
mov al, dil
jmp 0x14009e7c7
cmp eax, 0xea
je 0x14009e799
mov edx, edi
cmp r13d, 0x30
jb 0x14009e777
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.1401140d0
jmp 0x14009e750
mov ecx, dword [rbp + 0x48]
cmp ecx, 0x30
jae 0x14009e7df
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.1401140d0
xor al, al
mov rbx, qword [rsp + 0xb0]
add rsp, 0x70
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 0x14009e800
mov dword [rsp + 0x28], r8d
lea r8, str._s:_Invalid_CmdID_i_received__required_CmdID_i_
mov dword [rsp + 0x20], edx
jmp 0x14009e7b4
mov edx, 0xa7
cmp dword [r14 + 4], edx
je 0x14009e820
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 0x14009e7b4
movsxd rsi, dword [r14]
cmp esi, ecx
jae 0x14009e83b
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 0x14009e7b4
cmp eax, 0xea
jne 0x14009e9c4
mov rax, qword [rbx + 0x4a8]
test rax, rax
je 0x14009e873
cmp dword [rbx + 0x4b8], esi
jl 0x14009e873
lea rdx, [rbx + 0x708]
cmp r14, rdx
jne 0x14009e890
mov r8, rcx
mov rcx, rax
call fcn.14012d940
jmp 0x14009e88d
mov r9, rcx
mov rdx, rsi
mov rcx, rbx
mov r8, r14
call fcn.140093d44
test rax, rax
je 0x14009e7c5
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 0x14009e9b7
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 0x14009e8f1
mov eax, edi
jmp 0x14009e8f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x4c0], eax
cmp byte [rbx + 0x470], dil
je 0x14009e99a
test r12b, r12b
jne 0x14009e9a6
cmp eax, 0x3e5
jne 0x14009e99f
mov rax, qword [rbx + 0x468]
mov rcx, qword [rbx + 0x490]
test rax, rax
je 0x14009e952
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 0x14009e95d
mov edx, 0x7530
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x14009e750
cmp eax, 1
je 0x14009e750
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 0x14009e9a6
cmp eax, 0xea
jne 0x14009e9cb
mov eax, dword [rbp + 0x48]
sub esi, dword [rbp + 0x48]
add r14, rax
test esi, esi
jg 0x14009e8b9
mov rcx, qword [rbx + 0x458]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov al, 1
jmp 0x14009e7c7
test esi, esi
je 0x14009e9b7
lfence
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.1401140d0
jmp 0x14009e7c5