
04.09.2009, 10:17
|
|
Статус пользователя:
Регистрация: 26.07.2005
Сообщений: 591
С нами:
10943066
Репутация:
1236
|
|
вот добавил анхук
Код:
void ExceptionUnhookFunction(LPVOID real_address)
{
PLIST_ENTRY pcurr_entry;
PHOOK_ENTRY pcurr_item;
pcurr_item = find_hook_entry(real_address);
if(!pcurr_item) return;
//repair function
DWORD prot, len;
len = get_instruction_length(pcurr_item->trampoline);
VirtualProtect(real_address, len, PAGE_EXECUTE_READWRITE, &prot);
memcpy(real_address, pcurr_item->trampoline, len);
VirtualProtect(real_address, len, prot, &prot);
vfree(pcurr_item->trampoline);
pcurr_entry = &pcurr_item->list_entry;
RemoveEntryList(pcurr_entry);
vfree(pcurr_item);
}
Последний раз редактировалось sn0w; 04.09.2009 в 10:29..
|
|
|