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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1026692c
mov eax, dword fs:[0]
push eax
sub esp, 0x428
mov eax, dword [0x1030f644]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x434], esi
cmp dword [0x1031d6f4], 0
mov edi, dword [ebp + 8]
je 0x1008576c
push ecx
mov ecx, 0x1031d6f4
call fcn.1008d2a0
mov eax, dword [0x1031d6f4]
cmp byte [eax + 0x54], 0
je 0x1008576c
cmp dword [eax + 0x58], 5
jb 0x1008576c
mov bl, byte [eax + 0x5c]
xor eax, eax
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x414], 7
mov word [ebp - 0x428], ax
push edi
push esi
mov dword [ebp - 4], eax
lea eax, [ebp - 0x428]
push str.handle_shake_start__p__p
push eax
call fcn.1008e380
add esp, 0x10
lea eax, [ebp - 0x428]
mov ecx, 0x1031d6f4
push 0x170
push str.RC::DM::RCNamePipeClient::HandleShake
push str.d:_rhinopcdomain_src_systemipc_namepipe_rcnamepipeclient.cpp
push eax
push 5
call fcn.1008de20
test bl, bl
je 0x1008575a
lea eax, [ebp - 0x428]
mov ecx, 0x1031d6f4
push eax
call fcn.1008e170
lea ecx, [ebp - 0x428]
mov dword [ebp - 4], 0xffffffff
call fcn.1004bcb0
push 0x400
lea eax, [ebp - 0x410]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [esi + 0xa0]
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x10085790
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x410]
push 0x200
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
mov dword [ebp - 0x430], 0
lea eax, [ebp - 0x430]
push 0
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100859c6
push 0x400
lea eax, [ebp - 0x410]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0xc
mov esi, 2
push 0
lea eax, [ebp - 0x42c]
mov dword [ebp - 0x42c], 0
push eax
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp dword [ebp - 0x42c], 0x400
jae 0x100858b3
push 0x64
call ebx
sub esi, 1
jne 0x100857f5
cmp dword [0x1031d6f4], 0
je 0x10085a7d
push ecx
mov ecx, 0x1031d6f4
call fcn.1008d2a0
mov eax, dword [0x1031d6f4]
cmp byte [eax + 0x54], 0
je 0x10085a7d
cmp dword [eax + 0x58], 2
jb 0x10085a7d
mov bl, byte [eax + 0x5c]
xor eax, eax
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x414], 7
mov word [ebp - 0x428], ax
mov dword [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 0x434]
push eax
push edi
push esi
lea eax, [ebp - 0x428]
push str.read_srv_client_id_failed__p__p__err__d
push eax
call fcn.1008e380
add esp, 0x14
push 0x198
jmp 0x10085a40
push 0
lea eax, [ebp - 0x430]
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1008582e
lea ecx, [ebp - 0x410]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100858e0
mov esi, dword [ebp - 0x434]
lea eax, [ebp - 0x410]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0xb8]
call fcn.1004d240
cmp dword [0x1031d6f4], 0
je 0x100859bf
push ecx
mov ecx, 0x1031d6f4
call fcn.1008d2a0
mov eax, dword [0x1031d6f4]
cmp byte [eax + 0x54], 0
je 0x100859bf
cmp dword [eax + 0x58], 5
jb 0x100859bf
mov bl, byte [eax + 0x5c]
xor eax, eax
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x414], 7
mov word [ebp - 0x428], ax
lea eax, [ebp - 0x410]
mov dword [ebp - 4], 1
push eax
push edi
push esi
lea eax, [ebp - 0x428]
push str.read_srv_client_id_success__p__p__s
push eax
call fcn.1008e380
add esp, 0x14
lea eax, [ebp - 0x428]
mov ecx, 0x1031d6f4
push 0x18e
push str.RC::DM::RCNamePipeClient::HandleShake
push str.d:_rhinopcdomain_src_systemipc_namepipe_rcnamepipeclient.cpp
push eax
push 5
call fcn.1008de20
test bl, bl
je 0x100859b4
lea eax, [ebp - 0x428]
mov ecx, 0x1031d6f4
push eax
call fcn.1008e170
lea ecx, [ebp - 0x428]
call fcn.1004bcb0
mov al, 1
jmp 0x10085a7f
cmp dword [0x1031d6f4], 0
je 0x10085a7d
push ecx
mov ecx, 0x1031d6f4
call fcn.1008d2a0
mov eax, dword [0x1031d6f4]
cmp byte [eax + 0x54], 0
je 0x10085a7d
cmp dword [eax + 0x58], 2
jb 0x10085a7d
mov bl, byte [eax + 0x5c]
xor eax, eax
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x414], 7
mov word [ebp - 0x428], ax
mov dword [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
lea eax, [ebp - 0x428]
push str.write_client_id_failed__p__p__err__d
push eax
call fcn.1008e380
add esp, 0x14
push 0x1a2
push str.RC::DM::RCNamePipeClient::HandleShake
push str.d:_rhinopcdomain_src_systemipc_namepipe_rcnamepipeclient.cpp
lea eax, [ebp - 0x428]
mov ecx, 0x1031d6f4
push eax
push 2
call fcn.1008de20
test bl, bl
je 0x10085a72
lea eax, [ebp - 0x428]
mov ecx, 0x1031d6f4
push eax
call fcn.1008e170
lea ecx, [ebp - 0x428]
call fcn.1004bcb0
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 - 0x10]
xor ecx, ebp
call fcn.101afab5
mov esp, ebp
pop ebp
ret 4