Function at 0x406290
Capabilities:
Check for foreground window switch
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4f25f6
mov eax, dword fs:[0]
push eax
mov eax, 0x44048
call fcn.004bbbb0
mov eax, dword [0x53de10]
xor eax, esp
mov dword [esp + 0x44040], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x53de10]
xor eax, esp
push eax
lea eax, [esp + 0x4405c]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
push 0xf
push str..pipeezPDF_
lea eax, [esp + 0x40]
mov dword [esp + 0x4406c], ebx
call fcn.0040b690
mov eax, dword [esp + 0x4406c]
push eax
lea ecx, [esp + 0x20]
call fcn.004171f0
add esp, 4
push ebx
push eax
or eax, 0xffffffff
lea esi, [esp + 0x40]
mov byte [esp + 0x4406c], 1
call fcn.0040b5a0
mov ebp, 0x10
cmp dword [esp + 0x34], ebp
jb 0x40633a
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004b8c4b
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
xor edi, edi
cmp dword [esp + 0x50], ebp
mov eax, dword [esp + 0x3c]
jae 0x406350
lea eax, [esp + 0x3c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
cmp eax, 1
jne 0x406388
cmp dword [esp + 0x50], ebp
mov eax, dword [esp + 0x3c]
jae 0x40636c
lea eax, [esp + 0x3c]
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
push eax
call esi
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4063a1
mov ebp, 0x10
jmp 0x406342
cmp edi, 1
jg 0x40653d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
add edi, 1
jmp 0x406342
mov edx, dword [str.closeclose]
mov eax, dword [0x52b8e4]
mov ecx, dword [0x52b8e8]
push 0x3ff4
mov dword [esp + 0x58], edx
lea edx, [esp + 0x64]
push ebx
push edx
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ecx
call fcn.004bbbe0
lea eax, [esp + 0x60]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4063d8
push ebx
lea ecx, [esp + 0x18]
push ecx
sub eax, edx
push eax
lea edx, [esp + 0x60]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4064fc
cmp dword [esp + 0x14], ebx
je 0x4064fc
push 0x3ffff
lea eax, [esp + 0x4059]
push ebx
push eax
mov byte [esp + 0x4060], bl
call fcn.004bbbe0
add esp, 0xc
push ebx
lea ecx, [esp + 0x1c]
push ecx
push 0x40000
lea edx, [esp + 0x4060]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406484
push 0x200
push ebx
push 0x54b218
call fcn.004bbbe0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR__process_setdata_PIPE_ReadFile____code__d_n
push 0x54b218
call fcn.004b913a
add esp, 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x38]
call fcn.00401830
jmp 0x406584
mov edi, str.TRUE
lea esi, [esp + 0x4054]
mov ecx, 5
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4064d2
mov ecx, dword [esp + 0x4406c]
push ecx
call fcn.004043c0
mov edi, dword [sym.imp.USER32.dll_SetForegroundWindow]
add esp, 4
mov esi, eax
push esi
call edi
mov ebx, dword [sym.imp.USER32.dll_GetForegroundWindow]
call ebx
cmp esi, eax
push esi
je 0x4064cc
call edi
call ebx
cmp esi, eax
jne 0x4064d2
push esi
call dword [sym.imp.USER32.dll_SetFocus]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x4406c]
push edx
call fcn.004041a0
add esp, 4
lea ecx, [esp + 0x38]
call fcn.00401830
mov eax, 1
jmp 0x406586
push 0x200
push ebx
push 0x54b218
call fcn.004bbbe0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR__process_setdata_PIPE_WriteFile____code__d_n
push 0x54b218
call fcn.004b913a
add esp, 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x50], 0x10
jb 0x406584
mov eax, dword [esp + 0x3c]
push eax
jmp 0x40657c
push 0x200
push ebx
push 0x54b218
call fcn.004bbbe0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x4406c]
push eax
push ecx
push str.ERROR__process_setdata_PIPE_Create____pid__d__code__d_n
push 0x54b218
call fcn.004b913a
add esp, 0x10
cmp dword [esp + 0x50], ebp
jb 0x406584
mov edx, dword [esp + 0x3c]
push edx
call fcn.004b8c4b
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x4405c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x44040]
xor ecx, esp
call fcn.004b883d
add esp, 0x44054
ret