Function at 0x404b50
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create two anonymous pipes
Read file on windows
Read pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68c
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x62c]
xor ebx, ebx
mov dword [ebp - 0x60c], edx
push ebx
push eax
lea eax, [ebp - 0x620]
mov dword [ebp - 0x618], ebx
push eax
lea eax, [ebp - 0x618]
mov dword [ebp - 0x620], ebx
push eax
mov dword [ebp - 0x614], ebx
mov dword [ebp - 0x61c], ebx
mov dword [ebp - 0x62c], 0xc
mov dword [ebp - 0x624], 1
mov dword [ebp - 0x628], ebx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x404bf6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x400
push edi
push 0
mov esi, eax
push esi
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004168de
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0
push 1
push dword [ebp - 0x618]
call esi
test eax, eax
je 0x404bc3
push 0
lea eax, [ebp - 0x62c]
push eax
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x614]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x404bc3
push 0
push 1
push dword [ebp - 0x614]
call esi
test eax, eax
je 0x404bc3
push 0x200
lea eax, [ebp - 0x208]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x208]
push dword [ebp - 0x60c]
push str.PowerShell.exe
push 0x419ff8
push pe_nt_image_headers32
push eax
call fcn.00404b30
add esp, 0x14
lea eax, [ebp - 0x688]
xorps xmm0, xmm0
movups xmmword [ebp - 0x63c], xmm0
push 0x44
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x61c]
add esp, 0xc
mov dword [ebp - 0x648], eax
mov eax, dword [ebp - 0x620]
or dword [ebp - 0x65c], 0x101
mov dword [ebp - 0x64c], eax
xor eax, eax
mov word [ebp - 0x658], ax
lea eax, [ebp - 0x63c]
push eax
lea eax, [ebp - 0x688]
mov dword [ebp - 0x688], 0x44
push eax
push 0
push 0
push 0
push 1
push 0
push 0
lea eax, [ebp - 0x208]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x404bc3
push 0xffffffffffffffff
push dword [ebp - 0x63c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x63c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x638]
call esi
push 0x400
lea eax, [ebp - 0x608]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
lea eax, [ebp - 0x60c]
push 0
push eax
push 0
push 0
push 0
push dword [ebp - 0x614]
mov dword [ebp - 0x60c], ebx
call esi
push 0
cmp dword [ebp - 0x60c], ebx
jbe 0x404d8f
lea eax, [ebp - 0x610]
push eax
push 0x400
lea eax, [ebp - 0x608]
push eax
push dword [ebp - 0x614]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, 0xffff
jmp 0x404dcd
lea eax, [ebp - 0x60c]
push eax
push 0
push 0
push 0
push dword [ebp - 0x618]
call esi
cmp dword [ebp - 0x60c], ebx
jbe 0x404dcd
push 0
lea eax, [ebp - 0x610]
push eax
push 0x400
lea eax, [ebp - 0x608]
push eax
push dword [ebp - 0x618]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x608]
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0
call esi
cmp eax, 0x400
jbe 0x404df4
push 0x400
jmp 0x404df5
push eax
push edi
push 0xffffffffffffffff
lea eax, [ebp - 0x608]
push eax
push 0
push 0
call esi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004168de
mov esp, ebp
pop ebp
ret