Function at 0x4b1060
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
xor ecx, ecx
push ebp
push 0x4b1254
push dword fs:[ecx]
mov dword fs:[ecx], esp
cmp byte [ebx], 0xe9
jne 0x4b10ad
mov edx, ebx
mov eax, edx
inc eax
mov eax, dword [eax]
add eax, edx
add eax, 5
and eax, 0xffffffff
mov ebx, eax
mov eax, dword [ebp + 0x10]
push eax
push edi
push ebx
call sym.P_Interface.bpl__Codehook_HookCode_qqspvt1rpv
pop dword fs:[0]
add esp, 8
jmp 0x4b1260
lea eax, [ebp - 8]
push eax
push 0x28
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4b10db
push 0
push 0x4b126c
push 0x4b1288
push 0
call sub.user32.dll_MessageBoxA
lea eax, [ebp - 0x18]
push eax
push 0x4b12a4
push 0
call sub.advapi32.dll_LookupPrivilegeValueA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4b1108
push 0
push 0x4b12b8
push 0x4b12d8
push 0
call sub.user32.dll_MessageBoxA
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x10], 2
xor eax, eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
push 0
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4b114f
push 0
push 0x4b12f8
push 0x4b12f8
push 0
call sub.user32.dll_MessageBoxA
mov esi, ebx
sub edi, ebx
sub edi, 5
lea eax, [ebp - 4]
push eax
push 0x40
push 0x19
push esi
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4b1241
mov eax, dword [sym.P_Interface.bpl__Codehook_addr_data]
call sub.rtl70.bpl__System__DynArrayLength_qqrv
inc eax
push eax
mov eax, sym.P_Interface.bpl__Codehook_addr_data
mov ecx, 1
mov edx, dword [sym.P_Interface.bpl___xp_20Codehook_CodeHook__1]
call sub.rtl70.bpl__System__DynArraySetLength_qqrv
add esp, 4
mov eax, dword [sym.P_Interface.bpl__Codehook_aValue]
call sub.rtl70.bpl__System__DynArrayLength_qqrv
inc eax
push eax
mov eax, sym.P_Interface.bpl__Codehook_aValue
mov ecx, 1
mov edx, dword [sym.P_Interface.bpl___xp_20Codehook_CodeHook__2]
call sub.rtl70.bpl__System__DynArraySetLength_qqrv
add esp, 4
mov eax, dword [sym.P_Interface.bpl__Codehook_addr_data]
call sub.rtl70.bpl__System__DynArrayLength_qqrv
mov edx, dword [sym.P_Interface.bpl__Codehook_addr_data]
mov dword [edx + eax*4 - 4], esi
xor ebx, ebx
mov eax, dword [sym.P_Interface.bpl__Codehook_aValue]
call sub.rtl70.bpl__System__DynArrayLength_qqrv
imul eax, eax, 0x65
mov edx, dword [sym.P_Interface.bpl__Codehook_aValue]
lea eax, [edx + eax]
lea eax, [eax + ebx - 0x65]
push eax
mov eax, esi
xor edx, edx
push edx
push eax
mov eax, ebx
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov al, byte [eax]
pop edx
mov byte [edx], al
inc ebx
cmp ebx, 0x65
jne 0x4b11ca
mov eax, 0xff
call sub.rtl70.bpl__System__GetMem_qqri
mov ebx, eax
mov edx, 0xff
mov eax, ebx
call fcn.004021cc
mov edx, ebx
mov eax, esi
call fcn.004b14f0
mov byte [esi], 0xe9
mov eax, esi
inc eax
mov dword [eax], edi
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 4]
push eax
push 0x19
push esi
call sub.kernel32.dll_VirtualProtect
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4b125e
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc