Function at 0x506540
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
sub esp, 0x80
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x1c], ecx
call fcn.00506000
test eax, eax
jne 0x506588
call fcn.00505f90
test eax, eax
jne 0x506588
mov ebx, dword [esp + 0x28]
mov esi, 0xfe061
mov edx, 0xfe0a5
mov dword [esp + 0x14], 0xfe091
mov dword [esp + 0x18], 0xf0835
mov eax, 0xfe0c1
jmp 0x50669e
mov ecx, 0xb
mov esi, str.devicephysicalmemory
lea edi, [esp + 0x54]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [esp + 0x82], eax
xor ebp, ebp
mov dword [esp + 0x86], eax
lea ecx, [esp + 0x54]
mov dword [esp + 0x8a], eax
lea edx, [esp + 0x2c]
push str.ntdll.dll
mov dword [esp + 0x38], 0xf0000
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x24], 0xffff
mov word [esp + 0x92], ax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x34], ecx
mov word [esp + 0x30], 0x2c
mov word [esp + 0x32], 0x2e
mov dword [esp + 0x4c], 0x40
mov dword [esp + 0x40], 0x18
mov dword [esp + 0x48], edx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], ebp
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov ebx, eax
push str.ZwOpenSection
push ebx
call esi
push str.ZwMapViewOfSection
push ebx
mov edi, eax
call esi
push str.ZwUnmapViewOfSection
push ebx
mov dword [esp + 0x20], eax
call esi
mov dword [esp + 0x28], eax
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x28]
push 4
push ecx
call edi
push 2
push ebp
lea edx, [esp + 0x28]
push 1
lea eax, [esp + 0x40]
push edx
mov edx, dword [esp + 0x34]
push eax
push 0xffff
lea ecx, [esp + 0x28]
push ebp
push ecx
push 0xffffffffffffffff
push edx
call dword [esp + 0x40]
mov eax, dword [esp + 0x10]
lea ecx, [eax + 0xe091]
lea esi, [eax + 0xe061]
mov dword [esp + 0x14], ecx
lea ecx, [eax + 0x835]
lea edx, [eax + 0xe0a5]
mov dword [esp + 0x18], ecx
add eax, 0xe0c1
mov ebp, dword [esp + 0x94]
mov ecx, 0x32
mov edi, ebp
push 0xc8
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0xc8]
mov ecx, 0x32
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x18]
lea edi, [ebp + 0x190]
mov ecx, 0x32
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x1c]
lea edi, [ebp + 0x258]
mov ecx, 0x32
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x3e8]
mov ecx, 0x32
mov esi, eax
rep movsd dword es:[edi], dword [esi]
call fcn.005972a7
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
add esp, 4
mov ecx, esi
mov dword [esi + 4], eax
push edx
call fcn.00506810
test eax, eax
jne 0x506741
mov eax, dword [esp + 0x10]
mov ecx, esi
push eax
call fcn.00506880
test eax, eax
jne 0x506741
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, esi
call fcn.005067a0
test eax, eax
jne 0x506741
mov ecx, 0x32
lea edi, [ebp + 0x320]
rep stosd dword es:[edi], eax
jmp 0x506755
mov esi, dword [esi + 4]
lea edi, [ebp + 0x320]
mov ecx, 0x32
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x1c]
mov edx, dword [esi + 4]
push edx
call fcn.005971be
add esp, 4
call fcn.00505f90
test eax, eax
jne 0x506773
call fcn.00506000
test eax, eax
je 0x506785
mov eax, dword [esp + 0x10]
push eax
push 0xffffffffffffffff
call dword [esp + 0x30]
push ebx
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret 4