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

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x570
lea rdi, [rsp + 0x30]
mov ecx, 0x150
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x580]
mov rax, qword [0x1402548e8]
xor rax, rsp
mov qword [rsp + 0x560], rax
cmp qword [rsp + 0x580], 0
je 0x1400413cf
mov qword [rsp + 0x550], 1
jmp 0x1400413db
mov qword [rsp + 0x550], 0
mov r9d, 0xe29
lea r8, [0x1401c54a0]
lea rdx, str.hPipe___NULL
mov rcx, qword [rsp + 0x550]
call fcn.14001a290
mov rcx, qword [rsp + 0x590]
call fcn.1400076c0
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0xffff
jle 0x1400414d9
mov rcx, qword [rsp + 0x590]
call fcn.1400075c0
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
lea rax, [rax + rcx - 0xffff]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
cmp qword [rsp + 0x38], rax
ja 0x14004147f
mov dx, 0xa
mov rcx, qword [rsp + 0x38]
call fcn.1400c4a30
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x14004146f
jmp 0x14004147f
mov rax, qword [rsp + 0x48]
add rax, 2
mov qword [rsp + 0x38], rax
jmp 0x140041446
mov rcx, qword [rsp + 0x590]
call fcn.1400075c0
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jg 0x1400414b3
mov rcx, qword [rsp + 0x590]
call fcn.140007560
jmp 0x1400414c7
mov r8, qword [rsp + 0x50]
xor edx, edx
mov rcx, qword [rsp + 0x590]
call fcn.140045600
mov rcx, qword [rsp + 0x590]
call fcn.1400076c0
mov qword [rsp + 0x30], rax
mov rcx, qword [rsp + 0x590]
call fcn.1400428f0
lea rcx, [rsp + 0x488]
call fcn.140044210
nop
mov qword [rsp + 0x4c8], 1
xor eax, eax
cmp eax, 1
je 0x1400415d7
mov dword [rsp + 0x4d4], 0
mov qword [rsp + 0x28], 0
lea rax, [rsp + 0x4d4]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x580]
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x140041557
mov qword [rsp + 0x4c8], 0
jmp 0x1400415d7
cmp dword [rsp + 0x4d4], 0
jne 0x140041563
jmp 0x1400415d7
mov dword [rsp + 0x4d4], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x4d4]
mov r8d, 0x400
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x580]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400415aa
mov qword [rsp + 0x4c8], 0
jmp 0x1400415d7
cmp dword [rsp + 0x4d4], 0
jne 0x1400415b6
jmp 0x1400415d7
mov eax, dword [rsp + 0x4d4]
mov r8d, eax
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x488]
call fcn.140045020
jmp 0x140041500
lea rcx, [rsp + 0x488]
call fcn.140019dd0
test rax, rax
jne 0x14004170d
xor edx, edx
lea rcx, [rsp + 0x488]
call fcn.140012950
lea rcx, [rsp + 0x4f8]
call fcn.140044210
nop
mov eax, dword [rsp + 0x588]
mov dword [rsp + 0x558], eax
cmp dword [rsp + 0x558], 0
je 0x14004162e
cmp dword [rsp + 0x558], 1
je 0x140041658
jmp 0x14004169b
lea rcx, [rsp + 0x488]
call fcn.1400075c0
xor r8d, r8d
lea rdx, [rsp + 0x4f8]
mov rcx, rax
call fcn.1400349e0
mov qword [rsp + 0x538], rax
jmp 0x1400416c5
lea rcx, [rsp + 0x488]
call fcn.1400075c0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x4f8]
mov rdx, 0xffffffffffffffff
mov rcx, rax
call fcn.140034200
mov qword [rsp + 0x538], rax
jmp 0x1400416c5
mov r9d, 0xe7c
lea r8, [0x1401c5510]
lea rdx, [0x1401c0b8c]
xor ecx, ecx
call fcn.14001a290
lea rax, [0x1401c06e4]
mov qword [rsp + 0x538], rax
mov rcx, qword [rsp + 0x538]
call fcn.14001a4e0
test rax, rax
jne 0x140041700
mov rcx, qword [rsp + 0x538]
call fcn.1400e1970
shl rax, 1
mov r8, rax
mov rdx, qword [rsp + 0x538]
mov rcx, qword [rsp + 0x590]
call fcn.140045020
nop
lea rcx, [rsp + 0x4f8]
call fcn.140006ab0
cmp qword [rsp + 0x598], 0
je 0x140041735
mov rcx, qword [rsp + 0x590]
call fcn.1400076c0
sub rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x598]
mov qword [rcx], rax
xor edx, edx
mov rcx, qword [rsp + 0x590]
call fcn.140042420
mov rax, qword [rsp + 0x4c8]
mov qword [rsp + 0x548], rax
lea rcx, [rsp + 0x488]
call fcn.140006ab0
mov rax, qword [rsp + 0x548]
mov rdi, rax
mov rcx, rsp
lea rdx, [0x1401cb0a0]
call fcn.1400bf760
mov rax, rdi
mov rcx, qword [rsp + 0x560]
xor rcx, rsp
call fcn.1400bfa50
add rsp, 0x570
pop rdi
ret