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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x14]
push eax
push 0x40
push 0xb
push 0x4067cf
push dword [0x4053f0]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x401199
push eax
push eax
push str.VirtualProtect
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016c7
mov esp, ebp
pop ebp
ret
push esi
push 4
push 0x1000
push 0x1a
push 0
push dword [0x4053f0]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
push 0
test esi, esi
jne 0x4011d5
push eax
push 0x403254
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016c7
mov esp, ebp
pop ebp
ret
push 0x1a
push 0x403238
push esi
push dword [0x4053f0]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x40120a
push eax
push eax
push 0x403268
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016c7
mov esp, ebp
pop ebp
ret
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x401236
push eax
push eax
push 0x40329c
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016c7
mov esp, ebp
pop ebp
ret
push 0x4032b8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
push 0
test eax, eax
jne 0x401265
push 0x4032c8
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016c7
mov esp, ebp
pop ebp
ret
push esi
push eax
push 0
push 0
push dword [0x4053f0]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test eax, eax
jne 0x401298
push eax
push eax
push 0x4032f0
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016c7
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x403238
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x4012cd
push eax
push eax
push str._g_vz
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016c7
mov esp, ebp
pop ebp
ret
push str.ReplaceScript
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x4012fa
push eax
push eax
push 0x40332c
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016c7
mov esp, ebp
pop ebp
ret
push 0xb
lea esi, [eax - 0x4067da]
call fcn.004016d5
mov dword [ebp - 0x10], eax
mov edx, 0x90909090
add esp, 4
lea ecx, [eax + 0xb]
mov dword [ebp - 8], ecx
mov dword [eax], edx
mov dword [eax + 4], edx
mov word [eax + 8], dx
mov byte [eax + 0xa], dl
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
push 0
push 0xb
mov byte [eax + 6], 0xe8
mov eax, dword [ebp - 0x10]
mov dword [eax + 7], esi
push dword [ebp - 0x10]
push 0x4067cf
push dword [0x4053f0]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x40135e
push eax
push eax
push 0x403348
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x401394
mov edx, dword [ebp - 8]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40138a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40138a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00401705
add esp, 8
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004016c7
mov esp, ebp
pop ebp
ret