Function at 0x4054ef
Capabilities:
Check for time delay via gettickcount
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create two anonymous pipes
Get file size
Read file on windows
Terminate process
Write and execute a file
Write file on windows
Write pipe

Disassembly:
call fcn.00401018
sub esp, 0x70
mov ebx, esp
cmp byte [0x405f0d], 1
je 0x405529
test dword [ebp + 0x28], 1
jne 0x40551a
push 0
push dword [ebp + 0x14]
push 0x12
call fcn.004023fa
mov dword [ebp + 0x14], eax
push 0
push dword [ebp + 0x10]
push 0x11
call fcn.004023fa
mov dword [ebp + 0x10], eax
mov dword [ebx], 0xc
mov dword [ebx + 4], 0
mov dword [ebx + 8], 1
push 0
push ebx
lea edx, [ebx + 0xc]
push edx
lea ecx, [ebx + 0x10]
push ecx
call dword [sym.imp.KERNEL32.DLL_CreatePipe]
test eax, eax
je 0x4058d9
push 0
push ebx
lea edx, [ebx + 0x14]
push edx
lea ecx, [ebx + 0x18]
push ecx
call dword [sym.imp.KERNEL32.DLL_CreatePipe]
test eax, eax
je 0x4058c7
lea edi, [ebx + 0x1c]
mov ecx, 0x44
xor al, al
rep stosb byte es:[edi], al
lea edi, [ebx + 0x1c]
mov dword [edi], 0x44
mov ecx, dword [ebx + 0x18]
mov dword [edi + 0x38], ecx
mov ecx, dword [ebx + 0xc]
mov dword [edi + 0x3c], ecx
mov dword [edi + 0x2c], 0x101
lea esi, [ebx + 0x60]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
push esi
push edi
push 0
push dword [ebp + 0x14]
cmp byte [0x405f0d], 0
je 0x4055c9
push 0x20
jmp 0x4055db
test dword [ebp + 0x28], 1
je 0x4055d6
push 0x20
jmp 0x4055db
push 0x420
push 1
push ebx
push ebx
push 0
push dword [ebp + 0x10]
cmp byte [0x405f0d], 0
je 0x4055f5
call dword [sym.imp.KERNEL32.DLL_CreateProcessA]
jmp 0x4055fb
call dword [sym.imp.KERNEL32.DLL_CreateProcessW]
test eax, eax
je 0x4058b5
mov edx, dword [ebp + 0x24]
or dword [edx], 0xc80
mov edx, dword [ebp + 0x20]
mov ecx, dword [edx + 0x20]
jecxz 0x40562b
mov eax, dword [edx + 0x10]
add eax, dword [edx + 0x1c]
lea edx, [ebx + 0x1c]
push 0
push edx
push ecx
push eax
push dword [ebx + 0x14]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [ebp + 0x18]
mov ecx, eax
push eax
call fcn.0040147e
mov edi, eax
sub ecx, 4
mov dword [edi], ecx
add edi, 4
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov dword [ebx + 0x24], eax
push 0xa
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x40566c
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov edx, dword [ebp + 0x1c]
sub eax, dword [ebx + 0x24]
cmp eax, edx
ja 0x40586a
push 1
mov eax, esp
push 4
push esp
push eax
push 4
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [fcn.004059a3]
test eax, eax
je 0x405690
pop eax
pop eax
test eax, eax
je 0x40586a
mov edx, dword [ebp + 0x20]
mov edx, dword [edx]
mov edx, dword [edx + 4]
cmp dword [edx], 0x54534f50
jne 0x4056d8
push dword [edi - 4]
push esp
push edi
push 0x64
push 4
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [0x405997]
test eax, eax
je 0x4056c2
cmp eax, 3
jbe 0x40586a
pop eax
test eax, eax
je 0x4056d8
lea ecx, [ebx + 0x1c]
push 0
push ecx
push eax
push edi
push dword [ebx + 0x14]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push 0
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
test eax, eax
jne 0x405707
lea ecx, [ebx + 0x1c]
push ecx
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_GetExitCodeProcess]
mov ecx, dword [ebx + 0x1c]
cmp ecx, 0x103
je 0x405649
jmp 0x405874
cmp dword [edi - 4], eax
jae 0x40570f
mov eax, dword [edi - 4]
lea ecx, [ebx + 0x1c]
push 0
push ecx
push eax
push edi
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
cmp dword [ebp + 0x24], 0
je 0x4057c7
cmp dword [ebp + 0x24], 1
je 0x4057c7
mov dword [ebx + 0x20], 0
mov ecx, dword [ebx + 0x1c]
mov edx, edi
mov eax, edi
cmp ecx, 4
jb 0x4057a2
cmp dword [edx], 0xa0d0a0d
je 0x4057a2
cmp byte [edx], 0x3a
jne 0x40579f
mov byte [edx], 0
push eax
mov eax, edx
cmp ecx, 2
jb 0x405769
cmp word [edx], 0xa0d
je 0x405771
inc edx
loop 0x40575a
add esp, 4
mov byte [eax], 0x3a
jmp 0x4057a2
xchg dword [esp], eax
push eax
call fcn.00404dd1
cmp eax, 0x45af5dad
pop eax
mov byte [eax], 0x3a
jne 0x40579a
inc eax
cmp byte [eax], 0x20
jne 0x40578c
inc eax
mov byte [edx], 0
mov dword [ebx + 0x20], edx
mov edx, dword [ebp + 0x24]
mov dword [edx + 8], eax
jmp 0x4057a2
mov eax, edx
add eax, 2
inc edx
loop 0x405742
push 0x1388
push dword [ebp + 0x24]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [0x405a23]
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x4057c0
mov byte [eax], 0xd
mov dword [ebp + 0x24], 1
cmp dword [ebp + 0x24], 0
je 0x405841
mov ecx, dword [ebx + 0x1c]
mov edx, edi
cmp ecx, 4
jb 0x405849
cmp dword [edx], 0xa0d0a0d
jne 0x40583e
mov dword [ebp + 0x24], 0
sub edx, edi
add edx, 2
mov ecx, dword [ebx + 0x1c]
sub ecx, edx
sub ecx, 2
push edx
push esp
push edi
push 0x1388
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [fcn.0040599b]
pop eax
test ecx, ecx
je 0x405649
call fcn.00404267
push ecx
push esp
mov eax, edi
add eax, edx
add eax, 2
push eax
push 0x1388
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [fcn.0040599b]
pop ecx
test eax, eax
jne 0x40586a
jmp 0x405649
inc edx
loop 0x4057d2
mov ecx, dword [ebx + 0x1c]
call fcn.00404267
lea eax, [ebx + 0x1c]
push eax
push edi
push 0x1388
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [fcn.0040599b]
test eax, eax
jne 0x40586a
jmp 0x405649
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
call fcn.004042b2
cmp byte [0x405f0d], 1
je 0x40589b
test dword [ebp + 0x28], 1
jne 0x405893
push dword [ebp + 0x14]
call fcn.0040156e
push dword [ebp + 0x10]
call fcn.0040156e
lea ecx, [edi - 4]
push ecx
call fcn.0040156e
push dword [esi + 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebx + 0x14]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
call fcn.00401026
ret 0x24