8AB8=3  3 6 . 1 3 .   @>F54C@0- 30@?C=,   2>=70NI0OAO  2  B5;>  ?;0=8@>2I8:0
 
 / *   
 
 	 D o u b l e C h a i n ,   a   s i m p l e   f u n c t i o n   h o o k e r 
 
 	 b y   D a r k - A n g e l   < D a r k 0 @ a n g e l f i r e . c o m > 
 
 * / 
 
 	 
 
 # d e f i n e   _ _ K E R N E L _ _ 	 
 
 # d e f i n e   M O D U L E 	 
 
 # d e f i n e   L I N U X 	 
 
 # i n c l u d e   < l i n u x / m o d u l e . h > 	 
 
 # d e f i n e   C O D E J U M P   7 	 
 
 # d e f i n e   B A C K U P   7 	 
 
 / *   T h e   n u m b e r   o f   t h e   b y t e s   t o   b a c k u p   i s   v a r i a b l e   ( a t   l e a s t   7 ) , 
 
 t h e   i m p o r t a n t   t h i n g     i s   n e v e r   b r e a k   a n   i s t r u c t i o n 	 
 
 * / 	 
 
 s t a t i c   c h a r   b a c k u p _ o n e [ B A C K U P + C O D E J U M P ] 	 = " \ x 9 0 \ x 9 0 \ x 9 0 \ x 9 0 \ x 9 0 \ x 9 0 \ x 9 0 " 
 
 	 " \ x b 8 \ x 9 0 \ x 9 0 \ x 9 0 \ x 9 0 \ x f f \ x e 0 " ; 
 
 s t a t i c   c h a r   j u m p _ c o d e [ C O D E J U M P ] 	 = " \ x b 8 \ x 9 0 \ x 9 0 \ x 9 0 \ x 9 0 \ x f f \ x e 0 " ; 
 
 	 
 
 # d e f i n e   F I R S T _ A D D R E S S   0 x c 0 1 0 1 2 3 5   	 / / A d d r e s s   o f   t h e   f u n c t i o n   t o   o v e r w r i t e 
 
 u n s i g n e d   l o n g   * m e m o r y ; 	 
 
 	 
 
 v o i d   c e n o b i t e ( v o i d )   { 	 
 
 	 p r i n t k ( " F u n c t i o n   h o o k e d   s u c c e s s f u l l y \ n " ) ; 
 
 	 a s m   v o l a t i l e ( " m o v   % e b p , % e s p ; p o p l   % e s p ; j m p   b a c k u p _ o n e ) ; 
 
 / *   	 
 
 T h i s   a s m   c o d e   i s   f o r   s t a c k - r e s t o r i n g .   T h e   f i r s t   b y t e s   o f   a   f u n c t i o n 
 
 ( C e n o b i t e   n o w )   a r e   a l w a y s   f o r   t h e   p a r a m e t e r s   p u s h i n g . J u m p i n g   a w a y   t h e 
 
 f u n c t i o n   c a n ' t   r e s t o r e   t h e   s t a c k ,   s o   w e   m u s t   d o   i t   b y   h a n d . 
 
 W i t h   t h e   j u m p   w e   g o   t o   e x e c u t e   t h e   b a c k u p p e d   c o d e   a n d   t h e n   w e   j u m p   i n 
 
 t h e   o r i g i n a l   f u n c t i o n . 
 
 * / 	 
 
 } 	 
 
 	 
 
 i n t   i n i t _ m o d u l e ( v o i d )   { 	 
 
 * ( u n s i g n e d   l o n g   * ) & j u m p _ c o d e [ 1 ] = ( u n s i g n e d   l o n g   ) c e n o b i t e ; 	 
 
 	 
 
 * ( u n s i g n e d   l o n g   * ) & b a c k u p _ o n e [ B A C K U P + 1 ] = ( u n s i g n e d   l o n g ) ( F I R S T _ A D D R E S S + 
 
 	 B A C K U P ) ; 
 
 	 
 
 m e m o r y = ( u n s i g n e d   l o n g   * ) F I R S T _ A D D R E S S ; 	 
 
 m e m c p y ( b a c k u p _ o n e , m e m o r y , C O D E B A C K ) ; 	 
 
 m e m c p y ( m e m o r y , j u m p _ c o d e , C O D E J U M P ) ; 	 
 
 r e t u r n   0 ; 	 
 
 	 } 
 
 	 
 
 v o i d   c l e a n u p _ m o d u l e ( v o i d )   { 	 
 
 	 m e m c p y ( m e m o r y , b a c k u p _ o n e , B A C K U P ) ; 
 
 } 	 
 
 