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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeb8
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call fcn.00402e48
mov eax, dword [ebp - 0xc]
call fcn.00402e48
xor eax, eax
push ebp
push 0x405b66
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0x38]
xor ecx, ecx
mov edx, 0x10
call fcn.00401b3c
lea eax, [ebp - 0x7c]
xor ecx, ecx
mov edx, 0x44
call fcn.00401b3c
mov dword [ebp - 0x7c], 0x44
xor eax, eax
mov al, byte [ebp + 8]
mov word [ebp - 0x4c], ax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
mov eax, dword [ebp - 0xc]
call fcn.00402e58
push eax
mov eax, dword [ebp - 8]
call fcn.00402e58
push eax
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x405b4b
mov byte [ebp - 0x21], 1
xor eax, eax
push ebp
push 0x405b44
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x148], 0x10002
lea eax, [ebp - 0x148]
push eax
mov eax, dword [ebp - 0x34]
push eax
call sub.kernel32.dll_GetThreadContext
test eax, eax
je 0x405b17
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xa4]
add eax, 8
push eax
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_ReadProcessMemory
test eax, eax
je 0x405b17
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x38]
call fcn.00405898
test eax, eax
jl 0x405b17
cmp dword [ebp - 4], 0
je 0x405b17
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
add eax, dword [ebp - 4]
mov dword [ebp - 0x20], eax
push 4
push 0x3000
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x50]
push eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x34]
push eax
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_VirtualAllocEx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x405b17
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x54]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_WriteProcessMemory
test eax, eax
je 0x405b17
mov eax, dword [ebp - 0x20]
call fcn.004058e0
mov esi, eax
mov eax, dword [ebp - 0x20]
movzx eax, word [eax + 6]
dec eax
test eax, eax
jb 0x405ace
inc eax
mov dword [ebp - 0x28], eax
xor ebx, ebx
lea eax, [ebp - 0x18]
push eax
lea edi, [ebx + ebx*4]
mov eax, dword [esi + edi*8 + 0x10]
push eax
mov eax, dword [esi + edi*8 + 0x14]
add eax, dword [ebp - 4]
push eax
mov eax, dword [esi + edi*8 + 0xc]
add eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_WriteProcessMemory
test eax, eax
je 0x405ac8
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [esi + edi*8 + 0x24]
call fcn.004058ec
push eax
mov eax, dword [esi + edi*8 + 8]
push eax
mov eax, dword [esi + edi*8 + 0xc]
add eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_VirtualProtectEx
inc ebx
dec dword [ebp - 0x28]
jne 0x405a7b
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xa4]
add eax, 8
push eax
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_WriteProcessMemory
test eax, eax
je 0x405b17
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x28]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0x148]
push eax
mov eax, dword [ebp - 0x34]
push eax
call sub.kernel32.dll_SetThreadContext
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x21], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405b4b
cmp byte [ebp - 0x21], 0
jne 0x405b37
push 0
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_TerminateProcess
jmp 0x405b40
mov eax, dword [ebp - 0x34]
push eax
call sub.kernel32.dll_ResumeThread
mov bl, byte [ebp - 0x21]
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405b6d
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00402a08
ret