VOGONS

Common searches


Reply 20 of 22, by mkarcher

User metadata
Rank l33t
Rank
l33t
Peter Swinkels wrote on 2024-04-23, 07:04:

Also, how I am going to figure out the application code if I don't know what C function's they're calling or what part of the binary is application code?

As a DOS EXE file does not contain any kind of function name information, all names displayed by IDA (like _open or __dtoxmode) are there because IDA recognized these functions. While IDA knows the MS C library quite well and is able to recognize nearly all parts of it, it does not know anything about application code, and thus won't recognize application functions. So any named function (except main) is library code, and also flagged as such by the "L" attribute and the bright cyan color coding of the addresses, as already mentioned by llm. You can figure out what parts are application code by just looking at the code that has not yet been named by IDA (and of course by looking at main, too).

Reply 21 of 22, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

Thank you llm. That looks useful. 😀

Do not read if you don't like attention seeking self-advertisements!

Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels

Reply 22 of 22, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

@mkarcher: yeah I get it, once I know what is C library code I will need to start to figure out what application function does what. C functions are pretty standardized but the code specific to the application is not. However even though the version of Cartooners I am reverse engineneering is a MS-DOS program it is a port from a program originally released for the Apple IIGS and as such retains traces of that origin:

https://gswv.apple2.org.za/a2zine/GS.WorldView/v1999/Sep/GSWV.A2.Error.Code.files/IIgs.Error.Codes.txt

$0 - None
$201 - Unable to allocate
$202 - Illegal operation on an empty handle
$203 - Illegal operation on a handle that is not empty
$204 - Illegal operation on a locked or immovable block
$205 - Attempt to purge an unpurgeable block
$206 - Invalid handle
$601 - The Event Manager has already been started
$607 - Insufficient memory available for queue
$6FF - ???
$E02 - Unable to allocate window record
$E03 - Some reserved bits were not clear in Window Manager - TaskMask field of Window Manager TaskRec record
$150A - Inappropriate item type
$150B - Item creation failed
$150C - No such item

Stored at [0x80C0] according to the disassembled code.

I can give more examples of Apple IIGS related remnants if anyone is interested.

Do not read if you don't like attention seeking self-advertisements!

Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels