Function at 0x428000
Capabilities:
Create pipe
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
mov esi, dword fs:[0x18]
sub esp, 0x6c
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x40]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreatePipe]
sub esp, 0x10
mov ebx, eax
mov eax, 0x11a1
call fcn.00427180
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.CreatePipe_failed:__lu_n
mov dword [esp + 8], eax
call fcn.00427ef0
mov eax, dword [sym.imp.kernel32.dll_AttachConsole]
mov dword [esp], edi
mov dword [ebp - 0x48], eax
call eax
sub esp, 4
mov ebx, eax
mov eax, 0x11a4
call fcn.00427180
mov edx, dword [esi + 0x34]
xor eax, eax
test ebx, ebx
jne 0x42808b
xor eax, eax
cmp edx, 5
sete al
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.AttachConsole_returned:__x__lu__n
call fcn.00427ef0
mov eax, 0x11a7
call fcn.00427180
mov esi, dword [sym.imp.ntdll.dll_RtlGetCurrentPeb]
call esi
mov dword [esp + 4], str.ConsoleHandle_is_NULL_n
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 0x10]
test eax, eax
setne al
movzx eax, al
mov dword [esp], eax
mov edi, dword fs:[0x18]
call fcn.00427ef0
mov eax, dword [sym.imp.kernel32.dll_FreeConsole]
mov dword [ebp - 0x44], eax
call eax
mov ebx, eax
mov eax, 0x11a9
call fcn.00427180
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.FreeConsole_failed:__lu_n
mov dword [esp + 8], eax
call fcn.00427ef0
mov eax, 0x11aa
call fcn.00427180
call esi
mov eax, dword [eax + 0x10]
mov ebx, dword [eax + 0x10]
call esi
mov dword [esp + 4], str.ConsoleHandle___p_n
mov dword [esp + 8], ebx
mov eax, dword [eax + 0x10]
mov edx, dword [eax + 0x10]
xor eax, eax
test edx, edx
sete al
mov dword [esp], eax
call fcn.00427ef0
mov eax, dword [ebp - 0x3c]
mov dword [esp], 0xfffffff4
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_SetStdHandle]
mov dword [ebp - 0x58], eax
call eax
mov eax, 0x11af
sub esp, 8
call fcn.00427180
mov ebx, dword [sym.imp.kernel32.dll_SetConsoleCtrlHandler]
mov dword [esp + 4], 0
mov dword [esp], 0x426e10
call ebx
sub esp, 8
test eax, eax
sete al
mov dword [esp + 4], str.dummy_ctrl_handler_shouldnt_be_set_n
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov dword [esp + 4], 1
mov dword [esp], 0x426e10
call ebx
sub esp, 8
mov dword [ebp - 0x50], eax
mov eax, 0x11b1
call fcn.00427180
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.SetConsoleCtrlHandler_failed:__lu_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x50]
mov dword [esp], ecx
call fcn.00427ef0
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
mov eax, dword [ebp - 0x48]
call eax
sub esp, 4
mov dword [ebp - 0x50], eax
mov eax, 0x11b4
call fcn.00427180
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.AttachConsole_failed:__lu_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x50]
mov dword [esp], ecx
call fcn.00427ef0
mov eax, 0x11b6
call fcn.00427180
mov eax, dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [esp], 0xfffffff4
mov dword [ebp - 0x54], eax
call eax
sub esp, 4
mov dword [esp + 4], str.std_handle_not_set_to_console_n
cmp dword [ebp - 0x3c], eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov eax, 0x11b7
call fcn.00427180
call esi
mov dword [esp + 4], str.ConsoleHandle_is_NULL_n
mov eax, dword [eax + 0x10]
mov ecx, dword [eax + 0x10]
xor eax, eax
test ecx, ecx
setne al
mov dword [esp], eax
call fcn.00427ef0
mov eax, dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x58f33b
mov dword [ebp - 0x5c], eax
call eax
sub esp, 0x1c
mov esi, eax
mov eax, 0x11ba
call fcn.00427180
xor eax, eax
cmp esi, 0xffffffff
mov dword [esp + 4], str.Could_not_open_console_n
setne al
mov dword [esp], eax
call fcn.00427ef0
lea eax, [ebp - 0x38]
mov dword [esp], esi
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_ReadConsoleOutputCharacterA]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 6
mov dword [ebp - 0x50], eax
call eax
sub esp, 0x14
mov esi, eax
mov eax, 0x11bd
call fcn.00427180
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.ReadConsoleOutputCharacterA_failed:__lu_n
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.00427ef0
mov eax, 0x11be
call fcn.00427180
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], str.len___lu_n
cmp eax, 6
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov eax, 0x11bf
call fcn.00427180
cmp dword [ebp - 0x2c], 0x65726150
je 0x4287f8
mov eax, 1
xor eax, 1
mov dword [esp + 4], str.Unexpected_console_output_n
mov dword [esp], eax
call fcn.00427ef0
mov esi, dword [0x8f0770]
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test esi, esi
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x4283e6
call fcn.0057d110
mov dword [eax], 0x58f03f
mov dword [eax + 4], 0x11c2
mov dword [esp + 4], 0
mov dword [esp], 0x426e10
call ebx
sub esp, 8
test eax, eax
sete al
mov dword [esp + 4], str.AttachConsole___should_have_reset_ctrl_handlers_list_n
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x4283a0
mov eax, dword [ebp - 0x44]
call eax
mov ebx, eax
mov eax, 0x11c5
call fcn.00427180
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.FreeConsole_failed:__lu_n
mov dword [esp + 8], eax
call fcn.00427ef0
mov eax, dword [ebp - 0x40]
mov dword [esp], 0xfffffff6
mov dword [esp + 4], eax
mov edi, dword [ebp - 0x58]
call edi
mov eax, dword [ebp - 0x3c]
sub esp, 8
mov dword [esp + 4], eax
mov dword [esp], 0xfffffff5
call edi
sub esp, 8
mov dword [esp], 0xffffffff
mov eax, dword [ebp - 0x48]
call eax
sub esp, 4
mov ebx, eax
mov eax, 0x11cb
call fcn.00427180
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.AttachConsole_failed:__lu_n
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.00427ef0
mov eax, dword [0x707bbc]
test eax, eax
je 0x4285e4
lea edi, [ebp - 0x34]
mov dword [ebp - 0x30], 0
mov ebx, dword [esi + 0x20]
mov dword [ebp - 0x34], 0xbabebabe
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 4], 1
mov dword [esp], edi
call eax
sub esp, 8
mov dword [ebp - 0x38], eax
mov eax, 0x11d4
call fcn.00427180
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], str.Expected_2_processes__got__ld_n
cmp eax, 2
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov eax, 0x11d5
call fcn.00427180
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], str.Unexpected_value_in_list__lu_n
cmp eax, 0xbabebabe
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov dword [esp + 4], 2
mov dword [esp], edi
call dword [0x707bbc]
sub esp, 8
mov dword [ebp - 0x38], eax
mov eax, 0x11d8
call fcn.00427180
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], str.Expected_2_processes__got__ld_n
cmp eax, 2
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov eax, 0x11d9
call fcn.00427180
mov ecx, dword [ebp - 0x4c]
mov eax, 1
cmp dword [ebp - 0x34], ecx
je 0x428574
xor eax, eax
cmp dword [ebp - 0x30], ecx
sete al
mov dword [esp], eax
mov dword [esp + 4], str.Parent_PID_not_in_list_n
call fcn.00427ef0
mov eax, 0x11da
call fcn.00427180
mov eax, 1
cmp dword [ebp - 0x34], ebx
je 0x4285a0
xor eax, eax
cmp dword [ebp - 0x30], ebx
sete al
mov dword [esp], eax
mov dword [esp + 4], str.PID_not_in_list_n
call fcn.00427ef0
mov eax, 0x11db
call fcn.00427180
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
mov dword [esp + 4], str.Unexpected_last_error:__lu_n
mov dword [esp + 8], edx
cmp dword [eax + 0x34], 0xdeadbeef
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov eax, 0x11de
call fcn.00427180
mov dword [esp], 0xfffffff6
mov edi, dword [ebp - 0x54]
call edi
sub esp, 4
mov dword [esp + 4], str.std_handle_not_set_to_console_n
cmp dword [ebp - 0x40], eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov eax, 0x11df
call fcn.00427180
mov dword [esp], 0xfffffff5
call edi
sub esp, 4
mov dword [esp + 4], str.std_handle_not_set_to_console_n
cmp dword [ebp - 0x3c], eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x58f33b
mov eax, dword [ebp - 0x5c]
call eax
sub esp, 0x1c
mov ebx, eax
mov eax, 0x11e2
call fcn.00427180
xor eax, eax
cmp ebx, 0xffffffff
mov dword [esp + 4], str.Could_not_open_console_n
setne al
mov dword [esp], eax
call fcn.00427ef0
lea eax, [ebp - 0x38]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 8], 6
mov dword [esp + 4], eax
mov dword [esp], ebx
mov eax, dword [ebp - 0x50]
call eax
sub esp, 0x14
mov esi, eax
mov eax, 0x11e5
call fcn.00427180
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str.ReadConsoleOutputCharacterA_failed:__lu_n
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.00427ef0
mov eax, 0x11e6
call fcn.00427180
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], str.len___lu_n
cmp eax, 6
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00427ef0
mov eax, 0x11e7
call fcn.00427180
cmp dword [ebp - 0x2c], 0x65726150
je 0x428810
mov eax, 1
xor eax, 1
mov dword [esp + 4], str.Unexpected_console_output_n
mov dword [esp], eax
call fcn.00427ef0
mov edx, str.Child
mov eax, ebx
call fcn.00427f10
mov dword [esp], ebx
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
call ebx
mov eax, dword [ebp - 0x44]
sub esp, 4
call eax
mov esi, eax
mov eax, 0x11ed
call fcn.00427180
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], esi
mov dword [esp + 4], str.FreeConsole_failed:__lu_n
mov dword [esp + 8], eax
call fcn.00427ef0
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call ebx
sub esp, 4
mov esi, eax
mov eax, 0x11f0
call fcn.00427180
mov dword [esp], esi
mov dword [esp + 4], str.pipe_in_is_no_longer_valid_n
call fcn.00427ef0
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call ebx
sub esp, 4
mov ebx, eax
mov eax, 0x11f2
call fcn.00427180
mov dword [esp], ebx
mov dword [esp + 4], str.pipe_out_is_no_longer_valid_n
call fcn.00427ef0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
cmp word [ebp - 0x28], 0x746e
jne 0x42835d
jmp 0x428362
xor eax, eax
cmp word [ebp - 0x28], 0x746e
jne 0x42873b
jmp 0x428740