Function at 0x4213a1
Capabilities:
Connect pipe
Create pipe
Read file on windows
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x173c
call fcn.0042b680
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
mov dword [ebp - 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [esi + 0xc]
push 0x14
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x2c]
push edi
push eax
call fcn.0042b620
mov eax, dword [esi + 0xc]
add esp, 0xc
cmp word [esi + 0x14], di
mov dword [ebp - 0x1c], eax
jne 0x421901
mov ebx, 0x15e6
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x2c]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x42147f
call edi
cmp eax, 0x3e5
jne 0x421457
push 0xffffffffffffffff
lea eax, [ebp - 0x18]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x421901
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x42147f
call edi
push eax
push str.PIPE:_Client_connection_error__u
jmp 0x42145d
push eax
push str.PIPE:_Client_connection_error__u__non_overlapped_
push dword [esi + 0x18]
call fcn.0041e63d
add esp, 0xc
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
push 0x64
mov ecx, esi
call fcn.0042190f
jmp 0x4218e0
push str.PIPE:_Client_connected_to_pipe
push dword [esi + 0x18]
call fcn.0041e63d
push ebx
lea eax, [ebp - 0x173c]
push 0
push eax
call fcn.0042b620
add esp, 0x14
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x173c]
push ebx
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x42151b
call edi
cmp eax, 0x3e5
jne 0x421513
push 0xffffffffffffffff
lea eax, [ebp - 0x18]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x42185e
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x42151b
call edi
push eax
push str.PIPE:_Read_error__u
push dword [esi + 0x18]
call fcn.0041e63d
add esp, 0xc
jmp 0x42185e
push eax
push str.PIPE:_Read_error__u__non_overlapped_
jmp 0x421503
push dword [ebp - 4]
push str.PIPE:_Message_received_from_client__length__u
push dword [esi + 0x18]
call fcn.0041e63d
mov ax, word [esi + 0x1c]
add esp, 0xc
cmp dword [ebp - 4], 2
mov word [ebp - 0x154], 0x8009
mov word [ebp - 0x152], ax
mov dword [ebp - 0xc], 4
jb 0x4217c1
test byte [ebp - 0x173b], 0x80
je 0x4215d4
test al, 1
je 0x4217d4
push ebx
push 0x2042
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp dword [ebp - 8], 0
mov edi, eax
je 0x4215b7
test edi, edi
je 0x4215b7
lea eax, [ebp - 0x173c]
push ebx
push eax
push edi
call fcn.0042b2e0
add esp, 0xc
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 0x401
mov dword [ebp - 0x30], edi
push eax
mov eax, dword [0x45418c]
push eax
push 0x4a
push eax
mov dword [ebp - 0x34], ebx
call dword [sym.imp.USER32.dll_SendMessageA]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4217d4
movzx ecx, word [ebp - 0x173c]
mov eax, ecx
xor edx, edx
sub eax, edx
je 0x4217b6
dec eax
je 0x4216ee
dec eax
je 0x42167d
dec eax
je 0x42163e
dec eax
je 0x421606
push ecx
push str.PIPE:_Unknown_message_received__message__u_
jmp 0x4217c9
push str.PIPE:_Request_to_close
mov word [ebp - 0x154], 0x104
push dword [esi + 0x18]
call fcn.0041e63d
pop ecx
pop ecx
push str.Closing_driver_and_interrupting_jobs_at_external_request
push dword [esi + 0x18]
call fcn.0041e63d
pop ecx
pop ecx
push 0
mov ecx, 0x454178
call fcn.004093c7
jmp 0x4217d4
lea eax, [ebp - 0x173a]
mov word [ebp - 0x154], 0x103
push eax
push str.PIPE:_Request_to_change_port_to___s_
push dword [esi + 0x18]
call fcn.0041e63d
and word [esi + 0x1c], 0xfffd
add esp, 0xc
lea eax, [ebp - 0x173a]
mov ecx, 0x454178
push eax
call fcn.0040deb6
mov dword [ebp - 0x10], eax
jmp 0x4217d4
cmp word [0x454c64], 1
mov word [ebp - 0x154], 0x102
mov word [ebp - 0x152], 1
je 0x4217d4
push str.PIPE:_Report_printer_paper_status_update_complete
mov word [0x454c64], dx
push dword [esi + 0x18]
call fcn.0041e63d
and word [ebp - 0x152], 0
cmp word [0x454c66], 0
pop ecx
pop ecx
je 0x4217d4
push 0x115
lea eax, [ebp - 0x150]
push 0x454c68
push eax
call fcn.0042b2e0
add esp, 0xc
mov dword [ebp - 0xc], 0x119
jmp 0x4217d4
cmp word [0x454c64], dx
mov word [ebp - 0x154], 0x101
mov word [ebp - 0x152], 1
je 0x42171d
push str.PIPE:_Printer_paper_status___DI__update_request_rejected___job_already_in_progress
push dword [esi + 0x18]
call fcn.0041e63d
pop ecx
pop ecx
jmp 0x4217d4
lea eax, [ebp - 0x173a]
push eax
call fcn.0042bfb0
cmp eax, 0x12e
pop ecx
jb 0x421738
push str.PIPE:_Paper_status___DI__filename_is_invalid
jmp 0x42170e
lea eax, [ebp - 0x173a]
push eax
push 0x454d7d
call fcn.0042b1f0
lea eax, [ebp - 0x1636]
push 0x100
push eax
push 0x454eab
call fcn.00424eff
and word [0x454c66], 0
add esp, 0x14
cmp word [0x45200e], 0
je 0x4217d4
lea eax, [ebp - 0x173a]
push eax
push str.PIPE:_Printer_paper_status___DI__update_request__file___s_
push dword [esi + 0x18]
call fcn.0041e63d
add esp, 0xc
mov ecx, 0x453670
call fcn.004278a8
push 0
push 5
mov ecx, 0x454178
mov word [0x454c64], 1
call fcn.0040cbea
and word [ebp - 0x152], 0
jmp 0x4217d4
mov word [ebp - 0x154], 0x100
jmp 0x4217d4
push dword [ebp - 4]
push str.PIPE:_Received_message_is_invalid_length___u_bytes_
push dword [esi + 0x18]
call fcn.0041e63d
add esp, 0xc
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x154]
push dword [ebp - 0xc]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x421847
call edi
cmp eax, 0x3e5
jne 0x42183c
push 0xffffffffffffffff
lea eax, [ebp - 0x18]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x42185e
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x421847
call edi
push eax
push str.PIPE:_Write_error__u
jmp 0x421503
push eax
push str.PIPE:_Write_error__u__non_overlapped_
jmp 0x421503
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 4]
je 0x42185e
push str.PIPE:_Failed_to_write_reply
push dword [esi + 0x18]
call fcn.0041e63d
pop ecx
pop ecx
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x42187a
push str.PIPE:_Failed_to_disconnect_client
push dword [esi + 0x18]
call fcn.0041e63d
pop ecx
pop ecx
cmp word [ebp - 0x10], 0
je 0x4218e0
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esi + 0x1e]
push str..pipeWIL.C232.Pipe.
push edi
call fcn.0042b1f0
push 0x452e8a
push edi
call fcn.0042b200
add esp, 0x10
push dword [0x4552f0]
push 0xc8
push ebx
push ebx
push 1
push 6
push 0x40000003
push edi
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
cmp eax, 0xffffffff
mov dword [esi + 0x10], eax
je 0x4218ed
push edi
push str.PIPE:_Created_pipe_server___s_
push dword [esi + 0x18]
call fcn.0041e63d
add esp, 0xc
and dword [ebp - 0x10], 0
cmp word [esi + 0x14], 0
je 0x4213f6
jmp 0x421901
lea eax, [esi + 0x1e]
push eax
push str.PIPE:_Failed_to_create___s__named_pipe
push dword [esi + 0x18]
call fcn.0041e63d
add esp, 0xc
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_CancelIo]
pop edi
pop esi
pop ebx
leave
ret