Flag: Tornado! Hurricane!

 Forums >>  Brainstorms - General  >>  Understanding raw floating-point tables

Topic created on: July 3, 2009 04:24 CDT by maximumlust .

Hello crews,

I'm doing RE since years. Most of the time my research is targeting multimedia compression algorithms and formats. Most of them use some floating-point code. Its complexity may be ranging between very simply tasks and high-speed signal processing.
I often need to understand some piece of code were optimized up using hardcoded tables. Here an example of such a table:

0.0, 1.0, 1.414, 1.732, 2.0, 2.236, 2.449, 2.645, 2.828, 3.0 and so on

It's obvious that the table stores square root products. Then we can rewrite that to the following:

sqrt(0), sqrt(1), sqrt(2), sqrt(3), sqrt(4), sqrt(5), sqrt(6), sqrt(7), sqrt(8), sqrt(9) and so on...

This is more readable and helps to understand the code much easier...

Most often numbers stored in tables are sin/cos precalculations, exp products, log tables, linear prediction and so on...

NOW MY QUESTION:
Is there any possibility to analyse such tables (vector of numbers) mathematically in order to be able to extract an unknown function? Is there a tool/script can give an idea what kind of number it can be? I was always doing it using my knowledges/experience and some google help :))
The example above is very simple but programs in the real world will be surely much more complex...


Any help would be appreciated
Best regards
Maxim

  detlef   July 3, 2009 04:58.15 CDT
I don't know such a tool.

The basic concept is simple but the integration is not that easy.
Isn't it all about defining a range R, a resolution r and all possible other inputs I parameters for a method M and try to find similarities between the calculated M(x), x out of R,r for all I.
If you find similarities adjust your range and your solution till the your test set is similar to the reference set.
Iterate trough all methods and search for similar outputs.
That's how a mathematician would define the problem.

It's really difficult to integrate this approach in an efficently way if you do not have any restrictions. If you can limit the search space, it becomes easier and faster.

For me, this sounds like a good idea for an new open source project or something similar.

  monarch   July 6, 2009 09:23.36 CDT
Anything that isn't obvious after a few minutes of google, you may want to use Mathematica and plot the points.
Then a polynomial approximation will assist in getting a "look" at it. Its a picture matching game after that.

  wtbw     July 8, 2009 07:12.55 CDT
It may not be helpful in this particular case as they're floats, but the online integer sequence encyclopedia has been very useful for me in a number of cases:

http://www.research.att.com/~njas/sequences/

Note: Registration is required to post to the forums.

There are 28,212 total registered users.


Recently Created Topics
Reverse Engineering ...
Jan/23
Career: DoD Agency I...
Jan/22
"Disappearing&q...
Jan/17
Career: Software Sec...
Jan/11
Where is the call st...
Jan/07
IDA Pro 6.1 Breakpoi...
Jan/01
How to create data s...
Dec/30
can i search all mod...
Dec/23
IDA symbol table exp...
Dec/20
An anti-attach trick
Dec/17


Recent Forum Posts
Reverse Engineering ...
NirIzr
"Disappearing&q...
NirIzr
Reverse Engineering ...
charlie
"Disappearing&q...
charlie
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
Looking for value in...
NirIzr


Recent Blog Entries
Ludwig
Feb/04
chi on sale

Ludwig
Feb/04
Monster In The Vicinity Of ...

Ludwig
Feb/04
Supra footwear Online

waleedassar
Jan/31
Yet Another Anti-Debug Trick

RolfRolles
Jan/22
Finding Bugs in VMs with a ...

More ...


Recent Blog Comments
waleedassar on:
Feb/01
Yet Another Anti-Debug Trick

NirIzr on:
Jan/31
Yet Another Anti-Debug Trick

jackchen on:
Jan/10
nike mercurial vapor iii

waleedassar on:
Dec/27
A new Anti-Olly trick.

PeterFerrie on:
Dec/27
A new Anti-Olly trick.

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit