Com Dehrumer 1.0 - A short history of the creation of COM DEHRUMER...

Heresy #02

                   ##### ##### ## #                      
                  ## ## # ### ##                      
                  #: ## # ## # # #                      
                  :: . :# . # #% .# #                      
                 .%# #% # :# # .                   
             .    #% # :: # #: # .               
          .       :#:%:## ##%:#:# :% % .            
        .          #%:## #:%:# #: : .          
       .                                              .         
       .      . D. E. N. R. U. M. E. R.       .         
       .           .                        .         .         
        .     .          version 1.0.    .          
          .                                        .            

(c) Dark Lion                                                   

     A short history of the creation of COM DEHRUMERa. The other day Pyrodex
finished 4K INTRO under the stylish name DAZZLE for
Constitution Chaos'999.  The volume of ee was a little more than 5 kilobytes and
DIET'om and PKlit'om packed like crap, but Pyrodex is like big
the idea generator wanted to fit a lot more into his intruder.
It is clear that a new cool COM packer was needed. Ash's immediately
the idea came up to use HRUST ver1.2 byHrumer (Best
packer on Speccy), it packs well, but an unpacker was needed
on PC... A couple of days later I solved this problem and went to
Pyrodex take its unfinished intro for testing.
Having saved this file in the emulsion, I was glad that it was not in vain
was started, but on the PC the unpacker was dead
condition, because it was not optimized at all. This condition is not
embarrassed Ash (and he was just finishing work on his newspaper)
and thus DeHrust ended up in the appendix of the first issue
Neg... HeReSy. When optimizing the depacker, tests showed that everything
this is bullshit (the length of the depacker is 305 bytes), but all is not lost
also HRUM verZ.5i and the depacker there is 100 bytes smaller, I quickly
rewrote it on PC as a result DeHrumer took up 170 bytes.      
    HAPPY END!!!                                               

    Rules of use:                                      
    1. Add any 5 bytes to the nakyemomy file at the end         
    2. Pack the file into HRUM                                     
    3. Copy the file to MS-DOS                                   
    4. Use ComDeHrumer                                   

    Below are the test results with different packers:        
   +---------------------------------------------------+       
   | Title | Normal | Length after | Used || intros | length | packages | packer |       
   +==========+===========+=============+==============+       
   |          |            |    4491 | PKLite |       
   |  DAZZLE |    5337 |    4172 | Diet |       
   |          |            |    4094 | Hrum |       
 +----------+------------+-------------+--------------+       
   |          |            |    4026 | PKLite |       
   |   AX |    5493 |    3771 | Diet |       
   |          |            |    3659 | Hrum |       
   +----------+------------+-------------+--------------+       
   |          |            |    4110 | PKLite |       
   | BORNFAT |    5233 |    3836 | Diet |       
   |          |            |    3740 | Hrum |       
   +----------+------------+-------------+--------------+       

    Depacker source (170 bytes).                               

; Code by Dark Lion on June 1999                                

                IDEAL                                           
                P486                                            
                SEGMENT CODESG PARA 'CODE'                      
 ASSUME CS:CODESG,DS:CODESG                      
                ORG 100hPROC DEPACK                                     

FOX:            cli                                             
                mov sp,65500                                    
                push bp                                         
                mov bp,30000            ;куда распаковывать     
                push bp                                         
                mov dh,3                                        
                mov si,OFFSET SAVE1+2  ;откуда                  
                mov bx,01010h                                   
                mov cx,OFF13h                                   
L25009:         lodsb                                           
                mov [bp],al                                     
                inc bp                                          
L25014:         call SAVE                                       
L25020:         jc L25009                                       
                mov dl,1                                        
L25024:         mov al,128                                      
L25026:         call SAVE                                       
L25031:         rcl al,1                                        
                jc L25026                                       
                cmp al,dh                   
                jc L25042                                       
                add al,dl                                       
                mov dl,al                                       
                xor al,bl                                       
                jnz L25024                                      
L25042:         add al,dl                                       
                cmp al,dh                                       
                cmc                                             
                jnc L25056                                      
                sbb al,dh                                       
                jz L25090                                       
                adc al,dh                                       
L25051:         call SAVE                                       
L25056:         xchg cx,di                                      
                mov [byte ptr FOX],al                           
                mov ch,255                                      
                dec al                                          
                mov al,63                                       
                jz L25069                                       
                jnc L25082                                      
                and al,11011111b        ;res 5,a                
L25069:         xchg cx,di                                      
L25070:         call SAVE                                       
                rcl al,1                                        
                jnc L25070                                      
                xchg cx,di                                      
                jz L25084                                       
                mov ch,al                                       
L25082:         lodsb                                           
L25084:         mov cl,al                                       
                add cx,bp                                       
LDIR:           mov ah,[ecx]                                    
                inc cx                                          
                mov [bp],ah                                     
                inc bp                                          
                dec [byte ptr FOX]                              
                jnz LDIR                                        
                xchg cx,di                                      
                jmp L25014                                      
L25090:         lodsb                                           
                and al,al                                       
                jnz L25051                                      
                pop si                                          
                pop bp                                          
                mov di,256                                      
                mov eax,0C3A4F357h                              
                mov cx,ax                                       
                mov bx,65530                                    
                mov [bx],eax                                    
                push bx                                         
                ret                                             

                ENDP DEPACK                                     

                PROC SAVE                                       

                lahf            ;save Z flag                    
                ror ah,1                                        
                add cx,cx                                       
                rcl ah,1                                        
                sahf                                            
                pushf                                           
                dec bh                                          
                jnz SAVE1                                       
                xchg cx,ax                                      
                lodsw                                           
                xchg cx,ax                                      
                mov bh,bl                                       
SAVE1:          popf                                            
                ret                                             

                ENDP SAVE                                       
                ENDS CODESG                                     
                END DEPACK                                      

Share your thoughts about the article