XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Aug 22, 2017 12:41 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: identify algorithm
PostPosted: Mon Nov 14, 2016 9:02 pm 
Offline
n00b

Joined: Fri Mar 25, 2016 8:26 am
Posts: 14
Has thanked: 0 time
Have thanks: 3 times














You can make the ads go away by registering

This is going to be just a shot in the dark.

I'm looking for a help on decompression algo from an old DOS game.
I've spend several hours of debugging with DOSBOX just to find it and to unsuccessfully rewrite it to my tool.


This is only small part(beginning) of whole code.


Code:

      xor   cl, cl             - iteration loop
      mov   ax, [si]           - 1st and 2nd byte from compressed data
      mov   dx, [si+1]         - 2nd and 3rd byte from compressed data
      shr   dx, cl
      shr   ax, cl
      or   ah, dl
      shr   dx, 1
      shr   ax, 1
      pushf
      or   ah, dl
      inc   cl
      and   cl, 7              - only 7 times
      jnz   short loc_29F16
      inc   si
      call   sub_29FCF
      popf
      jnb   short loc_29F21
      stosb           - store decompressed byte



Actually algo is is much longer and numerous jump branches are present.

There are also only two constants used 0x1fff 0x3ff.


Any idea what type of algorithm is it?


Top
 Profile  
 
 Post subject: Re: identify algorithm
PostPosted: Tue Nov 15, 2016 1:48 am 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 580
Has thanked: 65 times
Have thanks: 124 times
this isn't enough to go on can you dump the disaassembly with addresses? 8)

also, no idea why this tries shifting right with cl, when cl is 0!

_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: identify algorithm
PostPosted: Tue Nov 15, 2016 4:15 pm 
Offline
n00b

Joined: Fri Mar 25, 2016 8:26 am
Posts: 14
Has thanked: 0 time
Have thanks: 3 times
Hi , check the attachment , subroutine calls deal mostly with comparing processed file size to total file size and with reading another pair of data.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group