home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,826 of 4,675   
   Herbert Kleebauer to wolfgang kern   
   Re: Look back to "just for the H@ck"   
   17 Jul 17 12:13:51   
   
   From: klee@nospicedham.unibwm.de   
      
   On 17.07.2017 10:04, wolfgang kern wrote:   
      
   >> I had a two line decoding header:   
   >   
   >> hD1X-s0P_kUHP0UxGWX4ax1y1ieimnfeinklddmemkjanmndnadmndnpbbn   
   >> hhpbbnpljhoxolnhaigidpllnbkdnhlkfhlflefblffahfUebdfahhfkokh   
   >   
   > I'll check this in more detail this time.   
      
   Here the source of the two header lines:   
      
                                         @=$100   
   00000100: 68 3144                     move.w  #$3144,-(sp)   
   00000103: 58                          move.w  (sp)+,r0   
   00000104: 2d 3073                     sub.w   #$305b+$18,r0   
   00000107: 50                          move.w  r0,-(sp)   
   00000108: 5f                          move.w  (sp)+,r6   
      
   00000109: 6b 55 48 50         _30:    mulsq.w #$50,$48.b(r6.w),r1   
   0000010d: 30 55 78                    eor.b   r1,$48+_20-_40.b(r6.w)   
   00000110: 47                          inc.w   r6   
   00000111: 57                          move.w  r6,-(sp)   
   00000112: 58                          move.w  (sp)+,r0   
   00000113: 34 61                       eor.b   #$61,r0   
   00000115: 78 31                       bmi.b   _10   
   00000117: 79 31                       bpl.b   _50   
      
   00000119: 69                  _40:    dc.b    $69   
   0000011a: 65 69 6d 6e 66 65   
   00000120: 69 6e 6b 6c                 dc.b    $65,$69,$6d,$6e,$6   
   ,$65,$69,$6e,$6b,$6c   
   00000124: 64 64 6d 65 6d 6b   
   0000012a: 6a 61 6e                    dc.b    $64,$64,$6d,$65,$6   
   ,$6b,$6a,$61,$6e   
   0000012d: 6d 6e 64 6e 61 64   
   00000133: 6d 6e 64                    dc.b    $6d,$6e,$64,$6e,$6   
   ,$64,$6d,$6e,$64   
   00000136: 6e 70 62 62 6e 0d   
   0000013c: 0a 68 68                    dc.b    $6e,$70,$62,$62,$6   
   ,$0d,$0a,$68,$68   
   0000013f: 70 62 62 6e 70 6c   
   00000145: 6a 68 6f                    dc.b    $70,$62,$62,$6e,$7   
   ,$6c,$6a,$68,$6f   
                                 ;bne.b _30   
   00000148: 78                  _10:    dc.b    $78   
   00000149: 6f                  _20:    dc.b    $6f   
   0000014a: 6c 6e 68 61 69 67   
   00000150: 69 64 70 6c         _50:    dc.b    $6c,$6e,$68,$61,$6   
   ,$67,$69,$64,$70,$6c   
   00000154: 6c 6e 62 6b 64 6e   
   0000015a: 68 6c 6b                    dc.b    $6c,$6e,$62,$6b,$6   
   ,$6e,$68,$6c,$6b   
   0000015d: 66 68 6c 66 6c 65   
   00000163: 66 62 6c                    dc.b    $66,$68,$6c,$66,$6   
   ,$65,$66,$62,$6c   
   00000166: 66 66 61 68 66 55   
   0000016c: 65 62 64                    dc.b    $66,$66,$61,$68,$6   
   ,$55,$65,$62,$64   
   0000016f: 66 61 68 68 66 6b   
   00000175: 6f 6b 68                    dc.b    $66,$61,$68,$68,$6   
   ,$6b,$6f,$6b,$68   
      
      
   Here the code which is generated at runtime by xor-ing (after the mul with   
   $50) the   
   two above data blocks (this is the decoding routine):   
      
   0000014a: fc                          bclr.w  #10,sr   
   0000014b: be 0178                     move.w  #buf,r5   
   0000014e: 89 f7                       move.w  r5,r6   
   00000150: b9 0004             _30:    move.w  #4,r2   
   00000153: ac                  _10:    move.b  (r5.w)+-,r0   
   00000154: 2c 2e                       sub.b   #'.',r0   
   00000156: 72 fb                       bcs.b   _10   
   00000158: 74 1e                       beq.b   buf   
   0000015a: 48                          dec.w   r0   
   0000015b: 3c 0b                       cmp.b   #11,r0   
   0000015d: 76 08                       bls.b   _20   
   0000015f: 2c 06                       sub.b   #6,r0   
   00000161: 3c 25                       cmp.b   #37,r0   
   00000163: 76 02                       bls.b   _20   
   00000165: 2c 06                       sub.b   #6,r0   
   00000167: 66 c1 c8 06         _20:    ror.l   #6,r0   
   0000016b: 45                          inc.w   r4   
   0000016c: 45                          inc.w   r4   
   0000016d: e2 e4                       dbf.w   r2,_10   
   0000016f: 66 c1 c8 08                 ror.l   #8,r0   
   00000173: 66 ab                       move.l  r0,(r6.w)+-{s1}   
   00000175: 4f                          dec.w r6   
   00000176: eb d8                       br.b    _30   
                                 buf:   
      
      
      
      
   >> The binary following this two lines was encoded as 6 bits per byte   
   >> using the characters a-z, A-Z, 0-9, @ and /.   
   >   
   > this sounds like a predecessor of Base64.   
      
   There is no advantage in using Base64 in an ascii binary.   
      
      
   > [...] copied to check on Annie Ascii in motion :)   
      
   But we never got a movie from Beth or Laura.   
      
   PS: Laura has also write such an ascii binary converter. The website   
   doesn't exist anymore, but here is a dissasembly of her code:   
      
   https://groups.google.com/forum/#!msg/alt.msdos.batch/u4qgr2gFNQI/i6sG_H31TtsJ   
   https://groups.google.com/forum/#!msg/alt.msdos.batch/u4qgr2gFNQI/fL8dSJzmbh8J   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca