Function at 0x468160
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
push esi
push edi
mov byte [ebp - 5], 0
mov eax, dword [ebp + 8]
push eax
push 0x2bb
call fcn.0046d910
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4683bf
cmp dword [0x523c0c], 0
jne 0x4681a4
push 1
push 0x4fbba0
call fcn.00471bb0
mov dword [0x523c0c], eax
cmp dword [0x523c10], 0
jne 0x4681be
push 1
push 0x4fbb88
call fcn.00471bb0
mov dword [0x523c10], eax
mov byte [ebp - 0x250], 0xb8
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x24f], ecx
mov byte [ebp - 0x24b], 0xb9
mov edx, dword [ebp - 4]
add edx, 0x235
mov dword [ebp - 0x24a], edx
mov eax, 0xd1ff
mov word [ebp - 0x246], ax
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x240], 0
sub esp, 0xf8
mov ecx, 0x3e
lea esi, [ebp + 0x14]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.004683d0
add esp, 0xfc
mov dword [ebp - 0x23c], eax
mov edx, dword [ebp + 0xc]
push edx
call fcn.00486abb
add esp, 4
movzx eax, ax
shl eax, 1
mov word [ebp - 0x233], ax
movzx ecx, word [ebp - 0x233]
add ecx, 2
mov word [ebp - 0x231], cx
mov edx, dword [ebp - 4]
add edx, 0x25
mov dword [ebp - 0x22f], edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x22b]
push ecx
call fcn.00486d61
add esp, 8
mov edx, dword [0x523c0c]
mov dword [ebp - 0x23], edx
mov eax, dword [0x523c10]
mov dword [ebp - 0x1f], eax
cmp dword [ebp - 0x23c], 0
je 0x4683bf
lea ecx, [ebp - 0x14]
push ecx
push 0x236
lea edx, [ebp - 0x250]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4683bf
cmp dword [ebp - 0x14], 0x236
jne 0x4683bf
lea edx, [ebp - 0x14]
push edx
push 0x85
push 0x4fbbf0
mov eax, dword [ebp - 4]
add eax, 0x235
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4683bf
cmp dword [ebp - 0x14], 0x85
jne 0x4683bf
lea edx, [ebp - 0x14]
push edx
push 5
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x23c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x4683bf
cmp dword [ebp - 0x14], 5
jne 0x4683bf
lea eax, [ebp - 0x14]
push eax
push 5
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 4]
add edx, 0x18
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4683bf
cmp dword [ebp - 0x14], 5
jne 0x4683bf
lea ecx, [ebp - 0x254]
push ecx
push 0x40
push 5
mov edx, dword [ebp - 0x23c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x4683bf
mov byte [ebp - 0x10], 0xe9
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp - 0x23c]
sub ecx, 5
mov dword [ebp - 0xf], ecx
lea edx, [ebp - 0x14]
push edx
push 5
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x23c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 0x254]
push eax
mov ecx, dword [ebp - 0x254]
push ecx
push 5
mov edx, dword [ebp - 0x23c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov byte [ebp - 5], 1
mov al, byte [ebp - 5]
pop edi
pop esi
mov esp, ebp
pop ebp
ret