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

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb0
mov rbx, rdx
mov edx, dword [rdx + 0x58]
mov r14, rcx
mov rsi, r8
mov ecx, edx
and ecx, 0xffdeffff
sub dword [rbx + 0x78], 1
mov dword [rbx + 0x58], ecx
jne 0x4291a0
test dl, 1
je 0x4291a0
and edx, 0x20
je 0x4294f0
nop dword [rax]
mov rcx, qword [rbx + 0x128]
test rcx, rcx
je 0x4291b1
call fcn.00410230
test byte [rbx + 0x59], 0x10
je 0x42937c
mov rcx, qword [rsi + 0x40]
test ecx, ecx
js 0x429470
lea rax, [rsp + 0x4c]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x4c], 0
mov rcx, qword [rbx + 0x118]
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x429510
mov esi, dword [rsp + 0x4c]
mov eax, dword [rbx + 0x58]
test esi, esi
je 0x429305
test ah, 0x10
je 0x429305
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x80]
lea r13, [rsp + 0x50]
mov r12, qword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x429268
mov rcx, rbx
call fcn.00426a40
test eax, eax
je 0x429460
mov esi, dword [rsp + 0x4c]
cmp eax, esi
ja 0x429460
sub esi, eax
mov eax, dword [rbx + 0x58]
test esi, esi
mov dword [rsp + 0x4c], esi
je 0x429305
test ah, 0x10
je 0x429305
mov eax, dword [rbx + 0x110]
test eax, eax
jne 0x429232
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call fcn.00410be0
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x30]
mov r8, rdi
mov rcx, rbx
mov qword [rsp + 0x88], rdx
mov qword [rsp + 0x80], rax
mov edx, esi
call qword [rbx + 0x68]
mov rdx, qword [rsp + 0x88]
test rdx, rdx
je 0x4292f2
mov r8d, dword [rsp + 0x80]
test r8d, r8d
je 0x4292f2
mov rcx, qword [rbx + 0x118]
mov qword [rsp + 0x20], 0
mov r9, r13
call r12
test eax, eax
je 0x429390
mov edx, dword [rsp + 0x50]
mov r8, rdi
mov rcx, rbx
call qword [rbx + 0x70]
mov eax, dword [rsp + 0x50]
jmp 0x42923a
mov r8, rdi
mov rdx, 0xfffffffffffff024
mov rcx, rbx
call qword [rbx + 0x70]
mov eax, dword [rbx + 0x58]
mov edx, eax
and edx, 0x11000
cmp edx, 0x1000
jne 0x42937c
test eax, 0x1000000
lea rsi, [rbx + 0x80]
je 0x4295e0
mov qword [rbx + 0x238], 0
mov r8d, 0x10
mov rdx, rsi
lea rcx, [0x00426100]
call qword [sym.imp.KERNEL32.dll_QueueUserWorkItem]
test eax, eax
je 0x429698
mov rcx, qword [rbx + 0x128]
test rcx, rcx
je 0x429371
lea rdx, [0x00426650]
xor r9d, r9d
mov r8d, 0x32
call fcn.00410560
or dword [rbx + 0x58], 0x10000
add dword [rbx + 0x78], 1
add rsp, 0xb0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov edx, dword [rsp + 0x80]
mov rax, qword [rsp + 0x88]
cmp esi, 0x6d
je 0x429580
mov rcx, qword [rbx + 0x128]
mov dword [rsp + 0xa0], edx
mov qword [rsp + 0xa8], rax
test rcx, rcx
je 0x4293e2
lea rdx, [0x004260f0]
call fcn.00425aa0
mov qword [rbx + 0x128], 0
mov rcx, rbx
call fcn.0042fd90
mov ecx, esi
mov rdi, qword [rbx + 0x70]
call fcn.00416500
lea r8, [rsp + 0xa0]
movsxd rdx, eax
mov rcx, rbx
call rdi
mov eax, dword [rbx + 0x58]
jmp 0x429305
mov rcx, qword [rbx + 0x128]
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
test rcx, rcx
je 0x429441
lea rdx, [0x004260f0]
call fcn.00425aa0
mov qword [rbx + 0x128], 0
mov rcx, rbx
call fcn.0042fd90
lea r8, [rsp + 0x50]
mov rdx, 0xfffffffffffff001
mov rcx, rbx
call qword [rbx + 0x70]
nop dword [rax + rax]
mov eax, dword [rbx + 0x58]
jmp 0x429305
mov rax, qword [0x004517d0]
call qword [rax]
cmp eax, 0x3e3
mov esi, eax
je 0x429460
cmp eax, 0x6d
je 0x42940d
mov rcx, qword [rbx + 0x128]
mov dword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
test rcx, rcx
je 0x4294c1
lea rdx, [0x004260f0]
call fcn.00425aa0
mov qword [rbx + 0x128], 0
mov rcx, rbx
call fcn.0042fd90
mov ecx, esi
mov rdi, qword [rbx + 0x70]
call fcn.00416500
lea r8, [rsp + 0x80]
movsxd rdx, eax
mov rcx, rbx
call rdi
mov eax, dword [rbx + 0x58]
jmp 0x429305
or ecx, 0x20
mov dword [rbx + 0x58], ecx
mov rax, qword [r14 + 0x50]
mov qword [rbx + 0x50], rax
mov qword [r14 + 0x50], rbx
jmp 0x4291a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
mov esi, eax
je 0x429705
mov rcx, qword [rbx + 0x128]
mov dword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
test rcx, rcx
je 0x429555
lea rdx, [0x004260f0]
call fcn.00425aa0
mov qword [rbx + 0x128], 0
mov rcx, rbx
call fcn.0042fd90
mov ecx, esi
mov rdi, qword [rbx + 0x70]
call fcn.00416500
lea r8, [rsp + 0x70]
movsxd rdx, eax
mov rcx, rbx
call rdi
jmp 0x4291ff
mov rcx, qword [rbx + 0x128]
mov dword [rsp + 0x90], edx
mov qword [rsp + 0x98], rax
test rcx, rcx
je 0x4295b2
lea rdx, [0x004260f0]
call fcn.00425aa0
mov qword [rbx + 0x128], 0
mov rcx, rbx
call fcn.0042fd90
lea r8, [rsp + 0x90]
mov rdx, 0xfffffffffffff001
mov rcx, rbx
call qword [rbx + 0x70]
mov eax, dword [rbx + 0x58]
jmp 0x429305
lea rdx, [rbx + 0xc0]
test eax, 0x80000
mov qword [rbx + 0xc0], 0
mov qword [rdx + 8], 0
mov qword [rdx + 0x10], 0
mov qword [rdx + 0x18], 0
je 0x429623
mov rax, qword [rbx + 0xf0]
or rax, 1
mov qword [rbx + 0xd8], rax
mov qword [rsp + 0x20], rdx
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rbx + 0x118]
lea rdx, [0x006e2440]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4296f0
test byte [rbx + 0x5a], 8
je 0x429350
cmp qword [rbx + 0xf8], 0xffffffffffffffff
jne 0x429350
mov rdx, qword [rbx + 0xf0]
lea rcx, [rbx + 0xf8]
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0xffffffff
mov r9, rsi
lea r8, [0x004262c0]
call qword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
jne 0x429350
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rdi
test eax, eax
jle 0x429758
call rdi
movzx eax, ax
or eax, 0x80070000
cdqe
mov qword [rbx + 0xc0], rax
mov qword [rbx + 0xe8], 0
mov rax, qword [r14 + 0x48]
test rax, rax
je 0x429761
mov rax, qword [rax + 0x68]
mov qword [rbx + 0xe8], rax
mov rax, qword [r14 + 0x48]
mov qword [rax + 0x68], rsi
mov qword [r14 + 0x48], rsi
jmp 0x429371
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rdi
cmp eax, 0x3e5
jne 0x42969f
jmp 0x42964a
mov rcx, qword [rbx + 0x128]
mov dword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
test rcx, rcx
je 0x429739
lea rdx, [0x004260f0]
call fcn.00425aa0
mov qword [rbx + 0x128], 0
mov rcx, rbx
call fcn.0042fd90
lea r8, [rsp + 0x60]
mov rdx, 0xfffffffffffff001
mov rcx, rbx
call qword [rbx + 0x70]
jmp 0x4291ff
call rdi
cdqe
jmp 0x4296b5
mov qword [rbx + 0xe8], rsi
mov qword [r14 + 0x48], rsi
jmp 0x429371