Function at 0x401870
Capabilities:
Create pipe
Create process on windows
Read file on windows
Read pipe

Disassembly:
mov eax, 0x2020
call fcn.004032e0
push ebx
push ebp
push esi
push edi
push str.Exec_Pipe_n_t
call fcn.00401860
mov ebp, dword [esp + 0x2038]
push ebp
call fcn.00401860
push 0x40d4b8
call fcn.00401860
mov esi, dword [sym.imp.KERNEL32.dll_CreatePipe]
add esp, 0xc
lea eax, [esp + 0x30]
lea ecx, [esp + 0x2c]
push 0x2000
push eax
lea edx, [esp + 0x28]
xor ebx, ebx
push ecx
push edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], 1
call esi
test eax, eax
jne 0x401908
pop edi
pop esi
pop ebp
mov dword [0x432740], 0xc5
or eax, 0xffffffff
pop ebx
add esp, 0x2020
ret
lea eax, [esp + 0x30]
push 0x2000
lea ecx, [esp + 0x28]
push eax
lea edx, [esp + 0x20]
push ecx
push edx
call esi
test eax, eax
jne 0x40193a
pop edi
pop esi
pop ebp
mov dword [0x432740], 0xcb
or eax, 0xffffffff
pop ebx
add esp, 0x2020
ret
lea eax, [esp + 0x30]
push 0x2000
lea ecx, [esp + 0x2c]
push eax
lea edx, [esp + 0x24]
push ecx
push edx
call esi
test eax, eax
jne 0x40196c
pop edi
pop esi
pop ebp
mov dword [0x432740], 0xd1
or eax, 0xffffffff
pop ebx
add esp, 0x2020
ret
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x4c]
mov edx, dword [esp + 0x20]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], ecx
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x4c]
push eax
push ecx
push ebx
push ebx
mov dword [esp + 0x94], edx
push 8
push 1
lea edx, [esp + 0x48]
push ebx
push edx
push ebp
push ebx
mov dword [esp + 0x74], 0x44
mov dword [esp + 0xa0], 0x100
mov word [esp + 0xa4], bx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4019ef
pop edi
pop esi
pop ebp
mov dword [0x432740], 0xf0
or eax, 0xffffffff
pop ebx
add esp, 0x2020
ret
mov eax, dword [esp + 0x3c]
push 0xffffffffffffffff
push eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
lea ecx, [esp + 0x14]
push ebx
push ecx
push ebx
push ebx
push ebx
push edx
call edi
test eax, eax
jne 0x401a36
pop edi
pop esi
pop ebp
mov dword [0x432740], 0xfa
or eax, 0xffffffff
pop ebx
add esp, 0x2020
ret
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
jbe 0x401a8f
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push ebx
push eax
lea ecx, [esp + 0x98]
push 0xfcf
push ecx
push edx
call esi
mov eax, dword [esp + 0x14]
push str.Read_stderr_n_t
mov byte [esp + eax + 0x94], bl
call fcn.00401860
lea ecx, [esp + 0x94]
push ecx
call fcn.00401860
push 0x40d4b8
call fcn.00401860
add esp, 0xc
jmp 0x401a96
mov byte [esp + 0x90], bl
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x10]
push ebx
push edx
push ebx
push ebx
push ebx
push eax
call edi
test eax, eax
jne 0x401ac2
pop edi
pop esi
pop ebp
mov dword [0x432740], 0x10a
or eax, 0xffffffff
pop ebx
add esp, 0x2020
ret
cmp dword [esp + 0x10], ebx
jbe 0x401b13
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push ebx
push ecx
lea edx, [esp + 0x1068]
push 0xfcf
push edx
push eax
call esi
mov ecx, dword [esp + 0x10]
push str.Read_stdout_n_t
mov byte [esp + ecx + 0x1064], bl
call fcn.00401860
lea edx, [esp + 0x1064]
push edx
call fcn.00401860
push 0x40d4b8
call fcn.00401860
add esp, 0xc
jmp 0x401b1a
mov byte [esp + 0x1060], bl
mov eax, dword [esp + 0x2040]
mov ecx, dword [esp + 0x3c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [esp + 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x40]
push eax
call esi
mov ebp, dword [esp + 0x203c]
cmp ebp, ebx
je 0x401bbd
cmp dword [esp + 0x14], ebx
jbe 0x401bba
lea edi, [esp + 0x90]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.00403726
mov edx, eax
add esp, 4
cmp edx, ebx
je 0x401ba0
lea edi, [esp + 0x90]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp], edx
jmp 0x401bbd
mov dword [0x43273c], ebx
mov dword [0x42ff38], 0x40d480
mov dword [0x432740], 0x126
mov dword [ebp], ebx
mov ebp, dword [esp + 0x2038]
cmp ebp, ebx
je 0x401c39
cmp dword [esp + 0x10], ebx
jbe 0x401c36
lea edi, [esp + 0x1060]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.00403726
mov edx, eax
add esp, 4
cmp edx, ebx
je 0x401c1c
lea edi, [esp + 0x1060]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp], edx
jmp 0x401c39
mov dword [0x43273c], ebx
mov dword [0x42ff38], 0x40d480
mov dword [0x432740], 0x137
mov dword [ebp], ebx
mov ecx, dword [esp + 0x24]
push ecx
call esi
mov edx, dword [esp + 0x18]
push edx
call esi
mov eax, dword [esp + 0x28]
push eax
call esi
mov ecx, dword [esp + 0x1c]
push ecx
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
mov eax, dword [esp + 0x2c]
push eax
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2020
ret