flat assembler
Message board for the users of flat assembler.

Index > DOS > Can someone help me to reverse engineer the algorithm?

Author
Thread Post new topic Reply to topic
chuck



Joined: 29 Aug 2014
Posts: 6
chuck
Hi all

I couldn't find an introduction Forum so am posting here

I'm chuck from Stockton On Tees.
I have very very limited knowledge of programming etc so I have come here to hopefully solve my problem.

Basically I have a calculator that runs in DOS...this calc computes a 4 digit code from 4 Hexadecimal bytes (sometimes more than 1 code can be calculated)
Through many months of studying I can now look at the 4 Hex bytes and know 2 of the digits of the code but for the life of me cannot solve the full algo.
I have used IDA to disassemble it but my knowledge is useless for this so was wondering if I posted it would anyone be able to decipher it and explain in laymans language what algo it is actually using

Many Thanks in advance....chuck
Post 29 Aug 2014, 17:19
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1398
Location: Toronto, Canada
AsmGuru62
I can try.
Can you post the code?
Post 29 Aug 2014, 21:01
View user's profile Send private message Send e-mail Reply with quote
chuck



Joined: 29 Aug 2014
Posts: 6
chuck
AsmGuru62 wrote:
I can try.
Can you post the code?


Hi AsmGuru62

thanks for your quick response, I enclose the file and please ask if you require more info


Description:
Download
Filename: seg000.rar
Filesize: 185.35 KB
Downloaded: 319 Time(s)

Post 29 Aug 2014, 21:57
View user's profile Send private message Reply with quote
ACP



Joined: 23 Sep 2006
Posts: 204
ACP
I'd suggest posting original file and not IDA listing in MS Word document if you really want somebody to take a peek at your file.
Post 29 Aug 2014, 22:16
View user's profile Send private message Reply with quote
questlima



Joined: 27 Aug 2014
Posts: 37
questlima
chuck wrote:
Hi all

I couldn't find an introduction Forum so am posting here

I'm chuck from Stockton On Tees.
I have very very limited knowledge of programming etc so I have come here to hopefully solve my problem.

Basically I have a calculator that runs in DOS...this calc computes a 4 digit code from 4 Hexadecimal bytes (sometimes more than 1 code can be calculated)
Through many months of studying I can now look at the 4 Hex bytes and know 2 of the digits of the code but for the life of me cannot solve the full algo.
I have used IDA to disassemble it but my knowledge is useless for this so was wondering if I posted it would anyone be able to decipher it and explain in laymans language what algo it is actually using

Many Thanks in advance....chuck


reverse engineer huh Smile why not use Ollydbg best debugger out there and
yes why not post the application if you want to get help no no i am no
good in reversing apps Smile anyway happy reversing Wink

_________________
Linux command are not what you intended to
learn but your were forced to learn it, without it
you will be like a sitting duck on your beautiful newly installed Linux desktop:)
Post 30 Aug 2014, 04:07
View user's profile Send private message Reply with quote
ACP



Joined: 23 Sep 2006
Posts: 204
ACP
Ollydbg can't debug DOS EXE files...
Post 30 Aug 2014, 09:17
View user's profile Send private message Reply with quote
chuck



Joined: 29 Aug 2014
Posts: 6
chuck
ACP wrote:
I'd suggest posting original file and not IDA listing in MS Word document if you really want somebody to take a peek at your file.


Here is original file


the calc only computes a 4 digit code if the 4 bytes are in a specific relation to each other.

I don't know if this helps but here are some examples

01 5F 36 FF = 0010 but also computes 0014 0018 plus others
01 5F 36 FE = 0011 also 0311 0711
01 5F 37 F7 = 0013 also 0053 0093 1003
01 5F 32 E2 = 0015

FA 48 19 BF = 1475
FA 48 19 A3 = 1479

01 5F 37 00 = 0000 plus about 100 other codes
Post 30 Aug 2014, 10:15
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1398
Location: Toronto, Canada
AsmGuru62
Good.
So, what is this program does?
If I start this EXE you posted in DOS - what it will do?
Post 30 Aug 2014, 10:56
View user's profile Send private message Send e-mail Reply with quote
chuck



Joined: 29 Aug 2014
Posts: 6
chuck
it is a calculator for computing the code from a .bin file that has been read from a chip in a car radio.
you have to know in the .bin file where the 4 bytes are, you then enter them into the calc and it will give you code

basically I hae no problem getting code I just want to know the algo it uses to compute the code
Post 30 Aug 2014, 11:17
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
chuck,

That program seems to be compiled from BASIC source (QuickBASIC?).
Post 30 Aug 2014, 12:57
View user's profile Send private message Reply with quote
chuck



Joined: 29 Aug 2014
Posts: 6
chuck
baldr wrote:
chuck,

That program seems to be compiled from BASIC source (QuickBASIC?).


I can see from the doc file that it uses subroutines Xor And etc calculations but my knowledge of what it is actually doing is practicly zilch.
I would like to know things like, does it do a sum before Xoring what bytes are used in the Xor etc.etc.

I know 2 numbers of the code just from the 1st byte
for example if first byte is FD then the code will always begin with 1 and somewhere in the code will be a 4 (I know the sequence for all 1st bytes)
Post 30 Aug 2014, 13:40
View user's profile Send private message Reply with quote
questlima



Joined: 27 Aug 2014
Posts: 37
questlima
why dos i was wondering it will be good if x86 OS become absolute like 16bit then even the dev and the end user will have no issue with x86 and then x64 bit apps this is just a personal issue trying to use kernel debuggers on a x64 OS sometimes it gives me a BSOD

_________________
Linux command are not what you intended to
learn but your were forced to learn it, without it
you will be like a sitting duck on your beautiful newly installed Linux desktop:)
Post 30 Aug 2014, 19:36
View user's profile Send private message Reply with quote
ACP



Joined: 23 Sep 2006
Posts: 204
ACP
baldr wrote:
chuck,

That program seems to be compiled from BASIC source (QuickBASIC?).


Yes baldr - you seemed to be right. I don't have any experience with Microsoft Basic compiled code but...

Chuck: did you even tried to contact the author of this program: Nick Sukonnikov sukonnikov(at)vinnitsa.com?
Post 30 Aug 2014, 20:11
View user's profile Send private message Reply with quote
chuck



Joined: 29 Aug 2014
Posts: 6
chuck
ACP wrote:
baldr wrote:
chuck,

That program seems to be compiled from BASIC source (QuickBASIC?).


Yes baldr - you seemed to be right. I don't have any experience with Microsoft Basic compiled code but...

Chuck: did you even tried to contact the author of this program: Nick Sukonnikov sukonnikov(at)vinnitsa.com?


yes I have tried to contact author with no success
Post 30 Aug 2014, 23:45
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
chuck wrote:
ACP wrote:
baldr wrote:
chuck,

That program seems to be compiled from BASIC source (QuickBASIC?).


Yes baldr - you seemed to be right. I don't have any experience with Microsoft Basic compiled code but...

Chuck: did you even tried to contact the author of this program: Nick Sukonnikov sukonnikov(at)vinnitsa.com?


yes I have tried to contact author with no success


They put the code in the car radio so dumb thiefs will not have a working radio without your code if they steal your radio from your car Wink
Post 13 Sep 2014, 08:51
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.