Function at 0x408710
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
mov eax, dword [0x40e008]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
push edi
mov edi, edx
mov dword [ebp - 0xc], eax
mov esi, ecx
test edi, edi
je 0x408a26
push 0x1c
lea eax, [ebp - 0x28]
mov dword [ebp - 0x10], 0
push eax
xorps xmm0, xmm0
push edi
push esi
movups xmmword [ebp - 0x28], xmm0
movq qword [ebp - 0x18], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x408a26
push 0
push 0x40
lea eax, [ebp - 0x17c]
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x408a26
mov eax, 0x5a4d
cmp word [ebp - 0x17c], ax
jne 0x408a1f
mov eax, dword [ebp - 0x140]
cmp eax, dword [ebp - 0x1c]
ja 0x408a1f
cmp eax, 0x40
jb 0x408a1f
push 0
push 0xf8
lea ecx, [ebp - 0x13c]
add eax, edi
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x408a26
cmp dword [ebp - 0x13c], 0x4550
jne 0x408a1f
push 0x678
lea eax, [ebp - 0x7f4]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [ebp - 0x7d8]
add esp, 0xc
mov dword [ebp - 0x7f4], 0x678
mov dword [ebp - 0x7e4], edi
mov dword [ebp - 0x7f0], 0x40
push 0
push 0x40
push eax
push edi
push esi
call ebx
test eax, eax
je 0x408a2d
mov eax, dword [ebp - 0x79c]
lea ecx, [ebp - 0x798]
add eax, dword [ebp - 0x7e4]
push 0
push 0x18
push ecx
push eax
push esi
mov dword [ebp - 0x7e0], eax
mov dword [ebp - 0x7ec], 0x18
call ebx
test eax, eax
je 0x408a2d
movzx eax, word [ebp - 0x792]
lea ecx, [eax + eax*4]
movzx eax, word [ebp - 0x784]
lea eax, [eax + ecx*8]
add eax, 0x18
mov dword [ebp - 0x7ec], eax
cmp eax, 0x608
ja 0x408a2d
push 0
push eax
lea eax, [ebp - 0x798]
push eax
push dword [ebp - 0x7e0]
push esi
call ebx
test eax, eax
je 0x408a2d
mov ax, word [ebp - 0x780]
mov ecx, 0x10b
cmp ax, cx
jne 0x4088cd
mov eax, dword [ebp - 0x6b0]
test eax, eax
je 0x4088f4
cmp dword [ebp - 0x6ac], 0
je 0x4088f4
add eax, edi
mov dword [ebp - 0x7dc], eax
jmp 0x4088fa
mov ecx, 0x20b
cmp ax, cx
jne 0x4088f4
mov eax, dword [ebp - 0x6a0]
test eax, eax
je 0x4088f4
cmp dword [ebp - 0x69c], 0
je 0x4088f4
add eax, edi
mov dword [ebp - 0x7dc], eax
jmp 0x4088fa
mov eax, dword [ebp - 0x7dc]
test eax, eax
je 0x40891f
push 0
push 0x14
lea ecx, [ebp - 0x190]
mov dword [ebp - 0x7e8], 0x14
push ecx
push eax
push esi
call ebx
test eax, eax
je 0x408a2d
cmp dword [ebp + 8], 0
je 0x408a15
push ecx
push dword [ebp - 0xc]
mov edx, edi
mov ecx, esi
call fcn.00407ec0
add esp, 8
test eax, eax
je 0x408a2d
mov edi, dword [ebp - 0x7dc]
test edi, edi
je 0x4089e4
mov eax, dword [ebp - 0x180]
movups xmm0, xmmword [ebp - 0x190]
and eax, 0xfffffffe
mov dword [ebp - 0x2c], 0
push 0x1c
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x44]
push eax
movups xmmword [ebp - 0x20], xmm0
push edi
xorps xmm0, xmm0
push esi
movups xmmword [ebp - 0x44], xmm0
movq qword [ebp - 0x34], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x408a2d
test byte [ebp - 0x30], 0xf0
lea eax, [ebp - 0xc]
push eax
mov ecx, 4
mov eax, 0x40
cmove eax, ecx
push eax
push 0x14
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push esi
call edi
test eax, eax
je 0x408a2d
push 0
push 0x14
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x7dc]
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x408a2d
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push 0x14
push dword [ebp - 0x7dc]
push esi
call edi
test eax, eax
je 0x408a2d
push 0x678
lea eax, [ebp - 0x7f4]
mov edx, 0x40b4b4
push eax
mov ecx, esi
call fcn.00408a50
neg eax
sbb eax, eax
neg eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00409942
mov esp, ebp
pop ebp
ret 0xc
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x408a2d
push 0xc1
call ebx
push 0x10dd
call ebx
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409942
mov esp, ebp
pop ebp
ret 0xc