Function at 0x408e30
Capabilities:
Check os version
Create pipe
Create process on windows
Create reverse shell
Create two anonymous pipes
Manipulate console buffer
Read file on windows
Read pipe
Write and execute a file
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4e0
push ebx
xor eax, eax
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
push eax
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [0x411878]
mov dword [ebp - 0x20], eax
add eax, 0x109
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x4c], 0xc
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], 1
call fcn.00407da0
add esp, 4
push str.__Command__
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, dword [sym.imp.KERNEL32.dll_CreatePipe]
push ebx
lea edx, [ebp - 0x4c]
push edx
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x24]
push ecx
call edi
test eax, eax
jne 0x408ed6
mov edx, dword [0x411878]
push esi
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
lea eax, [ebx + 1]
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x2c]
push edx
call edi
test eax, eax
jne 0x408f15
mov eax, dword [0x411878]
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [ebp - 0x1c]
push edx
call esi
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 2
push 0
push 0
lea eax, [ebp - 0x14]
push eax
call edi
mov ecx, dword [ebp - 0x24]
push eax
push ecx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov edx, dword [ebp - 0x24]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call ebx
push 2
push 0
push 0
lea eax, [ebp - 0xc]
push eax
call edi
mov ecx, dword [ebp - 0x28]
push eax
push ecx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov edx, dword [ebp - 0x28]
push edx
call ebx
push 0x44
lea eax, [ebp - 0xe0]
push 0
push eax
call fcn.0040b0a0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
add esp, 0xc
cmp byte [ebp + 0x10], 0
mov dword [ebp - 0xe0], 0x44
mov dword [ebp - 0xb4], 0x100
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xa8], ecx
mov dword [ebp - 0xa4], eax
je 0x408fc1
cmp dword [ebp - 0x10], 0x80000000
jb 0x408fba
xor edx, edx
mov word [ebp - 0xb0], dx
jmp 0x408fc1
mov dword [ebp - 0x18], 0x8000000
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0xe0]
push ecx
push 0
push 0
push edx
push 1
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x409019
push esi
push eax
mov eax, dword [0x411878]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x14]
push ecx
call ebx
mov edx, dword [ebp - 0x1c]
push edx
call ebx
mov eax, dword [ebp - 0x2c]
push eax
call ebx
mov ecx, dword [ebp - 0xc]
push ecx
call ebx
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 4]
push edx
push 0xd
push str._arg_______r_n
push eax
call edi
cmp dword [ebp - 0x20], 0
jle 0x40916c
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0x40c54c
mov dword [ebp - 0x98], 0x40c4f0
mov dword [ebp - 0x88], 0x40c520
call fcn.00408070
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], 0
test eax, eax
jle 0x409161
mov edi, edi
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x18]
push edx
push eax
lea ecx, [ebp - 0x9c]
push ecx
mov byte [ebp - 5], 1
call fcn.004046e0
mov ebx, dword [ebp - 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0
lea edx, [ebp - 4]
push edx
push 9
lea esi, [eax + 1]
mov eax, dword [ebp - 0xc]
push str._arg__
push eax
call edi
cmp word [ebx], 0x22
je 0x4090d5
mov edx, dword [ebp - 0xc]
push 0
lea ecx, [ebp - 4]
push ecx
push 1
push 0x40c330
push edx
call edi
mov byte [ebp - 5], 0
mov eax, dword [0x411878]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x18]
push 0
push 0
push esi
mov ebx, eax
push ebx
push 0xffffffffffffffff
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebp - 0xc]
push 0
lea edx, [ebp - 4]
push edx
dec esi
push esi
push ebx
push eax
call edi
mov ecx, dword [0x411878]
push ebx
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp byte [ebp - 5], 0
jne 0x409134
mov eax, dword [ebp - 0xc]
push 0
lea edx, [ebp - 4]
push edx
push 1
push 0x40c330
push eax
call edi
mov edx, dword [ebp - 0xc]
push 0
lea ecx, [ebp - 4]
push ecx
push 2
push 0x40c240
push edx
call edi
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0x20]
jl 0x409080
lea ecx, [ebp - 0x9c]
call fcn.00408230
mov edi, dword [ebp + 8]
cmp byte [edi], 0
je 0x4094b2
mov cl, byte [edi]
xor eax, eax
mov byte [ebp - 5], cl
test cl, cl
je 0x4091a5
jmp 0x409188
mov cl, byte [ebp - 5]
cmp cl, 0xd
je 0x40919e
cmp cl, 0xa
je 0x40919e
mov cl, byte [edi + eax + 1]
inc eax
mov byte [ebp - 5], cl
test cl, cl
jne 0x409185
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x4091ab
inc edi
jmp 0x4094a9
mov eax, dword [ebp - 0x10]
xor esi, esi
xor ebx, ebx
mov byte [edi + eax], 0
test eax, eax
jle 0x409246
mov edi, edi
cmp esi, 4
ja case.default.0x4091c5
jmp dword [esi*4 + 0x4095bc]
xor ecx, ecx
cmp byte [ebx + edi], 0x24
sete cl
mov esi, ecx
jmp 0x40923c
mov al, byte [ebx + edi]
cmp al, 0x61
je 0x4091e4
cmp al, 0x41
jne 0x40923a
mov esi, 2
jmp 0x40923c
mov al, byte [ebx + edi]
cmp al, 0x72
je 0x4091f6
cmp al, 0x52
jne 0x40923a
mov esi, 3
jmp 0x40923c
mov al, byte [ebx + edi]
cmp al, 0x67
je 0x409208
cmp al, 0x47
jne 0x40923a
mov esi, 4
jmp 0x40923c
mov al, byte [ebx + edi]
cmp al, 0x73
je 0x40921a
cmp al, 0x53
jne 0x40923a
mov esi, 5
jmp 0x409226
cmp esi, 5
jne 0x40923c
movzx edx, byte [ebx + edi + 1]
push edx
call dword [sym.imp.USER32.dll_IsCharAlphaNumericA]
test eax, eax
jne 0x40923c
mov byte [ebx + edi], 0x5f
xor esi, esi
inc ebx
cmp ebx, dword [ebp - 0x10]
jl 0x4091c0
xor esi, esi
push esi
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push edi
push ecx
call ebx
mov edx, dword [ebp - 4]
xor eax, eax
test edx, edx
je 0x409282
jmp 0x409270
mov cl, byte [eax + edi]
cmp cl, 0x20
je 0x40927d
cmp cl, 9
jne 0x4092d8
inc eax
cmp eax, edx
jb 0x409270
mov eax, dword [ebp - 0xc]
push 0
lea edx, [ebp - 4]
push edx
push 0x15
push str.__Write_Output___OK__
push eax
call ebx
mov edx, dword [ebp - 0xc]
push 0
lea ecx, [ebp - 4]
push ecx
push 2
push 0x40c240
push edx
call ebx
test esi, esi
jne 0x4092e5
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x14]
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x4092d2
cmp dword [ebp - 4], 0
jne 0x4092e5
push 0x64
call ebx
jmp 0x4092b2
cmp byte [eax + edi], 0x23
jne 0x409282
mov esi, 1
jmp 0x409295
mov eax, dword [ebp - 0x14]
push 0
lea edx, [ebp - 4]
push edx
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x4093b5
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea esp, [esp]
mov eax, dword [ebp - 4]
test eax, eax
jne 0x409321
test esi, esi
jne 0x4093b5
jmp 0x40932d
cmp eax, 0x400
jle 0x40932d
mov eax, 0x3ff
push 0
lea ecx, [ebp - 4]
push ecx
push eax
lea edx, [ebp - 0x4e0]
mov byte [ebp + eax - 0x4e0], 0
mov eax, dword [ebp - 0x14]
push edx
push eax
call ebx
mov eax, dword [ebp - 4]
cmp eax, 6
jb 0x409376
push str._OK__r_n
lea ecx, [ebp + eax - 0x4e6]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
mov eax, dword [ebp - 4]
jne 0x409376
sub eax, 6
mov dword [ebp - 4], eax
mov esi, 1
test eax, eax
je 0x409397
push 0
lea edx, [ebp - 4]
push edx
push eax
lea eax, [ebp - 0x4e0]
push eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x14]
push 0
lea ecx, [ebp - 4]
push ecx
push 0
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x409310
push edi
call dword [sym.imp.USER32.dll_CharLowerA]
mov esi, dword [sym.imp.SHLWAPI.dll_StrChrA]
push 0x22
push edi
call esi
push 0x23
push edi
mov ebx, eax
call esi
push str.read_host
push edi
mov esi, eax
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
je 0x409430
test ebx, ebx
je 0x4093e8
cmp eax, ebx
ja 0x409430
test esi, esi
je 0x4093f0
cmp eax, esi
ja 0x409430
push 0
lea eax, [ebp - 4]
push eax
push 0x400
lea ecx, [ebp - 0x4e0]
push ecx
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 4]
test eax, eax
je 0x409430
mov ecx, dword [ebp - 0x1c]
push 0
lea edx, [ebp - 4]
push edx
push eax
lea eax, [ebp - 0x4e0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push str.clear_host
push edi
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
je 0x409496
test ebx, ebx
je 0x409448
cmp eax, ebx
ja 0x409496
test esi, esi
je 0x409450
cmp eax, esi
ja 0x409496
xor edx, edx
push 0xfffffffffffffff5
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], edx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [ebp - 0x64]
mov esi, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movsx eax, word [ebp - 0x62]
movsx ecx, word [ebp - 0x64]
mov ebx, dword [ebp - 0x18]
imul eax, ecx
lea edx, [ebp - 0x20]
push edx
push ebx
push eax
push 0x20
push esi
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov al, byte [ebp - 5]
mov edx, dword [ebp - 0x10]
mov byte [edi + edx], al
test al, al
je 0x4094b2
mov eax, edx
lea edi, [edi + eax + 1]
cmp byte [edi], 0
jne 0x409178
mov edx, dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [ebp - 4]
push ecx
push 2
push 0x40c240
push edx
call esi
mov ecx, dword [ebp - 0xc]
push 0
lea eax, [ebp - 4]
push eax
push 4
push str.exit
push ecx
call esi
mov eax, dword [ebp - 0xc]
push 0
lea edx, [ebp - 4]
push edx
push 2
push 0x40c240
push eax
call esi
mov ecx, dword [ebp - 0x3c]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x14]
push 0
lea edx, [ebp - 4]
push edx
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x409580
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov eax, dword [ebp - 4]
test eax, eax
je 0x409580
cmp eax, 0x400
jle 0x409536
mov eax, 0x400
push 0
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x4e0]
push edx
push eax
call ebx
mov eax, dword [ebp - 4]
test eax, eax
je 0x409566
push 0
lea ecx, [ebp - 4]
push ecx
push eax
lea edx, [ebp - 0x4e0]
push edx
push 0xfffffffffffffff5
call edi
push eax
call esi
mov ecx, dword [ebp - 0x14]
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x409523
mov edx, dword [ebp - 0x40]
mov eax, dword [0x411878]
push edx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [ebp - 0x1c]
push edx
call esi
mov eax, dword [ebp - 0x38]
push eax
call esi
mov ecx, dword [ebp - 0x3c]
push ecx
call esi
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret