Function at 0x1400178a0
Capabilities:
Read file on windows
Read pipe

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x440]
sub rsp, 0x540
mov rax, qword [0x14006b020]
xor rax, rsp
mov qword [rbp + 0x430], rax
mov rdi, r9
mov qword [rsp + 0x40], r9
mov rsi, rdx
mov qword [rsp + 0x38], rdx
mov rax, qword [rbp + 0x4a0]
mov qword [rsp + 0x48], rax
lea r15, vtable.CTracePie.0
mov qword [rsp + 0x70], r15
xor r14d, r14d
mov qword [rbp + 0x18], r14
mov word [rbp + 0x20], 0x100
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [rbp + 0x18], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rbp + 0x1c], eax
lea r9d, [r14 + 0x2c]
lea r8, str.OsExecute::ReadOutput
lea edx, [r14 + 0x78]
lea rcx, [rsp + 0x78]
call fcn.1400133b0
lea r9d, [r14 + 0x16]
lea r8, str.PIE_Common
lea edx, [r14 + 0x28]
lea rcx, [rbp - 0x10]
call fcn.1400133b0
cmp byte [rbp + 0x21], 1
jne 0x140017963
lea r8, [0x14005a24c]
lea edx, [r14 + 5]
lea rcx, [rsp + 0x70]
call fcn.1400134a0
lea rax, vtable.CTracePieCommon.0
mov qword [rsp + 0x70], rax
call fcn.1400014e0
mov rcx, rax
test rax, rax
je 0x140017cb6
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
call qword [0x140046408]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x60], rbx
mov r13, 0xffffffffffffffff
nop dword [rax]
mov edx, 0x32
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1400179bd
cmp eax, 0x102
jne 0x140017c27
cmp eax, 0x102
setne byte [rsp + 0x30]
mov dword [rsp + 0x54], r14d
mov dword [rsp + 0x50], r14d
mov qword [rsp + 0x28], r14
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x140017b3d
nop dword [rax]
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x140017b38
cmp eax, 0x3ff
jbe 0x140017a18
mov eax, 0x3ff
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x54]
mov r8d, eax
lea rdx, [rbp + 0x30]
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140017b38
mov eax, dword [rsp + 0x54]
test eax, eax
je 0x140017b38
cmp rax, 0x400
jae 0x140017cb0
mov byte [rbp + rax + 0x30], 0
lea rcx, [rbp + 0x30]
mov rax, r13
nop
inc rax
cmp byte [rcx + rax], 0
jne 0x140017a60
lea r12, [rbp + 0x30]
lea r15, [rbp + 0x30]
sub r15, rbx
mov esi, dword [rbx - 0x10]
test eax, eax
js 0x140017ca5
movsxd rdx, eax
lea rcx, [rbp + 0x30]
call fcn.14002c844
mov r14, rax
mov ecx, 0x7fffffff
sub ecx, eax
cmp ecx, esi
jl 0x140017ca5
lea edi, [rsi + rax]
test edi, edi
js 0x140017ca5
lfence
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140017acb
lfence
mov edx, edi
lea rcx, [rsp + 0x60]
call fcn.140018230
mov rbx, qword [rsp + 0x60]
cmp r15, rsi
ja 0x140017ad9
lea r12, [r15 + rbx]
movsxd rdx, r14d
lea rcx, [rsi + rbx]
mov r9d, r14d
mov r8, r12
call fcn.1400181a0
cmp edi, dword [rbx - 0xc]
jg 0x140017ca5
mov dword [rbx - 0x10], edi
movsxd rax, edi
mov byte [rax + rbx], 0
xor r14d, r14d
mov dword [rsp + 0x54], r14d
mov dword [rsp + 0x50], r14d
mov qword [rsp + 0x28], r14
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rdi, qword [rsp + 0x40]
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x140017a00
mov rsi, qword [rsp + 0x38]
cmp byte [rsp + 0x30], 0
je 0x1400179a0
mov qword [rsp + 0x58], r14
mov rdx, rbx
lea rcx, [rsp + 0x58]
call fcn.140018020
nop
mov rdx, qword [rsp + 0x58]
mov r8, r13
inc r8
cmp word [rdx + r8*2], 0
jne 0x140017b63
mov rcx, qword [rsp + 0x48]
call fcn.140009ed0
nop
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140017ba3
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140046408]
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r13d
sub r13d, 1
jg 0x140017bcc
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140046408]
nop
lea rax, vtable.CTracePie.0
mov qword [rsp + 0x70], rax
cmp byte [rbp + 0x21], 1
jne 0x140017bfb
cmp byte [rbp + 0x20], 0
jne 0x140017bfb
lea r8, [0x14005a254]
mov edx, 5
lea rcx, [rsp + 0x70]
call fcn.1400134a0
nop
xor eax, eax
mov rcx, qword [rbp + 0x430]
xor rcx, rsp
call fcn.1400223c0
mov rbx, qword [rsp + 0x580]
add rsp, 0x540
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov r9d, eax
lea r8, str.WaitForSingleObject_failed__errorCode___d
mov edx, 2
lea rcx, [rsp + 0x70]
call fcn.1400134a0
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r13d
sub r13d, 1
jg 0x140017c6c
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140046408]
nop
lea rax, vtable.CTracePie.0
mov qword [rsp + 0x70], rax
cmp byte [rbp + 0x21], 1
jne 0x140017c9b
cmp byte [rbp + 0x20], 0
jne 0x140017c9b
lea r8, [0x14005a254]
mov edx, 5
lea rcx, [rsp + 0x70]
call fcn.1400134a0
nop
mov eax, 0x1f
jmp 0x140017bfd
mov ecx, 0x80070057
call fcn.1400013c0
int3
call fcn.140022cd4
nop
mov ecx, 0x80004005
call fcn.1400013c0
int3