copymark / TM-Trainer

Trackmania Nations, United and Trackmania 2 Hack
GNU General Public License v2.0
13 stars 12 forks source link

TMNF crashes at CreateRemoteThread #4

Closed ghost closed 10 years ago

ghost commented 10 years ago

I downloaded the current source code and didn't touch any logic. I compiled in Debug or Release, both Win32.

However, as soon as I load up TMNF, TmForever.exe crashes in InjectDLL.cpp, line 117, where it wants to create the remote thread. A simple mav error of TMNF pops up that memory at location x could not be read, TMNF still continues to update in the background, but I can only close it due to this error popping up.

Bad address always seems to be offset to lpThreadStart. Sorry, I'm unexperienced with remote threads. Example: lpThreadStart: 0x09bd01d0 Bad address from which it tried to read: 0x09bdda62

The handle returned seems to be valid though, it's 0x120.

I don't know how to fix this :(

copymark commented 10 years ago

Line 66??? Are you sure? because thats line 117 for me.

ghost commented 10 years ago

Yeah you're right, sorry, I mixed it up with the current column =) Btw, I'm using the most recent version, as reported by the old trainer: Supported Version: 2.11.26 Game Version: 2.11.26

copymark commented 10 years ago

whats the old trainer? version from 8.7.2013?

ghost commented 10 years ago

Yeah, that one, which is still the most recent compilation on your website. It works nicely.

copymark commented 10 years ago

Well, whenever i compile the hack. It still works. The only problem i can think of is that your compiler compiles the dwRemoteLoadLoaderThread function diffrent. DWORD dwFuncSize = 0x42; is hardcoded. If this isn't correct it will not work.

ghost commented 10 years ago

I feared that. I'm using the VS2013 C++ compiler. dwFuncSize is 0x42.

ghost commented 10 years ago

I looked at the code written in CE, is this worth anything? Seems to have written 68 bytes (0x44) and opcodes accessing weird memory addresses. function If I change the func size to 0x44 it still doesn't work.

copymark commented 10 years ago

You can download a working (for me) version of tlTrainer.dll here: http://ul.to/0e5t8a5n

If you replace your version with this one, it should work.

This function you posted doesn't make any sense for me :D

ghost commented 10 years ago

Yeah the function also don't make any sense to me, but it's that what's written...

What's even more weird is that I just replaced my tlTrainer.dll in my release and debug folder and made sure its not overwritten at compile time, but it still crashes with the same problem.

copymark commented 10 years ago

Im really sorry, at the moment i dont know a solution.

Here is a link to download a full trainer. (But newer than the version on my website)

If this still doesn't work, means i must have changed something :(

Können auch deutsch sprechen wenn du magst :D

ghost commented 10 years ago

Thanks for the upload, this one works! :) (except the car mover crashing the game as soon as I press F, but that's another issue :D) As a last tip for me for debugging, it would be nice if you can post the bytes your trainer writes to TmForever.exe so that I can compare it with the crap my compiled version writes :)

Bevorzuge Englisch auf Github, haben auch andere etwas davon :)

ghost commented 10 years ago

Fixed: Don't start it with the VC++ debugger. I run the exe now from the output directory.