User Antihack Procedures Info 1.01 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Some important notes on adding antihack code to the packed files: 1) Antihack code can be added only while packing files with PU HARD compression method. 2) Please DO NOT change SS/SP nor DS/ES segment registers! If you change any of these registers then you should restore them. 3) One procedure can be no longer than 1024 bytes (so you can add 2KB of AH code). 4) AH files should be COM structure. Note that all offsets may be changed while executing the protected file, so this code will fail: PUSH CS POP DS MOV DX,OFFSET TEXT MOV AX,9 INT 21H ... TEXT: DB 'Hello!$' But this code should work OK: PUSH CS POP DS CALL NEXT NEXT: POP DX ADD DX,OFFSET(TEXT)-OFFSET(NEXT) MOV AX,9 INT 21H ... TEXT: DB 'Hello!$' 5) How the protected program runs (step by step): a) some WWPACK's code b) user -uah1 procedure c) WWPACK's PU HARD decompression procedure d) some WWPACK's antihack code e) user -uah2 procedure f) WWPACK's relocation table decompression procedure g) protected program 6) You may hook any interrupts you want, but when handling interrupt 21h please DO NOT cut off functions 30h and 35h! 7) Very nice idea is to cut off interrupt in the first procedure (-uah1) and then restore original vector in the second procedure (-uah2). 8) Another idea: -uah1 and -uah2 parameters can be used for adding CHECK_PROCESSOR_TYPE and CHECK_DOS_VERSION procedures! ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ If you have any ideas or examples of your own antihack code that can be used with -uah1 and -uah2 parameters let us know! If you want us to distribute your example code in future versions of WWPACK let us know - we can add your code to our WWPACK's archive! Piotr Warezak ul.Edukacyjna 31 90-155, Lodz Poland E-mail: awarezak@krysia.uni.lodz.pl