Function at 0x413ac0
Capabilities:
Read pipe
Write pipe

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc78
mov rbx, rcx
mov qword [rsp + 0xcc8], rdx
mov qword [rsp + 0xcd0], r8
mov qword [rsp + 0xcd8], r9
call fcn.00414460
test al, al
jne 0x413b10
add rsp, 0xc78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rsi, [rsp + 0x70]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rdi
lea r9, [rsp + 0xcc8]
mov r8, rbx
mov edx, 0x400
mov rcx, rsi
mov r15d, eax
mov byte [rsp + 0x70], 0
mov qword [rsp + 0x58], r9
call fcn.00426280
test eax, eax
js 0x413b56
cmp eax, 0x3ff
movsxd rdx, eax
jg 0x413b56
mov byte [rsp + rdx + 0x70], 0
mov byte [rsp + 0x46f], 0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [rsp + 0x54]
mov eax, dword [rsp + 0x50]
movabs rdx, 0x346dc5d63886594b
movabs rbx, 0xfffff568cf499800
lea rbp, [rsp + 0x470]
mov byte [rsp + 0x470], 0
mov r8d, 0x400
shl rcx, 0x20
add rcx, rax
mov rax, rcx
sar rcx, 0x3f
imul rdx
sar rdx, 0xb
sub rdx, rcx
xor ecx, ecx
add rbx, rdx
movabs rdx, 0x55e63b88c230e77f
mov rax, rbx
imul rdx
mov rax, rbx
sar rax, 0x3f
sar rdx, 0x19
sub rdx, rax
imul rdx, rdx, 0x5f5e100
sub rbx, rdx
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, 0x5c
mov rcx, rbp
call sub.msvcrt.dll_strrchr
lea rdx, [rax + 1]
test rax, rax
cmovne rbp, rdx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
mov edx, 0x10624dd3
mov eax, ebx
imul edx
mov eax, ebx
lea r13, [rsp + 0x870]
sar eax, 0x1f
mov r9d, ebx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], r12d
mov rcx, r13
sar edx, 6
mov qword [rsp + 0x20], rbp
mov r8d, edx
lea rdx, str.__05d._03d__s_p_04d_t_04d_:__s
sub r8d, eax
imul eax, r8d, 0x3e8
sub r9d, eax
call fcn.0042f750
mov rbp, qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, qword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
lea rsi, str..pipeDebugServer
mov byte [rsp + 0xc6f], 0
mov r12d, 0xc0000000
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x110000
xor r9d, r9d
mov dword [rsp + 0x20], 3
xor r8d, r8d
mov edx, r12d
mov rcx, rsi
call rbp
cmp rax, 0xffffffffffffffff
mov rbx, rax
jne 0x413ce1
call rdi
cmp eax, 0xe7
je 0x413cd0
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x413af7
mov edx, 0xffffffff
mov rcx, rsi
call r14
test eax, eax
jne 0x413c83
jmp 0x413cbc
mov dword [rsp + 0x48], 2
lea rdx, [rsp + 0x48]
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
mov dword [rsp + 0x4c], 0
mov r8, r13
mov edx, dword [r8]
add r8, 4
lea eax, [rdx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x413d08
mov edx, eax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x20], 0x10
shr edx, 0x10
test eax, 0x8080
lea r9, [rsp + 0x60]
cmove eax, edx
lea rdx, [r8 + 2]
mov rcx, rbx
mov edi, eax
cmove r8, rdx
add dil, al
lea rax, [rsp + 0x4c]
sbb r8, 3
mov rdx, r13
mov qword [rsp + 0x28], rax
sub r8d, r13d
call qword [sym.imp.KERNEL32.dll_TransactNamedPipe]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x413cbc