Function at 0x40ee40
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41d57b
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x427008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x90], ecx
mov eax, dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0x40
push 0x3000
push 0x5930
push 0
mov dword [ebp - 0x8c], eax
call edi
mov esi, eax
mov dword [ebp - 0x98], esi
test esi, esi
je 0x40eeaa
push 0x5930
push esi
call dword [sym.imp.KERNEL32.dll_VirtualLock]
push 0x40
push 0x3000
push pe_nt_image_headers32
push 0
mov dword [ebp - 4], 0
call edi
mov edi, eax
mov dword [ebp - 0x94], edi
test edi, edi
je 0x40eed9
push pe_nt_image_headers32
push edi
call dword [sym.imp.KERNEL32.dll_VirtualLock]
mov byte [ebp - 4], 1
test esi, esi
je 0x40ef8c
test edi, edi
je 0x40ef8c
push 2
push 0x40
lea eax, [ebp - 0x50]
push eax
push 0
call dword [sym.imp.bcrypt.dll_BCryptGenRandom]
mov ecx, dword [ebp - 0x90]
push ecx
push edi
push ecx
mov eax, dword [ecx + 4]
mov edx, dword [eax + 0x1c]
lea eax, [ebp - 0x50]
push eax
push dword [edx]
add edx, 4
call fcn.004140a0
mov edx, dword [ebp - 0x8c]
mov ecx, edi
push esi
mov edx, dword [edx + 0x52]
call fcn.00418210
mov eax, dword [ebp - 0x8c]
push esi
push 0
push 0
push 0x800
push eax
push eax
mov eax, dword [esi + 0x5920]
call eax
mov edx, dword [ebp - 0x8c]
movups xmm0, xmmword [ebp - 0x50]
mov eax, dword [ebp - 0x90]
push 0
movups xmmword [edx], xmm0
push 0
movups xmm0, xmmword [ebp - 0x40]
push 0x800
push edx
movups xmmword [edx + 0x10], xmm0
movups xmm0, xmmword [ebp - 0x30]
movups xmmword [edx + 0x20], xmm0
movups xmm0, xmmword [ebp - 0x20]
movups xmmword [edx + 0x30], xmm0
mov ecx, dword [eax + 8]
mov eax, dword [ecx]
call dword [eax + 0x18]
xor eax, eax
mov dword [ebp - 0x8c], eax
jmp 0x40efa8
push str.Malloc_Failed_n
call fcn.0040d690
add esp, 4
mov eax, 0xd
mov dword [ebp - 0x8c], eax
test edi, edi
je 0x40f008
push 0x1c
lea eax, [ebp - 0x6c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
cmp eax, 0x1c
jne 0x40efe6
cmp dword [ebp - 0x6c], edi
jne 0x40efe6
cmp dword [ebp - 0x68], edi
jne 0x40efe6
mov ecx, dword [ebp - 0x60]
mov eax, edi
test ecx, ecx
je 0x40efde
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40efd0
mov ecx, dword [ebp - 0x60]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push 0x8000
push 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualFree]
call edi
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x94], 0
jmp 0x40f00e
mov edi, dword [sym.imp.KERNEL32.dll_VirtualFree]
test esi, esi
je 0x40f066
push 0x1c
lea eax, [ebp - 0x88]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
cmp eax, 0x1c
jne 0x40f056
cmp dword [ebp - 0x88], esi
jne 0x40f056
cmp dword [ebp - 0x84], esi
jne 0x40f056
mov ecx, dword [ebp - 0x7c]
mov eax, esi
test ecx, ecx
je 0x40f04e
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40f040
mov ecx, dword [ebp - 0x7c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
push 0x8000
push 0
push esi
call edi
mov eax, dword [ebp - 0x8c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041c61b
mov esp, ebp
pop ebp
ret 4