Function at 0x406f00
Capabilities:
Create pipe
Create process on windows
Create thread
Create two anonymous pipes
Get common file path
Set current directory
Write and execute a file
Write file on windows
Write pipe

Disassembly:
sub esp, 0x298
mov al, byte [0x4131b9]
push ebx
xor ebx, ebx
push ebp
push esi
cmp al, bl
push edi
mov dword [esp + 0x30], ecx
jne 0x407209
mov esi, dword [esp + 0x2ac]
lea eax, [esp + 0x34]
push ebx
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x24]
push ecx
push edx
mov dword [esi + 8], ebx
mov dword [esp + 0x44], 0xc
mov dword [esp + 0x4c], 1
mov dword [esp + 0x48], ebx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x407209
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 2
push ebx
lea eax, [esp + 0x2c]
push ebx
push eax
call ebp
mov ecx, dword [esp + 0x2c]
push eax
push ecx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x407209
mov edx, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
lea eax, [esp + 0x34]
push ebx
lea ecx, [esp + 0x24]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x407209
push 2
push ebx
lea eax, [esp + 0x30]
push ebx
push eax
call ebp
mov ecx, dword [esp + 0x30]
push eax
push ecx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x407209
mov edx, dword [esp + 0x20]
push edx
call edi
lea eax, [esp + 0xa8]
push eax
push 0x200
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ebp, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x4133b4
call ebp
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x40]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
lea eax, [esp + 0x50]
mov ecx, dword [esp + 0x14]
push edx
push eax
push ebx
push ebx
push 0x208
push 1
push ebx
push ebx
push str.jde.exe
push ebx
mov dword [esp + 0x78], 0x44
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0xa4], 0x100
mov word [esp + 0xaa], bx
mov dword [esp + 0xac], ebx
mov dword [esp + 0xb0], ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0xa8]
mov dword [esp + 0x10], eax
push ecx
call ebp
cmp dword [esp + 0x2c], ebx
jne 0x4070c5
lea edx, [esp + 0xa8]
push 0x412d44
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [esp + 0x18]
add esp, 8
lea ecx, [esp + 0xa8]
push 0xffffffffffffffff
push eax
push ecx
mov ecx, dword [0x418114]
call fcn.00403560
mov dword [esi + 8], ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x298
ret 4
mov edx, dword [esp + 0x14]
push edx
call edi
mov eax, dword [esp + 0x18]
push eax
call edi
push 0x14
call dword [sym.imp.MSVCRT.dll_malloc]
mov dword [esi + 8], eax
mov dword [eax], 1
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x44]
add esp, 4
mov dword [ecx + 4], edx
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x48]
mov dword [eax + 8], ecx
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x24]
mov dword [edx + 0x10], eax
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x28]
lea eax, [esi + 0x20]
mov dword [ecx + 0xc], edx
mov dword [esi + 0x1020], eax
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 1
mov dword [esi + 0x1034], esi
mov dword [esi + 0x1030], ebx
mov edx, dword [eax]
lea ecx, [esi + 0xc]
mov dword [ecx], edx
mov edx, dword [eax + 0x10]
mov dword [esi + 0x10], edx
mov dword [eax + 0x10], ebx
lea eax, [esi + 0x1c]
push eax
push ebx
push ecx
push 0x407470
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push ebx
push 1
push 1
push ebx
mov dword [esi + 0x18], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [0x413aac], eax
mov edx, dword [esi + 8]
cmp edx, ebx
je 0x4071a1
mov edi, str.dosa_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ebx
je 0x4071a1
lea eax, [esp + 0x10]
push ebx
push eax
push ecx
mov ecx, dword [edx + 0xc]
push str.dosa_n
push ecx
call ebp
test eax, eax
jne 0x4071a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x418114]
lea ecx, [esp + 0x94]
mov eax, dword [edx + 0x454]
push eax
push str.ht__dM_n
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov edx, dword [esi + 8]
add esp, 0xc
cmp edx, ebx
je 0x4071ff
lea edi, [esp + 0x94]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ebx
je 0x4071ff
mov edx, dword [edx + 0xc]
lea eax, [esp + 0x10]
push ebx
push eax
push ecx
lea ecx, [esp + 0xa0]
push ecx
push edx
call ebp
test eax, eax
jne 0x4071ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x30]
push esi
call fcn.00407220
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x298
ret 4