Function at 0x180059580
Capabilities:
Read file on windows
Read pipe
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x370]
sub rsp, 0x470
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x4b0], rbx
mov rax, qword [0x18020d020]
xor rax, rsp
mov qword [rbp + 0x360], rax
mov rdi, rdx
mov rsi, rcx
xor r14d, r14d
lea r15, str.RC::RCNamePipeClient::HandleShake
cmp qword [0x180213e70], r14
je 0x1800596d0
lea rcx, [0x180213e70]
call fcn.1800b5f20
mov rax, qword [0x180213e70]
cmp byte [rax + 0x78], r14b
je 0x1800596d0
cmp dword [rax + 0x80], 5
jb 0x1800596d0
movzx ebx, byte [rax + 0x84]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
movdqa xmm1, xmmword [0x1801b2820]
movdqu xmmword [rsp + 0x48], xmm1
mov word [rsp + 0x38], r14w
mov r9, rdi
mov r8, rsi
lea rdx, str.handle_shake_start__p__p
lea rcx, [rsp + 0x38]
call fcn.1800b7090
mov dword [rsp + 0x28], 0x16b
mov qword [rsp + 0x20], r15
lea r9, str.d:jenkinsworkspacepc_2345mpcsafe_build_rhinoprotect_rtpsystem_srclibrtglobalutils_sdkclientcon_rcnamepipeclient.cpp
lea r8, [rsp + 0x38]
lea edx, [r14 + 5]
lea rcx, [0x180213e70]
call fcn.1800b6bb0
test bl, bl
je 0x18005967a
lea rdx, [rsp + 0x38]
lea rcx, [0x180213e70]
call fcn.1800b6f50
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 8
jb 0x1800596bc
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800596b7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180059b49
call fcn.18011e914
movdqa xmm0, xmmword [0x1801b2820]
movdqu xmmword [rsp + 0x48], xmm0
mov word [rsp + 0x38], r14w
xor edx, edx
mov r8d, 0x400
lea rcx, [rsp + 0x60]
call fcn.18013d3e0
lea r8, [rsi + 0x108]
cmp qword [r8 + 0x18], 8
jb 0x1800596f3
mov r8, qword [r8]
mov edx, 0x200
lea rcx, [rsp + 0x60]
call fcn.180146c34
mov dword [rsp + 0x5c], r14d
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x5c]
mov r8d, 0x400
lea rdx, [rsp + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180059a06
xor edx, edx
mov r8d, 0x400
lea rcx, [rsp + 0x60]
call fcn.18013d3e0
mov ebx, 2
nop dword [rax]
nop dword [rax + rax]
mov dword [rsp + 0x58], r14d
mov qword [rsp + 0x28], r14
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp dword [rsp + 0x58], 0x400
jae 0x18005989a
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
add ebx, 0xffffffff
jne 0x180059750
cmp qword [0x180213e70], 0
je 0x180059b15
lea rcx, [0x180213e70]
call fcn.1800b5f20
mov rax, qword [0x180213e70]
cmp byte [rax + 0x78], 0
je 0x180059b15
cmp dword [rax + 0x80], 2
jb 0x180059b15
movzx ebx, byte [rax + 0x84]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
movdqa xmm1, xmmword [0x1801b2820]
movdqu xmmword [rsp + 0x48], xmm1
mov word [rsp + 0x38], r14w
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9, rdi
mov r8, rsi
lea rdx, str.read_srv_client_id_failed__p__p__err__d
lea rcx, [rsp + 0x38]
call fcn.1800b7090
mov dword [rsp + 0x28], 0x193
mov qword [rsp + 0x20], r15
lea r9, str.d:jenkinsworkspacepc_2345mpcsafe_build_rhinoprotect_rtpsystem_srclibrtglobalutils_sdkclientcon_rcnamepipeclient.cpp
lea r8, [rsp + 0x38]
mov edx, 2
lea rcx, [0x180213e70]
call fcn.1800b6bb0
test bl, bl
je 0x180059850
lea rdx, [rsp + 0x38]
lea rcx, [0x180213e70]
call fcn.1800b6f50
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 8
jb 0x180059b01
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180059afc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180059b43
jmp 0x180059afc
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x5c]
mov r8d, 0x400
lea rdx, [rsp + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180059793
lea rax, [rsp + 0x60]
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x1800598d0
lea rcx, [rsi + 0x128]
lea rdx, [rsp + 0x60]
call fcn.180003960
cmp qword [0x180213e70], 0
je 0x1800599ff
lea rcx, [0x180213e70]
call fcn.1800b5f20
mov rax, qword [0x180213e70]
cmp byte [rax + 0x78], 0
je 0x1800599ff
cmp dword [rax + 0x80], 5
jb 0x1800599ff
movzx ebx, byte [rax + 0x84]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
movdqa xmm1, xmmword [0x1801b2820]
movdqu xmmword [rsp + 0x48], xmm1
mov word [rsp + 0x38], r14w
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9, rdi
mov r8, rsi
lea rdx, str.read_srv_client_id_success__p__p__s
lea rcx, [rsp + 0x38]
call fcn.1800b7090
mov dword [rsp + 0x28], 0x189
mov qword [rsp + 0x20], r15
lea r9, str.d:jenkinsworkspacepc_2345mpcsafe_build_rhinoprotect_rtpsystem_srclibrtglobalutils_sdkclientcon_rcnamepipeclient.cpp
lea r8, [rsp + 0x38]
mov edx, 5
lea rcx, [0x180213e70]
call fcn.1800b6bb0
test bl, bl
je 0x1800599a9
lea rdx, [rsp + 0x38]
lea rcx, [0x180213e70]
call fcn.1800b6f50
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 8
jb 0x1800599eb
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800599e6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180059b4f
call fcn.18011e914
movdqa xmm0, xmmword [0x1801b2820]
movdqu xmmword [rsp + 0x48], xmm0
mov word [rsp + 0x38], r14w
mov al, 1
jmp 0x180059b17
cmp qword [0x180213e70], 0
je 0x180059b15
lea rcx, [0x180213e70]
call fcn.1800b5f20
mov rax, qword [0x180213e70]
cmp byte [rax + 0x78], 0
je 0x180059b15
cmp dword [rax + 0x80], 2
jb 0x180059b15
movzx ebx, byte [rax + 0x84]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
movdqa xmm1, xmmword [0x1801b2820]
movdqu xmmword [rsp + 0x48], xmm1
mov word [rsp + 0x38], r14w
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9, rdi
mov r8, rsi
lea rdx, str.write_client_id_failed__p__p__err__d
lea rcx, [rsp + 0x38]
call fcn.1800b7090
mov dword [rsp + 0x28], 0x19d
mov qword [rsp + 0x20], r15
lea r9, str.d:jenkinsworkspacepc_2345mpcsafe_build_rhinoprotect_rtpsystem_srclibrtglobalutils_sdkclientcon_rcnamepipeclient.cpp
lea r8, [rsp + 0x38]
mov edx, 2
lea rcx, [0x180213e70]
call fcn.1800b6bb0
test bl, bl
je 0x180059ac3
lea rdx, [rsp + 0x38]
lea rcx, [0x180213e70]
call fcn.1800b6f50
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 8
jb 0x180059b01
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180059afc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180059b3d
call fcn.18011e914
movdqa xmm0, xmmword [0x1801b2820]
movdqu xmmword [rsp + 0x48], xmm0
mov word [rsp + 0x38], r14w
xor al, al
mov rcx, qword [rbp + 0x360]
xor rcx, rsp
call fcn.18011e4d0
mov rbx, qword [rsp + 0x4b0]
add rsp, 0x470
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
call fcn.180146ae4
int3
call fcn.180146ae4
int3
call fcn.180146ae4
int3
call fcn.180146ae4
int3