Function at 0x401120
Capabilities:
Accept command line arguments
Create pipe
Create process on windows
Create two anonymous pipes
Read file on windows
Set environment variable
Terminate process
Write and execute a file
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd4
push ebx
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
push esi
mov dword [ebp - 0x18], 0
movq qword [ebp - 0x3c], xmm0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x20], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, eax
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [eax + 5]
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea ecx, [ebx + ebx]
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x40131e
push edi
mov edi, esi
mov ecx, ebx
xor esi, esi
nop dword [eax + eax]
movzx eax, word [edi]
mov edx, eax
cmp eax, 0x20
je 0x40119f
cmp edx, 9
jne 0x4011ab
mov word [ecx], dx
inc esi
add ecx, 2
add edi, 2
jmp 0x401190
cmp edx, 0x22
jne 0x4011f1
add edi, 2
mov eax, edx
mov word [ecx], ax
inc esi
add ecx, 2
movzx eax, word [edi]
cmp eax, edx
je 0x4011e3
mov edx, eax
test dx, dx
je 0x401214
inc esi
test ecx, ecx
je 0x4011d5
mov word [ecx], dx
add ecx, 2
movzx eax, word [edi + 2]
add edi, 2
mov edx, eax
cmp eax, 0x22
jne 0x4011c5
mov eax, 0x22
inc esi
mov word [ecx], ax
add ecx, 2
jmp 0x401214
lea edi, [edi + 2]
test dx, dx
je 0x401214
cmp dx, 9
je 0x401214
inc esi
test ecx, ecx
je 0x40120a
mov word [ecx], dx
add ecx, 2
movzx eax, word [edi]
mov edx, eax
cmp eax, 0x20
jne 0x4011f1
test ecx, ecx
je 0x40121d
xor eax, eax
mov word [ecx], ax
lea eax, [esi + esi]
xor edi, edi
mov dword [ebp - 0xc], eax
add eax, ebx
push eax
push ebx
call dword [sym.imp.USER32.dll_CharPrevW]
test eax, eax
je 0x401243
cmp word [eax], 0x22
jne 0x401243
xor ecx, ecx
mov edi, 1
mov word [eax], cx
lea eax, [edi + 4]
cmp esi, eax
jl 0x401267
sub esi, edi
lea eax, [ebx - 8]
push str..com
lea eax, [eax + esi*2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x401267
mov word [ebx + esi*2 - 8], ax
mov esi, dword [ebp - 0x10]
mov ecx, ebx
push str..exe
mov edx, esi
call section..text
test edi, edi
je 0x40128a
push 0x402078
mov edx, esi
mov ecx, ebx
call section..text
mov eax, dword [ebp - 0xc]
mov edx, esi
add eax, dword [ebp - 4]
mov ecx, ebx
push eax
call section..text
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
push 0xfffffffffffffff5
mov dword [ebp - 0x58], 0x100
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x78], 0
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x400
mov esi, eax
lea eax, [ebp - 8]
push 0
push eax
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x40131d
push 3
push 1
push 0
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp - 8]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_DuplicateHandle]
call esi
test eax, eax
jne 0x401327
mov eax, dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x401313
push eax
call esi
mov eax, dword [ebp - 4]
test eax, eax
je 0x40131d
push eax
call esi
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x400
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
push 0
push eax
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x40131d
push 3
push 1
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0xc]
push eax
push dword [ebp - 4]
push eax
call esi
test eax, eax
jne 0x401379
mov eax, dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x401374
push eax
call esi
mov eax, dword [ebp - 8]
jmp 0x401316
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x18]
push 1
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x14]
push 0x4010b0
mov dword [ebp - 0x48], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push 0x40207c
push 0x402080
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x84]
push eax
push 0
push 0
push 0x400
push 1
lea eax, [ebp - 0x3c]
push eax
push eax
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov eax, dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4013dc
push eax
call esi
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4013e6
push eax
call esi
mov eax, dword [ebp - 0x30]
mov dword [section..data], eax
mov eax, dword [ebp - 0x24]
push 0
mov dword [0x403008], eax
lea eax, [ebp - 0x1c]
push eax
push 0x50
lea eax, [ebp - 0xd4]
mov dword [ebp - 0xc], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40147f
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40144e
cmp eax, 1
jne 0x401437
cmp byte [ebp - 0xd4], al
je 0x401478
push 0
lea ecx, [ebp - 0x40]
push ecx
push eax
lea eax, [ebp - 0xd4]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push dword [ebp - 0x30]
call ebx
cmp eax, 0x102
jne 0x40147f
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x50
lea eax, [ebp - 0xd4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401423
jmp 0x40147f
mov dword [ebp - 0xc], 1
push 0
push 0x4010b0
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push 0
push 0x402080
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp - 4]
mov dword [section..data], 0
call esi
push edi
call esi
cmp dword [ebp - 0xc], 0
jne 0x4014c5
push 0xffffffffffffffff
push dword [ebp - 0x30]
call ebx
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x30]
call esi
push dword [ebp - 0x2c]
call esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ExitProcess]