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

Disassembly:
mov r11, rsp
push r12
push r13
push r14
sub rsp, 0x80
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
mov r12d, r9d
mov r13, r8
xor r14d, r14d
mov eax, dword [0x129abb74]
test eax, eax
je 0x12823cc5
mov eax, dword [0x129abb78]
mov eax, 1
xchg dword [0x129abb78], eax
mov ebp, 0xc0000001
mov rbx, r14
mov qword [rsp + 0x40], rbx
mov dword [r11 - 0x40], r14d
xor eax, eax
mov dword [rsp + 0x5c], eax
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x64], eax
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x6c], eax
mov dword [rsp + 0x70], eax
mov dword [r11 - 0x64], r14d
mov qword [r11 - 0x78], r14
lea r9, [r11 - 0x64]
lea r8d, [r14 + 0x1c]
lea rdx, [r11 - 0x40]
mov rcx, qword [0x129abb60]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
je 0x12823cb9
mov dword [rsp + 0x38], r14d
mov dword [rsp + 0x30], r14d
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [0x129abb60]
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
je 0x12823cb9
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x12823cb9
nop dword [rax]
cmp dword [rsp + 0x58], 0x1c
jne 0x12823c53
mov ecx, dword [rsp + 0x60]
cmp ecx, 0x1c
jb 0x12823c53
lea rdx, [rcx - 0x1c]
cmp rdx, rax
ja 0x12823c53
call fcn.12958238
mov rsi, rax
cmp rax, rbx
je 0x12823baa
mov rcx, rbx
call fcn.12958250
mov rbx, rsi
mov qword [rsp + 0x40], rbx
test rsi, rsi
jne 0x12823bc4
mov eax, dword [rsp + 0x30]
test eax, eax
jne 0x12823b70
jmp 0x12823cb9
mov r8d, dword [rsp + 0x60]
add r8d, 0xffffffe4
lea rcx, [rsp + 0x58]
mov rax, qword [rcx]
mov qword [rsi], rax
mov rax, qword [rcx + 8]
mov qword [rsi + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rsi + 0x10], rax
mov eax, dword [rcx + 0x18]
mov dword [rsi + 0x18], eax
lea rdx, [rsi + 0x1c]
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x34]
mov rcx, qword [0x129abb60]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
je 0x12823cb9
mov eax, dword [rsp + 0x34]
sub dword [rsp + 0x30], eax
mov eax, dword [rsi + 0xc]
cmp eax, r12d
ja 0x12823c4c
cmp dword [rsi + 0x14], 1
jne 0x12823c47
test eax, eax
je 0x12823c42
mov r8, rax
lea rdx, [rsi + 0x18]
mov rcx, r13
call fcn.12959240
mov ebp, dword [rsi + 4]
jmp 0x12823cb9
mov ebp, dword [rsi + 4]
jmp 0x12823cb9
mov ebp, 0xc0000023
jmp 0x12823cb9
lea rcx, [r12 + 0x1c]
call fcn.12958238
mov rsi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x12823cb0
cmp dword [rsp + 0x30], 0
jbe 0x12823cb0
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x34]
lea r8d, [r12 + 0x1c]
mov rdx, rsi
mov rcx, qword [0x129abb60]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
je 0x12823cb0
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x34]
cmp eax, ecx
jb 0x12823cb0
sub eax, ecx
mov dword [rsp + 0x30], eax
jne 0x12823c71
mov rcx, rsi
call fcn.12958250
nop
mov rcx, rbx
call fcn.12958250
mov eax, ebp
jmp 0x12823cc8
mov eax, r14d
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
ret