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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x476b5d
mov eax, dword fs:[0]
push eax
mov eax, 0xa8bc
call fcn.0042f9d0
mov eax, dword [0x4b34c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push 0x40
lea eax, [ebp - 0xa8c4]
push ebx
push eax
mov edi, ecx
mov dword [ebp - 0xa85c], ebx
mov dword [ebp - 0xa8c8], 0x44
call fcn.00427230
add esp, 0xc
push 0x9fff
lea ecx, [ebp - 0xa817]
push ebx
push ecx
mov byte [ebp - 0xa818], bl
call fcn.00427230
lea edx, [ebp - 0xa818]
add esp, 0xc
mov eax, edi
sub edx, edi
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x4200a0
sub esp, 0x1c
mov esi, esp
mov eax, edi
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
mov dword [ebp - 0xa858], esp
mov byte [esi], bl
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x4200c6
sub eax, ecx
push eax
push edi
mov ecx, esi
call fcn.004059e0
sub esp, 0x1c
mov dword [ebp - 4], ebx
mov ecx, esp
mov dword [ebp - 0xa868], esp
push 0xa
mov edi, 0xf
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.ExecuteCmd
mov byte [ecx], bl
call fcn.004059e0
or esi, 0xffffffff
mov ecx, 0x4bc400
mov dword [ebp - 4], esi
call fcn.00402560
push ebx
push ebx
lea edx, [ebp - 0xa860]
push edx
lea eax, [ebp - 0xa86c]
push eax
mov dword [ebp - 0xa86c], ebx
mov dword [ebp - 0xa860], ebx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov ecx, dword [ebp - 0xa860]
push 1
push 1
push ecx
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0x44
lea edx, [ebp - 0xa8c8]
push ebx
push edx
call fcn.00427230
mov eax, dword [ebp - 0xa860]
add esp, 0xc
lea ecx, [ebp - 0xa880]
push ecx
lea edx, [ebp - 0xa8c8]
push edx
push ebx
push ebx
push 0x8000000
push 1
mov dword [ebp - 0xa888], eax
mov dword [ebp - 0xa88c], eax
xor eax, eax
push ebx
mov word [ebp - 0xa898], ax
push ebx
lea eax, [ebp - 0xa818]
push eax
push ebx
mov dword [ebp - 0xa89c], 0x100
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp eax, ebx
jne 0x4201d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0xa86c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov dword [ebp - 0xa85c], eax
call esi
mov edx, dword [ebp - 0xa860]
push edx
call esi
mov eax, dword [ebp - 0xa85c]
jmp 0x420584
mov eax, dword [ebp - 0xa860]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xa868], esp
push 0x16
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.CreateProcess_success_
mov byte [ecx], bl
call fcn.004059e0
sub esp, 0x1c
mov dword [ebp - 4], 1
mov ecx, esp
mov dword [ebp - 0xa858], esp
push 0xa
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.ExecuteCmd
mov byte [ecx], bl
call fcn.004059e0
mov ecx, 0x4bc400
mov dword [ebp - 4], esi
call fcn.00402560
push 0x800
lea ecx, [ebp - 0x817]
push ebx
push ecx
mov byte [ebp - 0x818], bl
call fcn.00427230
add esp, 0xc
mov dword [ebp - 0xa864], ebx
mov dword [ebp - 0xa83c], edi
mov dword [ebp - 0xa840], ebx
mov byte [ebp - 0xa850], bl
mov dword [ebp - 4], 2
mov byte [ebp - 0xa851], bl
mov edx, dword [ebp - 0xa880]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 1
push edx
call esi
mov ecx, dword [ebp - 0xa86c]
push ebx
cmp eax, 0x102
lea eax, [ebp - 0xa864]
push eax
push ebx
push ebx
push ebx
push ecx
sete byte [ebp - 0xa852]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp byte [ebp - 0xa852], bl
jne 0x4202bb
cmp dword [ebp - 0xa864], ebx
jbe 0x42045e
push ebx
push 0x485602
lea ecx, [ebp - 0xa834]
mov dword [ebp - 0xa820], edi
mov dword [ebp - 0xa824], ebx
mov byte [ebp - 0xa834], bl
call fcn.004059e0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0xa864]
cmp eax, ebx
jbe 0x420408
mov dword [ebp - 0xa858], eax
cmp eax, 0x800
jbe 0x420308
mov eax, 0x800
mov dword [ebp - 0xa858], eax
mov ecx, dword [ebp - 0xa86c]
push ebx
lea edx, [ebp - 0xa858]
push edx
push eax
lea eax, [ebp - 0x818]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0xa858]
mov byte [ebp + eax - 0x818], bl
cmp eax, ebx
jbe 0x4203cc
mov edx, 0x41bc80
test edx, edx
je 0x420358
lea eax, [ebp - 0x818]
push eax
push 0x491f7c
push ebx
call fcn.0041d4f0
add esp, 0xc
sub esp, 0x1c
mov ecx, esp
lea eax, [ebp - 0x818]
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
mov dword [ebp - 0xa868], esp
mov byte [ecx], bl
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x420374
sub eax, esi
push eax
lea edx, [ebp - 0x818]
push edx
call fcn.004059e0
sub esp, 0x1c
mov byte [ebp - 4], 4
mov ecx, esp
mov dword [ebp - 0xa870], esp
push 0xa
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.exe_output
mov byte [ecx], bl
call fcn.004059e0
mov ecx, 0x4bc400
mov byte [ebp - 4], 3
call fcn.00402560
call fcn.0042397c
add eax, 0x20
push eax
call fcn.00421767
add esp, 4
lea eax, [ebp - 0x818]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4203d5
sub eax, edx
push eax
lea eax, [ebp - 0x818]
lea ecx, [ebp - 0xa834]
call fcn.00404550
mov eax, dword [ebp - 0xa864]
sub eax, dword [ebp - 0xa858]
mov dword [ebp - 0xa864], eax
jne 0x4202f0
cmp dword [ebp - 0xa824], ebx
jne 0x420418
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x10
push str.Update_completed
lea eax, [ebp - 0xa834]
push eax
xor eax, eax
call fcn.004180f0
cmp eax, 0xffffffff
je 0x420439
mov byte [ebp - 0xa851], 1
mov byte [ebp - 4], 2
cmp dword [ebp - 0xa820], 0x10
jb 0x420272
mov ecx, dword [ebp - 0xa834]
push ecx
call fcn.00421a4e
add esp, 4
jmp 0x420272
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xa870], esp
push 0x10
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.Read_info_finish
mov byte [ecx], bl
call fcn.004059e0
sub esp, 0x1c
mov byte [ebp - 4], 5
mov ecx, esp
mov dword [ebp - 0xa868], esp
push 0xa
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.ExecuteCmd
mov byte [ecx], bl
call fcn.004059e0
mov ecx, 0x4bc400
mov byte [ebp - 4], 2
call fcn.00402560
mov edx, dword [ebp - 0xa880]
push 0x30d40
push edx
call esi
cmp eax, 0x102
jne 0x4204f8
mov eax, dword [ebp - 0xa880]
mov esi, dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0xffffffffffffffff
push eax
call esi
mov ecx, dword [ebp - 0xa880]
push 0x2710
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4204f8
mov edx, dword [ebp - 0xa880]
push 0xffffffffffffffff
push edx
call esi
mov ecx, dword [ebp - 0xa880]
lea eax, [ebp - 0xa85c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [ebp - 0xa87c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [ebp - 0xa880]
push eax
call esi
mov edx, dword [ebp - 0xa85c]
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xa870], esp
push edx
push ecx
call fcn.004019c0
sub esp, 0x14
mov byte [ebp - 4], 6
mov ecx, esp
mov dword [ebp - 0xa868], esp
push 0x11
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.ExecuteCmd_return
mov byte [ecx], bl
call fcn.004059e0
mov ecx, 0x4bc400
mov byte [ebp - 4], 2
call fcn.00402560
mov eax, dword [ebp - 0xa85c]
cmp eax, ebx
jne 0x420584
cmp byte [ebp - 0xa851], bl
jne 0x420584
mov eax, 0xffffd8f1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042097b
mov esp, ebp
pop ebp
ret