Skip to main content

Questions tagged [source-reconstruction]

Techniques that attempt to re-create, to the highest extent possible, the source code used to produce a given binary file.

10votes
1answer
1kviews

How to set/force EXE stack size with 1988 Turbo C 2.0 for a reverse engineering project

I am trying to reconstruct C source of a Turbo C 2.0 DOS small-memory-model executable as exactly as possible from disassembly (it’s a DOS reverse-engineering project and I’m using IDA Pro for ...
llm's user avatar
  • 203
3votes
2answers
534views

Why does my MZ executable's BSS inflate by ~1,5KB after linking fopen() with MSC?

For a game reversing project, I am trying to undo linking with the C library performed by the MSC 5.1 C compiler+linker. To that end, I have created a simple executable that does nothing except ...
neuviemeporte's user avatar
10votes
3answers
1kviews

How can I make the Microsoft C compiler for DOS emit a loop with an intermediate jump to continue?

I am trying to recreate the exact C source code from some 16bit DOS 8086 assembly generated by the MS C 5.0 compiler. After making some progress, I've hit a wall with the following code (annotated in ...
neuviemeporte's user avatar
8votes
1answer
755views

How to make Microsoft C for MS-DOS emit an immediate-target far call into the data segment?

I am trying to recreate the C source code from some 16bit DOS 8086 assembly generated by the MS C 5.0 compiler. I've hit a wall with this far call instruction. 0000008D 9A2F0CB506 call 0x6b5:...
neuviemeporte's user avatar
20votes
1answer
2kviews

How can I set up the Microsoft C compiler to make it prefer immediate-mode push instructions?

I started a project to get a better understanding on how to compile a game for Windows 3.x. I tried to set up the build workflow so that it produce the byte-exact clone of a great open sourced Win16 ...
SZIEBERTH Ádám's user avatar
3votes
1answer
267views

How to remove ___EXPORTEDSTUB statement from a NE (Win16) program's MAP?

I started a project to get a better understanding on how to compile a game for Windows 3.x. I tried to set up the build workflow so that it produce the byte-exact clone of a great open sourced Win16 ...
SZIEBERTH Ádám's user avatar

close