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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5417ec
mov eax, dword fs:[0]
push eax
sub esp, 0x430
mov eax, dword [0x58a088]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x438], esi
cmp dword [0x58e9e0], 0
mov edi, dword [ebp + 8]
je 0x4d5f66
push ecx
mov ecx, 0x58e9e0
call fcn.004c3010
mov eax, dword [0x58e9e0]
cmp byte [eax + 0x54], 0
je 0x4d5f66
cmp dword [eax + 0x58], 5
jb 0x4d5f66
mov bl, byte [eax + 0x5c]
lea ecx, [ebp - 0x430]
call fcn.00402a90
mov dword [ebp - 4], 0
lea eax, [ebp - 0x430]
push edi
push esi
push str.handle_shake_start__p__p
push eax
call fcn.004c40d0
add esp, 0x10
lea eax, [ebp - 0x430]
mov ecx, 0x58e9e0
push 0x16b
push str.RC::RCNamePipeClient::HandleShake
push str.d:jenkinsworkspacepc_2345mpcsafe_build_rhinoprotect_rtpsystem_srclibrtglobalutils_sdkclientcon_rcnamepipeclient.cpp
push eax
push 5
call fcn.004c3bd0
test bl, bl
je 0x4d5f54
lea eax, [ebp - 0x430]
mov ecx, 0x58e9e0
push eax
call fcn.004c3f20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x430]
call fcn.00402a30
push 0x400
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.004e48c0
add esp, 0xc
lea ecx, [esi + 0x9c]
call fcn.00403390
push eax
lea eax, [ebp - 0x414]
push 0x200
push eax
call fcn.004fa3e9
add esp, 0xc
mov dword [ebp - 0x434], 0
lea eax, [ebp - 0x434]
push 0
push eax
push 0x400
lea eax, [ebp - 0x414]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4d61aa
push 0x400
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.004e48c0
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0xc
mov esi, 2
nop dword [eax + eax]
push 0
lea eax, [ebp - 0x418]
mov dword [ebp - 0x418], 0
push eax
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp dword [ebp - 0x418], 0x400
jae 0x4d60af
push 0x64
call ebx
sub esi, 1
jne 0x4d5ff0
cmp dword [0x58e9e0], 0
je 0x4d6269
push ecx
mov ecx, 0x58e9e0
call fcn.004c3010
mov eax, dword [0x58e9e0]
cmp byte [eax + 0x54], 0
je 0x4d6269
cmp dword [eax + 0x58], 2
jb 0x4d6269
mov bl, byte [eax + 0x5c]
lea ecx, [ebp - 0x430]
call fcn.00402a90
mov dword [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x418]
mov dword [ebp - 0x418], eax
call fcn.00402ab0
mov esi, dword [ebp - 0x438]
mov eax, dword [eax]
push eax
push edi
push esi
lea eax, [ebp - 0x430]
push str.read_srv_client_id_failed__p__p__err__d
push eax
call fcn.004c40d0
add esp, 0x14
push 0x193
jmp 0x4d6225
push 0
lea eax, [ebp - 0x434]
push eax
push 0x400
lea eax, [ebp - 0x414]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4d6029
lea eax, [ebp - 0x414]
push eax
call fcn.00402d30
mov esi, dword [ebp - 0x438]
add esp, 4
push eax
lea eax, [ebp - 0x414]
push eax
lea ecx, [esi + 0xb4]
call fcn.00402b20
cmp dword [0x58e9e0], 0
je 0x4d61a3
push ecx
mov ecx, 0x58e9e0
call fcn.004c3010
mov eax, dword [0x58e9e0]
cmp byte [eax + 0x54], 0
je 0x4d61a3
cmp dword [eax + 0x58], 5
jb 0x4d61a3
mov bl, byte [eax + 0x5c]
lea ecx, [ebp - 0x430]
call fcn.00402a90
mov dword [ebp - 4], 1
lea eax, [ebp - 0x414]
push eax
push edi
push esi
lea eax, [ebp - 0x430]
push str.read_srv_client_id_success__p__p__s
push eax
call fcn.004c40d0
add esp, 0x14
lea eax, [ebp - 0x430]
mov ecx, 0x58e9e0
push 0x189
push str.RC::RCNamePipeClient::HandleShake
push str.d:jenkinsworkspacepc_2345mpcsafe_build_rhinoprotect_rtpsystem_srclibrtglobalutils_sdkclientcon_rcnamepipeclient.cpp
push eax
push 5
call fcn.004c3bd0
test bl, bl
je 0x4d6191
lea eax, [ebp - 0x430]
mov ecx, 0x58e9e0
push eax
call fcn.004c3f20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x430]
call fcn.00402a30
mov al, 1
jmp 0x4d626b
cmp dword [0x58e9e0], 0
je 0x4d6269
push ecx
mov ecx, 0x58e9e0
call fcn.004c3010
mov eax, dword [0x58e9e0]
cmp byte [eax + 0x54], 0
je 0x4d6269
cmp dword [eax + 0x58], 2
jb 0x4d6269
mov bl, byte [eax + 0x5c]
lea ecx, [ebp - 0x430]
call fcn.00402a90
mov dword [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x438]
mov dword [ebp - 0x438], eax
call fcn.00402ab0
mov eax, dword [eax]
push eax
push edi
push esi
lea eax, [ebp - 0x430]
push str.write_client_id_failed__p__p__err__d
push eax
call fcn.004c40d0
add esp, 0x14
push 0x19d
push str.RC::RCNamePipeClient::HandleShake
push str.d:jenkinsworkspacepc_2345mpcsafe_build_rhinoprotect_rtpsystem_srclibrtglobalutils_sdkclientcon_rcnamepipeclient.cpp
lea eax, [ebp - 0x430]
mov ecx, 0x58e9e0
push eax
push 2
call fcn.004c3bd0
test bl, bl
je 0x4d6257
lea eax, [ebp - 0x430]
mov ecx, 0x58e9e0
push eax
call fcn.004c3f20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x430]
call fcn.00402a30
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004e1ff4
mov esp, ebp
pop ebp
ret 4