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

Disassembly:
mov eax, 0x44c85c
call fcn.00429dec
sub esp, 0x220
push ebx
push esi
push edi
mov ebx, str..PipeedpClientRegistMsg
xor esi, esi
push 0x7530
push ebx
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
test eax, eax
jne 0x401320
push 1
lea ecx, [ebp - 0xf4]
pop ebx
push ebx
push 2
call fcn.0040434f
push 0x4622d0
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xf4]
push str.Error_waiting_pipeline_of_watchclient.exe__failed
push eax
call fcn.004064a0
pop ecx
pop ecx
mov ecx, eax
call fcn.00404173
push eax
call fcn.004064a0
pop ecx
lea eax, [ebp - 0x48]
pop ecx
push eax
lea ecx, [ebp - 0xf4]
call fcn.00404577
mov eax, dword [eax + 4]
mov byte [ebp - 4], bl
cmp eax, esi
mov esi, 0x451648
je 0x4012cb
mov esi, eax
lea eax, [ebp - 0x28]
push eax
call fcn.004010e3
push esi
push eax
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 2
push eax
call fcn.00406636
push eax
push dword [ebp + 0xc]
call fcn.004010b0
add esp, 0x18
lea ecx, [ebp - 0x38]
push ebx
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], bl
call fcn.00404e15
and byte [ebp - 4], 0
push ebx
lea ecx, [ebp - 0x48]
call fcn.00404e15
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf4]
jmp 0x401407
xor eax, eax
lea edi, [ebp - 0x6c]
mov dword [ebp - 0x70], esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x70]
push eax
push 0x40000080
push 3
pop edi
push edi
push esi
push esi
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x401411
push 1
lea ecx, [ebp - 0xf4]
pop ebx
push ebx
push 2
call fcn.0040434f
push 0x4622d0
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xf4]
push str.Error_waiting_pipeline_of_watchclient.exe__failed
push eax
call fcn.004064a0
pop ecx
pop ecx
mov ecx, eax
call fcn.00404173
push eax
call fcn.004064a0
pop ecx
lea eax, [ebp - 0x38]
pop ecx
push eax
lea ecx, [ebp - 0xf4]
call fcn.00404577
mov eax, dword [eax + 4]
mov byte [ebp - 4], 4
cmp eax, esi
mov esi, 0x451648
je 0x4013b6
mov esi, eax
lea eax, [ebp - 0x28]
push eax
call fcn.004010e3
push esi
push eax
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 5
push eax
call fcn.00406636
push eax
push dword [ebp + 0xc]
call fcn.004010b0
add esp, 0x18
lea ecx, [ebp - 0x48]
push ebx
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 3
call fcn.00404e15
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf4]
call fcn.004017c8
jmp 0x4017b7
push 0x14
lea eax, [ebp - 0x5c]
push esi
push eax
mov dword [ebp - 0x14], esi
call fcn.00429ee0
add esp, 0xc
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x5c]
push 0x14
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401510
push 1
lea ecx, [ebp - 0xf4]
pop ebx
push ebx
push 2
call fcn.0040434f
push 0x4622d0
mov dword [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xf4]
push str.Error_reading_pipeline_of_watchclient.exe__failed
push eax
call fcn.004064a0
pop ecx
pop ecx
mov ecx, eax
call fcn.00404173
push eax
call fcn.004064a0
pop ecx
lea eax, [ebp - 0x38]
pop ecx
push eax
lea ecx, [ebp - 0xf4]
call fcn.00404577
mov eax, dword [eax + 4]
mov byte [ebp - 4], 7
cmp eax, esi
mov esi, 0x451648
je 0x4014a6
mov esi, eax
lea eax, [ebp - 0x28]
push eax
call fcn.004010e3
push esi
push eax
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 8
push eax
call fcn.00406636
push eax
push dword [ebp + 0xc]
call fcn.004010b0
add esp, 0x18
lea ecx, [ebp - 0x48]
push ebx
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 7
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 6
call fcn.00404e15
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.004043d2
lea ecx, [ebp - 0xa4]
jmp 0x4017b2
cmp dword [ebp - 0x5c], 0x56525620
jne 0x401701
cmp word [ebp - 0x58], 0x3039
jne 0x401701
mov ax, word [ebp + 8]
push 1
pop ebx
lea ecx, [ebp - 0x22c]
push ebx
push 2
mov dword [ebp - 0x14], esi
mov word [ebp - 0x58], ax
call fcn.0040434f
mov edi, 0x4622d0
lea eax, [ebp - 0x22c]
push edi
mov dword [ebp - 4], 0xc
push dword [ebp - 0x58]
push str.t_Head.m_Type_value:
push eax
call fcn.004064a0
pop ecx
pop ecx
mov ecx, eax
call fcn.0040405c
push eax
call fcn.004064a0
pop ecx
lea eax, [ebp - 0x38]
pop ecx
push eax
lea ecx, [ebp - 0x22c]
call fcn.00404577
mov eax, dword [eax + 4]
mov byte [ebp - 4], 0xd
cmp eax, esi
mov dword [ebp + 8], 0x451648
je 0x40159b
mov dword [ebp + 8], eax
lea eax, [ebp - 0x28]
push eax
call fcn.004010e3
push dword [ebp + 8]
mov byte [ebp - 4], 0xe
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00406636
push eax
push dword [ebp + 0xc]
call fcn.004010b0
add esp, 0x18
lea ecx, [ebp - 0x48]
push ebx
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xd
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0xc
call fcn.00404e15
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x5c]
push 0x14
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4016e7
push ebx
push 2
lea ecx, [ebp - 0x1a8]
call fcn.0040434f
push edi
mov byte [ebp - 4], 0xf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.__failed__and_error_code:
push dword [ebp - 0x58]
lea eax, [ebp - 0x1a8]
push str.Write_in_pipeline_is_TYPE:
push eax
call fcn.004064a0
pop ecx
pop ecx
mov ecx, eax
call fcn.0040405c
push eax
call fcn.004064a0
pop ecx
pop ecx
mov ecx, eax
call fcn.00404173
push eax
call fcn.004064a0
pop ecx
lea eax, [ebp - 0x124]
pop ecx
push eax
lea ecx, [ebp - 0x1a8]
call fcn.00404577
mov eax, dword [eax + 4]
mov byte [ebp - 4], 0x10
cmp eax, esi
mov esi, 0x451648
je 0x401677
mov esi, eax
lea eax, [ebp - 0x114]
push eax
call fcn.004010e3
push esi
push eax
lea eax, [ebp - 0x104]
mov byte [ebp - 4], 0x11
push eax
call fcn.00406636
push eax
push dword [ebp + 0xc]
call fcn.004010b0
add esp, 0x18
lea ecx, [ebp - 0x104]
push ebx
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x114]
mov byte [ebp - 4], 0x10
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 0xf
call fcn.00404e15
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x1a8]
mov byte [ebp - 4], 0xc
call fcn.004017c8
jmp 0x4016ea
mov dword [ebp - 0x18], ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x22c]
call fcn.004017c8
mov eax, dword [ebp - 0x18]
jmp 0x4017b9
push 1
lea ecx, [ebp - 0xf4]
pop ebx
push ebx
push 2
call fcn.0040434f
lea eax, [ebp - 0xf4]
push str.Illegal_pipeline_message__r_n
push eax
mov dword [ebp - 4], 9
call fcn.004064a0
pop ecx
lea eax, [ebp - 0x38]
pop ecx
push eax
lea ecx, [ebp - 0xf4]
call fcn.00404577
mov eax, dword [eax + 4]
mov byte [ebp - 4], 0xa
cmp eax, esi
mov esi, 0x451648
je 0x40174d
mov esi, eax
lea eax, [ebp - 0x28]
push eax
call fcn.004010e3
push esi
push eax
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 0xb
push eax
call fcn.00406636
push eax
push dword [ebp + 0xc]
call fcn.004010b0
add esp, 0x18
lea ecx, [ebp - 0x48]
push ebx
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xa
call fcn.00404e15
push ebx
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 9
call fcn.00404e15
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa4]
call fcn.004043d2
lea ecx, [ebp - 0xa4]
call fcn.00404286
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret