Function at 0x140021eb0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov r11, rsp
push rbp
push rsi
lea rbp, [r11 - 0x68]
sub rsp, 0x158
mov rax, qword [0x140070010]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov rax, qword [rcx]
mov rsi, rcx
movzx edx, byte [rax]
test dl, dl
je 0x14002202c
mov qword [r11 + 0x10], rdi
lea rax, str.StartListenPipe...
mov edi, dword [rbp + 0x14]
mov qword [r11 + 0x18], r12
lea r12, [0x140075bf0]
mov qword [r11 - 0x18], r13
lea r13, str.ReplyToApp_error_io_pending...
mov qword [r11 - 0x20], r14
xor r14d, r14d
mov qword [r11 - 0x28], r15
lea r15, [0x140070c60]
movaps xmmword [r11 - 0x38], xmm6
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 0x12
movaps xmm6, xmmword [rsp + 0x30]
mov qword [r11 + 8], rbx
call fcn.1400078c0
mov qword [rsp + 0x48], r14
lea r9, [rsp + 0x30]
mov qword [rsp + 0x40], r14
lea rdx, [rbp - 0x50]
movups xmm0, xmmword [rsp + 0x40]
mov rcx, qword [rax + 0x1d8]
mov r8d, 2
mov qword [rsp + 0x50], r14
movsd xmm1, qword [rsp + 0x50]
movaps xmmword [rbp - 0x50], xmm0
movdqa xmmword [rsp + 0x30], xmm6
movsd qword [rbp - 0x40], xmm1
call fcn.140005330
mov rcx, qword [0x140075c28]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [0x140075c24], r14d
je 0x14002215f
mov rcx, qword [0x140075c10]
lea r8, [rbp + 0x10]
xor r9d, r9d
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov ecx, dword [0x140075c20]
mov edx, ecx
test ecx, ecx
je 0x14002214a
sub edx, 1
je 0x140022042
cmp edx, 1
jne 0x140022165
test eax, eax
je 0x140021fe1
mov eax, dword [0x140075c1c]
cmp dword [rbp + 0x10], eax
je 0x140022152
call fcn.140026160
mov rax, qword [rsi]
movzx ecx, byte [rax]
test cl, cl
jne 0x140021f31
movaps xmm6, xmmword [rsp + 0x130]
mov r15, qword [rsp + 0x140]
mov r14, qword [rsp + 0x148]
mov r13, qword [rsp + 0x150]
mov r12, qword [rsp + 0x180]
mov rdi, qword [rsp + 0x178]
mov rbx, qword [rsp + 0x170]
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.140026300
add rsp, 0x158
pop rsi
pop rbp
ret
test eax, eax
je 0x140021fe1
mov eax, dword [rbp + 0x10]
test eax, eax
je 0x140021fe1
cmp eax, 4
jne 0x140022165
mov edi, dword [0x140075c18]
mov ecx, edi
call fcn.140022520
call fcn.1400078c0
lea rcx, str.ReplyToApp...
mov qword [rbp - 0x68], 0xd
mov qword [rbp - 0x70], rcx
lea r9, [rsp + 0x30]
movaps xmm0, xmmword [rbp - 0x70]
lea rdx, [rbp - 0x30]
mov rcx, qword [rax + 0x1d8]
mov r8d, 2
movdqa xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], r14
movups xmm1, xmmword [rsp + 0x58]
mov qword [rsp + 0x68], r14
movsd xmm0, qword [rsp + 0x68]
movsd qword [rbp - 0x20], xmm0
movaps xmmword [rbp - 0x30], xmm1
call fcn.140005330
mov rax, 0xffffffffffffffff
nop word [rax + rax]
cmp word [r15 + rax*2 + 2], r14w
lea rax, [rax + 1]
jne 0x1400220d0
mov rcx, qword [0x140075c10]
lea r8d, [rax*2 + 2]
lea r9, [rbp + 0x14]
mov dword [0x140075c1c], r8d
mov rdx, r15
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
test eax, eax
je 0x1400221cf
mov ecx, dword [0x140075c1c]
cmp dword [rbp + 0x14], ecx
jne 0x1400221cf
call fcn.1400078c0
lea r8, str.ReplyToApp_success...
mov edx, 1
mov rcx, qword [rax + 0x1d8]
call fcn.140023940
mov qword [0x140075c20], 1
jmp 0x140021fe6
test eax, eax
je 0x140021fe6
mov ecx, 1
mov dword [0x140075c20], ecx
jmp 0x140022165
mov ecx, dword [0x140075c20]
cmp ecx, 1
jne 0x14002205c
lea r8d, [rcx + 3]
mov qword [rsp + 0x20], r12
mov rcx, qword [0x140075c10]
lea r9, [rbp + 0x18]
lea rdx, [0x140075c18]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
test eax, eax
je 0x1400221a7
cmp dword [rbp + 0x18], r14d
je 0x1400221a7
mov dword [0x140075c24], r14d
jmp 0x140022056
call qword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x140021fe1
cmp eax, 0x3e5
jne 0x140021fe1
mov dword [0x140075c24], 1
jmp 0x140021fe6
call qword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x140021fe1
cmp eax, 0x3e5
jne 0x140021fe1
call fcn.1400078c0
mov qword [rbp - 0x60], r13
lea r9, [rsp + 0x30]
mov qword [rbp - 0x58], 0x1e
lea r8d, [rbx + 1]
movaps xmm0, xmmword [rbp - 0x60]
lea rdx, [rbp - 0x10]
mov rcx, qword [rax + 0x1d8]
movdqa xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x78], r14
mov qword [rsp + 0x70], r14
movups xmm1, xmmword [rsp + 0x70]
mov qword [rbp - 0x80], r14
movsd xmm0, qword [rbp - 0x80]
movsd qword [rbp], xmm0
movaps xmmword [rbp - 0x10], xmm1
call fcn.140005330
mov dword [0x140075c24], 1
jmp 0x140021fe6