int fun1(pList target) // Install Hook
{
if(setup == TRUE) setupList();
if (target == null) return 1;
if (target->Hooked == TRUE) return 2;
if (checkOption(*target) != 0)
if (checkOption(*target) != -6 && checkOption(*target) != -1 && checkOption(*target) != -2) return checkOption(*target);
byte ownShellCode[length] = { '\x00' },origin[length]; // shellcode
target->shellcode = ownShellCode;cAddr("MessageBoxW", user32)
dword SaveNew = 0;
memcpy(ownShellCode, shellcode,length);
memcpy(ownShellCode + stepAddr, target->NewFuncAddress, addrlength);
if (VirtualProtect(target->HookAddress, length, PAGE_EXECUTE_READWRITE, &target->backuppage) != TRUE)return 3;
memcpy(origin, target->HookAddress, length);
memcpy(target->HookAddress, ownShellCode, length);
if (VirtualProtect(target->HookAddress, length, target->backuppage, &SaveNew) != TRUE) return 4;
target->origincode = origin;
target->Hooked = TRUE;
return 0;
}