PeSpin Macros For Executable Protection
Posted: Sat Aug 20, 2005 6:27 pm
Code updated For 5.20+
http://pespin.w.interia.pl
Here's the code on how to use it (thanks sec!)
It can be downloaded here:PESpin is a Windows executable files protector, compressor coded in pure Win32ASM using MASM.
It allows compression of the whole executable - code, data and resources,
leaving them executable and protects against patching and disassembling.
PESpin is released as Freeware.
http://pespin.w.interia.pl
Here's the code on how to use it (thanks sec!)
Code: Select all
;PESpin v1.1 - v1.3 encryption markers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Define this include file in your ASM project like:
;include pespin.inc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;CLEAR_markers
;this macro is for define start of block for encryption (it will decoded before use and removed after use)
;tip: This type of blocks is very good use in initialize part of program
;(load DLL(s), initialize data, fill some special variables and etc.)
!macro CLEAR_START
!{
!db 0EBh,24h
!db 0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh,0FBh
!dd 0000BD66h
!}
!macro CLEAR_END
!{
!db 0EBh,33h
!db 0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh,0FAh
!dd 0000BD66h
!}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;CRYPT_markers
;this macro is for define start of block for encryption (it will decoded before use and encrypted again after use)
!macro CRYPT_START
!{
!db 0EBh,08h
!db 0FCh,0FCh,0FCh,0FCh,0FCh,0FCh
!db 27h,54h
!}
!macro CRYPT_END
!{
!db 0EBh,08h
!db 0FDh,0FDh,0FDh,0FDh,0FDh,0FDh
!db 54h,37h
!}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ****** EXAMPLE OF USAGE *******
For a=1 To 2
!CRYPT_START
MessageRequester("Hi!", "I'm encripted inside the code!")
!CRYPT_END
!CLEAR_START
MessageRequester("Hum...", "I'm not encripted and i will only pop up once (crash on the second run)!;)")
!CLEAR_END
Next