Function at 0x4063f1
Capabilities:
Check if file exists
Read pipe
Write pipe

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1088
call fcn.0042b680
push ebx
push esi
push edi
mov esi, ecx
call dword [sym.imp.WINMM.dll_timeGetTime]
xor edi, edi
mov dword [ebp - 8], eax
cmp eax, edi
jne 0x406419
mov dword [ebp - 8], 1
push 0x14
lea eax, [ebp - 0x28]
push edi
push eax
mov dword [ebp - 4], edi
call fcn.0042b620
mov eax, dword [esi + 0x290]
add esp, 0xc
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x19c]
push str.COMMS:_Restart_device_using_WilPMove_service
push dword [esi + 0x2b0]
mov dword [ebp - 0x10], eax
call fcn.0041e63d
pop ecx
pop ecx
cmp word [esi + 0x1b0], di
jne 0x4064bd
call dword [sym.imp.WINMM.dll_timeGetTime]
cmp eax, edi
jne 0x406468
push 1
pop eax
sub eax, dword [ebp - 8]
mov ecx, dword [ebp + 0x10]
cmp eax, ecx
jae 0x4064d4
sub ecx, eax
cmp ecx, 0x32
ja 0x40647c
push 0x32
pop ecx
push ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
test eax, eax
jne 0x406497
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4064db
jmp 0x406452
push dword [0x4552f0]
push 0x40000000
push 3
push edi
push edi
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4064e2
jmp 0x406452
push str.COMMS:_Giving_up_trying_to_connect_to_WilPMove_service_because_driver_is_closing
push dword [esi + 0x2b0]
call fcn.0041e63d
pop ecx
pop ecx
jmp 0x40662d
push str.COMMS:_Timed_out_trying_to_connect_to_WilPMove_service
jmp 0x4064c2
push str.COMMS:_Cant_find_WilPMove_service
jmp 0x4064c2
push edi
lea eax, [ebp - 0xc]
push edi
push eax
push ebx
mov dword [ebp - 0xc], 6
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jne 0x406514
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.COMMS:_Failed_to_set_WilPMove_pipe_client_state__error__u
push dword [esi + 0x2b0]
call fcn.0041e63d
add esp, 0xc
push dword [esi + 0x290]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x88]
push str.reset
push eax
call fcn.0042b1f0
push dword [ebp + 0xc]
lea eax, [ebp - 0x88]
push eax
call fcn.0042b200
add esp, 0x10
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1088]
push 0xffe
push eax
lea eax, [ebp - 0x88]
push eax
call fcn.0042bfb0
pop ecx
push eax
lea eax, [ebp - 0x88]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
mov edi, eax
test edi, edi
jne 0x4065e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x4065d4
push 0x2710
lea eax, [ebp - 0x14]
push edi
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x4065c0
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp - 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov edi, eax
test edi, edi
jne 0x4065e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.COMMS:_Failed_to_transact_with_WilPMove_pipe__error__u
jmp 0x4065da
push str.COMMS:_Abandoned_waiting_for_WilPMove_to_restart_device
push dword [esi + 0x2b0]
call fcn.0041e63d
pop ecx
pop ecx
jmp 0x4065e8
push eax
push str.COMMS:_Failed_to_transact_with_WilPMove_pipe__non_overlapped___error__u
push dword [esi + 0x2b0]
call fcn.0041e63d
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_CancelIo]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x40662d
mov eax, dword [ebp - 4]
and byte [ebp + eax - 0x1088], 0
lea eax, [ebp - 0x1088]
push eax
call fcn.0042bbaf
cmp eax, 0xc8
pop ecx
je 0x406633
push eax
push str.COMMS:_Error__d_from_WilPMove_service
push dword [esi + 0x2b0]
call fcn.0041e63d
add esp, 0xc
mov ax, 1
jmp 0x406648
push str.COMMS:_Restarted_device_using_WilPMove_service
push dword [esi + 0x2b0]
call fcn.0041e63d
pop ecx
xor ax, ax
pop ecx
pop edi
pop esi
pop ebx
leave
ret 0xc