i m p o r t _ m e t h = 1 ; 
 
 S t a r t ( f a l s e ) ; 
 
 b C r e a t e P r o c e s s = G e t P r o c A d d r e s s ( " K e r n e l B a s e . d l l " , " C r e a t e P r o c e s s I n t e r n a l W " ) ; 
 
 i f   b C r e a t e P r o c e s s = = 0   t h e n 
 
 	 b C r e a t e P r o c e s s = G e t P r o c A d d r e s s ( " k e r n e l 3 2 . d l l " , " C r e a t e P r o c e s s I n t e r n a l W " ) ; 
 
 e n d ; 
 
 A d d B r e a k ( b C r e a t e P r o c e s s , 1 , 0 ) ;   E n a b l e B r e a k ( b C r e a t e P r o c e s s ) ; 
 
 w h i l e   t r u e   d o 
 
 	 C o n t i n u e ( t r u e ) ; 
 
 	 i f   b r e a k _ w h e r e = = b C r e a t e P r o c e s s   t h e n 
 
 	 	 b r e a k ; 
 
 	 e l s e i f   b r e a k _ w h e r e = = 0 x f 0 0   t h e n 
 
 	 	 W r i t e E x ( " D a m n ,   p r o c e s s   d i e d   : ( " , t r u e , t r u e , 0 x 0 0 0 0 f f ) ; 
 
 	 	 r e t u r n   - 1 ; 
 
 	 e n d ; 
 
 e n d ; 
 
 s u s p e n d e d = R e a d M e m ( E S P + 7 * p l a t f o r m / 8 , 4 ) ; 
 
 i f   ( s u s p e n d e d   &   4 ) = = 0   t h e n 
 
 	 W r i t e M e m ( E S P + 7 * p l a t f o r m / 8 , s u s p e n d e d   |   4 , 4 ) ; 
 
 e n d ; 
 
 b R e t u r n = R e a d M e m ( E S P , p l a t f o r m / 8 ) ; 
 
 P r o c I n f o = R e a d M e m ( E S P + 1 1 * p l a t f o r m / 8 , p l a t f o r m / 8 ) ; 
 
 A d d B r e a k ( b R e t u r n , 1 , 0 ) ;   E n a b l e B r e a k ( b R e t u r n ) ; 
 
 w h i l e   t r u e   d o 
 
 	 C o n t i n u e ( t r u e ) ; 
 
 	 i f   b r e a k _ w h e r e = = b R e t u r n   t h e n 
 
 	 	 b r e a k ; 
 
 	 e l s e i f   b r e a k _ w h e r e = = 0 x f 0 0   t h e n 
 
 	 	 W r i t e E x ( " D a m n ,   p r o c e s s   d i e d   : ( " , t r u e , t r u e , 0 x 0 0 0 0 f f ) ; 
 
 	 	 r e t u r n   - 1 ; 
 
 	 e n d ; 
 
 e n d ; 
 
 p i d = R e a d M e m ( P r o c I n f o + 2 * p l a t f o r m / 8 , 4 ) ; 
 
 t i d = R e a d M e m ( P r o c I n f o + 2 * p l a t f o r m / 8 + 4 , 4 ) ; 
 
 W r i t e L o g ( s t r i n g . f o r m a t ( " G o t   n e w   p i d = 0 x % . 0 4 X   a n d   t i d = 0 x % . 0 4 X " , p i d , t i d ) ) ; 
 
 
 
 
 
 
 
 - - b U n m a p = G e t P r o c A d d r e s s ( " n t d l l . d l l " , " Z w U n m a p V i e w O f S e c t i o n " ) ; 
 
 - - A d d B r e a k ( b U n m a p , 1 , 0 ) ;   E n a b l e B r e a k ( b U n m a p ) ; 
 
 - - w h i l e   t r u e   d o 
 
 - - 	 C o n t i n u e ( t r u e ) ; 
 
 - - 	 i f   b r e a k _ w h e r e = = b U n m a p   t h e n 
 
 - - 	 	 b r e a k ; 
 
 - - 	 e l s e i f   b r e a k _ w h e r e = = 0 x f 0 0   t h e n 
 
 - - 	 	 W r i t e E x ( " D a m n ,   p r o c e s s   d i e d   : ( " , t r u e , t r u e , 0 x 0 0 0 0 f f ) ; 
 
 - - 	 	 r e t u r n   - 1 ; 
 
 - - 	 e n d ; 
 
 - - e n d ; 
 
 - - W r i t e L o g ( " S e c t i o n   i s   a b o u t   t o   b e   u n m a p p e d " ) ; 
 
 
 
 
 
 
 
 b V A l l o c = G e t P r o c A d d r e s s ( " n t d l l . d l l " , " Z w A l l o c a t e V i r t u a l M e m o r y " ) ; 
 
 A d d B r e a k ( b V A l l o c , 1 , 0 ) ;   E n a b l e B r e a k ( b V A l l o c ) ; 
 
 w h i l e   t r u e   d o 
 
 	 C o n t i n u e ( t r u e ) ; 
 
 	 i f   b r e a k _ w h e r e = = b V A l l o c   t h e n 
 
 	 	 i f   R e a d M e m ( E S P + 4 , 4 ) ~ = 0 x f f f f f f f f   t h e n 
 
 	 	 	 b r e a k ; 
 
 	 	 e n d ; 
 
 	 	 T r a c e A n d R e p l a c e ( b V A l l o c ) ; 
 
 	 e l s e i f   b r e a k _ w h e r e = = 0 x f 0 0   t h e n 
 
 	 	 W r i t e E x ( " D a m n ,   p r o c e s s   d i e d   : ( " , t r u e , t r u e , 0 x 0 0 0 0 f f ) ; 
 
 	 	 r e t u r n   - 1 ; 
 
 	 e n d ; 
 
 e n d ; 
 
 i m a g e s i z e = R e a d M e m ( R e a d M e m ( E S P + 1 6 , 4 ) , 4 ) ; 
 
 v i c t i m b a s e = R e a d M e m ( R e a d M e m ( E S P + 8 , 4 ) , 4 ) ; 
 
 W r i t e L o g ( s t r i n g . f o r m a t ( " G o t   n e w   b a s e = 0 x % 0 8 X   a n d   s i z e = 0 x % 0 8 X " , v i c t i m b a s e , i m a g e s i z e ) ) ; 
 
 b S e t C o n t e x t = G e t P r o c A d d r e s s ( " n t d l l . d l l " , " Z w S e t C o n t e x t T h r e a d " ) ; 
 
 A d d B r e a k ( b S e t C o n t e x t , 1 , 0 ) ;   E n a b l e B r e a k ( b S e t C o n t e x t ) ; 
 
 w h i l e   t r u e   d o 
 
 	 C o n t i n u e ( t r u e ) ; 
 
 	 i f   b r e a k _ w h e r e = = b S e t C o n t e x t   t h e n 
 
 	 	 b r e a k ; 
 
 	 e l s e i f   b r e a k _ w h e r e = = 0 x f 0 0   t h e n 
 
 	 	 W r i t e E x ( " D a m n ,   p r o c e s s   d i e d   : ( " , t r u e , t r u e , 0 x 0 0 0 0 f f ) ; 
 
 	 	 r e t u r n   - 1 ; 
 
 	 e n d ; 
 
 e n d ; 
 
 t e m p = R e a d M e m ( E S P + 8 , 4 ) ; 
 
 j m p _ t o _ o e p = R e a d M e m ( t e m p + 0 x b 0 , 4 ) - v i c t i m b a s e ; 
 
 W r i t e L o g ( s t r i n g . f o r m a t ( " G o t   n e w   O E P = 0 x % 0 8 X " , j m p _ t o _ o e p ) ) ; 
 
 b R e s u m e T h r e a d = G e t P r o c A d d r e s s ( " n t d l l . d l l " , " Z w R e s u m e T h r e a d " ) ; 
 
 A d d B r e a k ( b R e s u m e T h r e a d , 1 , 0 ) ;   E n a b l e B r e a k ( b R e s u m e T h r e a d ) ; 
 
 w h i l e   t r u e   d o 
 
 	 C o n t i n u e ( t r u e ) ; 
 
 	 i f   b r e a k _ w h e r e = = b R e s u m e T h r e a d   t h e n 
 
 	 	 b r e a k ; 
 
 	 e l s e i f   b r e a k _ w h e r e = = 0 x f 0 0   t h e n 
 
 	 	 W r i t e E x ( " D a m n ,   p r o c e s s   d i e d   : ( " , t r u e , t r u e , 0 x 0 0 0 0 f f ) ; 
 
 	 	 r e t u r n   - 1 ; 
 
 	 e n d ; 
 
 e n d ; 
 
 o l d p i d = v i c t i m _ i d ; 
 
 o l d t i d = t h r e a d _ i d ; 
 
 v i c t i m _ b a s e = v i c t i m b a s e ; 
 
 W r i t e L o g ( " R e a d y   t o   a t t a c h " ) ; 
 
 i f   ( s u s p e n d e d   &   4 ) ~ = 0   t h e n 
 
 	 l o c a l   t e m p = t h r e a d _ i d ; 
 
 	 t h r e a d _ i d = R e a d M e m ( P r o c I n f o + 2 * p l a t f o r m / 8 + 4 , 4 ) ; 
 
 	 S u s p e n d ( ) ; 
 
 	 t h r e a d _ i d = t e m p ; 
 
 e n d ; 
 
 A t t a c h F a s t ( p i d , t i d ) ; 
 
 i m a g e _ s i z e = i m a g e s i z e ; 
 
 D u m p ( ) ; 
 
 i f   c u t _ s e c t i o n s = = t r u e   t h e n 
 
 	 P r o c e s s R e s o u r c e s ( ) ; 
 
 	 C u t S e c t i o n s ( ) ; 
 
 	 P r o c e s s E x p o r t ( ) ; 
 
 	 P r o c e s s T L S ( ) ; 
 
 e n d ; 
 
 P r o c e s s D e l p h i I n i t ( ) ; 
 
 R e s t o r e I m p o r t R e l o c s ( ) ; 
 
 i f   c u t _ s e c t i o n s = = t r u e   t h e n 
 
 	 S a v e R e s o u r c e s ( ) ; 
 
 e n d ; 
 
 P r o c e s s O v e r l a y ( ) ; 
 
 S a v e F i l e ( ) ; 
 
 T e r m i n a t e ( ) ; 
 
 A t t a c h F a s t ( o l d p i d , o l d t i d ) ; 
 
 T e r m i n a t e ( ) ; 