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

Disassembly:
mov rax, rsp
mov dword [rax + 0x20], r9d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xc0
mov qword [rsp + 0xb8], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov r14, r8
mov r15, rdx
mov rsi, rcx
mov dword [rax + 0x20], 1
xor r12d, r12d
mov ebx, r12d
mov qword [rsp + 0x68], r12
lea edi, [r12 + 0x20]
mov r8, rdi
xor edx, edx
lea rcx, [rsp + 0x70]
call fcn.1800575a0
mov qword [rsp + 0x90], r12
mov r8, rdi
xor edx, edx
lea rcx, [rsp + 0x98]
call fcn.1800575a0
mov r13, r12
mov rbp, r12
cmp qword [rsi + 0x20], 8
jb 0x18004a70c
lea rdi, [rsi + 8]
mov rcx, qword [rdi]
jmp 0x18004a713
lea rdi, [rsi + 8]
mov rcx, rdi
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x40000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x18004a7b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x18004a7a9
cmp qword [rsi + 0x20], 8
jb 0x18004a75b
mov rcx, qword [rdi]
jmp 0x18004a75e
mov rcx, rdi
mov edx, 0x7d0
call qword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x18004a7a9
cmp qword [rsi + 0x20], 8
jb 0x18004a777
mov rdi, qword [rdi]
and qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x40000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x18004a7b3
mov ebx, 4
jmp 0x18004a984
and dword [rsp + 0x100], ebx
lea r9, [rsp + 0x100]
lea r8, [rsp + 0x118]
mov rdx, r14
mov rcx, r15
call fcn.18004a464
mov r13, rax
xor r9d, r9d
xor r8d, r8d
lea esi, [r9 + 1]
mov edx, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsp + 0x80], rax
mov r8d, dword [rsp + 0x100]
mov dword [rsp + 0x88], r8d
lea rax, [0x18004a648]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
mov rdx, r13
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFileEx]
mov r15d, 0x3e5
test eax, eax
jne 0x18004a83e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, r15d
je 0x18004a83e
lea ebx, [rsi + 5]
jmp 0x18004a97b
mov r14d, 0xc0
mov r8d, esi
mov edx, 0x7d0
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
test eax, eax
je 0x18004a86c
cmp eax, r14d
je 0x18004a844
mov eax, dword [rsp + 0x100]
jmp 0x18004a86e
mov eax, esi
test eax, eax
jne 0x18004a87a
lea ebx, [rax + 6]
jmp 0x18004a97b
cmp dword [rsp + 0x118], ebx
je 0x18004a97b
mov edi, 0x100000
mov rcx, rdi
call fcn.180052d3c
mov rbp, rax
xor r9d, r9d
xor r8d, r8d
mov edx, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsp + 0xa8], rax
lea rax, [0x18004a668]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x90]
mov r8d, edi
mov rdx, rbp
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFileEx]
test eax, eax
jne 0x18004a8eb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, r15d
je 0x18004a8eb
mov ebx, 7
jmp 0x18004a97b
mov r8d, esi
or edx, 0xffffffff
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
test eax, eax
je 0x18004a90f
cmp eax, r14d
je 0x18004a8eb
mov ebx, 6
jmp 0x18004a97b
mov eax, dword [rsp + 0xb0]
mov byte [rax + rbp], bl
mov qword [rsp + 0x60], socket
and qword [rsp + 0x58], rbx
mov byte [rsp + 0x48], bl
xor eax, eax
or r14, 0xffffffffffffffff
mov rcx, r14
mov rdi, rbp
repne scasb al, byte [rdi]
not rcx
sub rcx, rsi
mov r8, rcx
mov rdx, rbp
lea rcx, [rsp + 0x40]
call fcn.18000d0c0
nop
mov r9, r14
xor r8d, r8d
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x128]
call fcn.18000ba90
nop
cmp qword [rsp + 0x60], 0x10
jb 0x18004a97b
mov rcx, qword [rsp + 0x48]
call fcn.1800538dc
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x18004a997
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xa8]
test rcx, rcx
je 0x18004a9aa
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13, r13
je 0x18004a9b7
mov rcx, r13
call fcn.180053a74
test rbp, rbp
je 0x18004a9c4
mov rcx, rbp
call fcn.180053a74
mov eax, ebx
mov rbx, qword [rsp + 0x108]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret