View Full Version : reversing a 16-bits dll
efy
April 1st, 2003, 04:36
Here is my prob
I've to use a dll that controls a mesure machine. that dll isn't documented at all.
The thing is that it is an old dos dll 16 bits, and tools like dependncy walker do not work
all i've found is light tuts, and nothing really about how to do this with an old dll.
So if some1 could show me the way, that would be nice
Efy
naides
April 1st, 2003, 06:07
Well, I can only tell you that I share your pain. If you look my few previous posts you would know I have been there.
-Doubt you will find a lot of help in tutors. Most serious protection and reversing started in the Win32 era. The few docs I found dealt mostly with disk based protections, which were very fashionable in late 80's early 90's.
- dissasm and tracing 16bit dlls is laborious, but not impossible. You have to revisit the segment: offset model memory, to keep from getting lost.
-To simplify things, try to narrow down the export function or functions you are dealing with, and their internal and external dependencies. You have to do it by hand, but usually, these .dll are relatively small, less than 100 Kb.
Before diving into code: search carefully the manufacturers of the instrument you are dealing with. If you are lucky, they may have updated the drivers and interphase software to a win32 platform.
Sorry I can not be more helpful, unless you have a more detailed/specific question
efy
April 1st, 2003, 06:18
The size is Ok, it's about 5 ko
The thing is that i've never done that before, and i absolutly don't know how to begin
This dll is used to pilot a com port that is linked with a mesure machine. The people that are using this machine want not to go through the software developped by the constructor of the machine
this software is tsap, a dendrologic soft
and the dll can be found here muetes.free.fr/projo
Anyway thx naides

Efy
naides
April 1st, 2003, 07:04
OK efy.
To begin, you should spell out what YOU want to do with the .dll: Do you want to change the behavoir of some function(s)?
emulate it?
Rewrite it?
I quickly looked at a dissasm of your dll and it does not export any functions (damn!). So your app loads it and refers to its code by ofset. This complicates things a little.
You need to learn how the .dll is loaded and how your app gets the address to call or jump into your .dll code.
Is the main exe of the program also 16 bit? if not, dissasembling the main exe and looking at the areas where your .dll code get called can be quite informative.
judging by the size of the .dll, it contains only a few functions, and 30% of the space is taken by 00, probably buffers for I/O communications.
efy
April 1st, 2003, 07:18
I would like to know the functions written in this dll, to use it in another apps
I quickly looked to the exe files (packed) it's 16 bits to
It's exactly that, it's the dll used to communicate with the mesure machine
squidge
April 1st, 2003, 07:27
Like naides' says though, you need to disassemble the program that currently talks to it, in order to figure out what functions it supports and how to use them.
Or you could possibly by-pass the DLL and communicate to the machine directly by snooping the comms with the original software and RE that?
efy
April 1st, 2003, 07:34
I already tried that, but this gave me weird results, like two differents mesures after a reboot

.
that's why i look how does this dll work
tgodd
April 1st, 2003, 23:44
Alot of these old machines, as well as many new ones are
controlled by PLC's (Programable logic controllers).
It would be easier to reverse the code in the Controller.
I would suggest you find out which controller is being used
and find some documentaion on it.
Regards,
tgodd
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.