nikolatesla20
April 19th, 2002, 21:32
Ok, ok, maybe YOU won't need this tool, but *I* do, so there 
Plus it is good learning for me anyway
Especially how to use pointers on Memory Mapped files in Delphi ...what a pain 'til I figured it out...
Anyway the purpose of this tool is to fix your dumped file, once you have it up and running. No, it's not some magical dumpfixer. Remember, this is AFTER you have the program running
. The whole point of the utility is to make sure that BOTH your import thunk tables point to the same imported function names. ( For those of you not in the know, an EXE file has TWO arrays pointing to the import functions, well, at least it's supposed to)
The main reason I made this tool is because I like to have the option to add code to a program. To do this I use Izcelion's Code Snippet Creator. Problem is, Code Snippet Creator has a bug. When it looks for imported functions, it only sees the ones in the FirstThunk table. (Which makes sense, because it needs to know THOSE in order to hook any api's you use to the correct call).
Anyway, when you dump a file from memory and rebuilt the IAT, you usually paste it into a new section, or whatever. Meanwhile, your FirstThunk table, which got dumped from memory with it, is full of B.S. addresses from **Protect or whatever packer messed with it. Luckily for us the PE loader looks for the OriginalFirstThunk table FIRST, which is the one we rebuild, and patches the addresses in the FirstThunk table based off of it, so the program will RUN just fine.
But Code Snippet Creator won't work with only the OriginalFirstThunk table, it needs to know the correct address to call for any api's you use in your code snippet, and it can only get that from the FirstThunk table. And plus hey, don't you want your dump to be as virgin as possible?
Fire up the First_Thunk_Rebuilder and fix that FirstThunk table back to pristine OEM condition
Coded in 2 days with Borland Delphi 6.0.
Check it out at :
THIS LINK WAS BROKEN
PLEASE SEE BELOW FOR THE CORRECT LINK !
-nt20
ATTENTION Shareware Authors:
********* I RESERVE THE LEGAL RIGHT TO REMOVE YOUR "PROTECTION" VIRUS FROM MY COMPUTER *******


Plus it is good learning for me anyway

Anyway the purpose of this tool is to fix your dumped file, once you have it up and running. No, it's not some magical dumpfixer. Remember, this is AFTER you have the program running

The main reason I made this tool is because I like to have the option to add code to a program. To do this I use Izcelion's Code Snippet Creator. Problem is, Code Snippet Creator has a bug. When it looks for imported functions, it only sees the ones in the FirstThunk table. (Which makes sense, because it needs to know THOSE in order to hook any api's you use to the correct call).
Anyway, when you dump a file from memory and rebuilt the IAT, you usually paste it into a new section, or whatever. Meanwhile, your FirstThunk table, which got dumped from memory with it, is full of B.S. addresses from **Protect or whatever packer messed with it. Luckily for us the PE loader looks for the OriginalFirstThunk table FIRST, which is the one we rebuild, and patches the addresses in the FirstThunk table based off of it, so the program will RUN just fine.
But Code Snippet Creator won't work with only the OriginalFirstThunk table, it needs to know the correct address to call for any api's you use in your code snippet, and it can only get that from the FirstThunk table. And plus hey, don't you want your dump to be as virgin as possible?
Fire up the First_Thunk_Rebuilder and fix that FirstThunk table back to pristine OEM condition

Coded in 2 days with Borland Delphi 6.0.
Check it out at :
THIS LINK WAS BROKEN
PLEASE SEE BELOW FOR THE CORRECT LINK !
-nt20
ATTENTION Shareware Authors:
********* I RESERVE THE LEGAL RIGHT TO REMOVE YOUR "PROTECTION" VIRUS FROM MY COMPUTER *******
