I found a bug I'm pretty sure in the patch code.
What the effect of this is I'm not sure right now.
But patching code by accident could be potentially pretty bad.
The effects could be random weird behavior or even game crashing.
the following line of code is used in every patch routine for every version of the game
edit: this exact issue seems to be in a lot of spots all over the code.
And some cast'd pointers don't match up too, like setting DWORD but only providing 1 byte..
memset ((BYTE *)(0x47360D+dwLoadOffset), 0x90, 0x2A);
It looks to me that Listeners intention was to a patch just a single byte.
but the usage of memset is incorrect i believe, rather than 1 byte getting patched
that line is in fact actualy patching the 1 byte plus the next 41 bytes that come after that
regardless of what data is being patch over (the memset command doesn't care what is there)
it simply does what its told to do..
Note the parameter "0x2A" that is "42" decimal.
Listener said he does not support online mode with this so asking in this topic is a waste of time
Your probably better of asking else where on the forum, and I have no idea if that is possible.
If people want to fix the bug in their source code ?
use this instead
*(BYTE *)(0x47360D+dwLoadOffset) = 0xEB;
Just don't forget to adjust the target address for each line you may fix
That patch is suppose to prevent,
VDS102 - FATAL ERROR INVALID RESOURCE DETECTED - REINSTALL GAME
I'm pretty sure i found two more patch bugs.
There is no notes in the source code what they do (fix messed sequences ? WTF ??)
but the last 2 of 4 patchs seem to not work as intended. They are patching a modified fixup address
so basicly the code patched is getting written over with other code by GTAIV.exe
on patchs 1 and 3 (of the last 4) // mov al, 1; retn
So i will add a picture showing what i mean and i am looking at a work around
like maybe instead do a jmp to one of the lines patched that do work ok or something ?
Anyway if anyone knows OllyDBG you can see in the pictured disassembled data
that all four lines are suppose to move 1 to the AL register and Return,
but it doesn't / can't on 2 of those 4 patchs pictured.
i think on the 2/4 last patchs issue i mentioned, what should be done is
patch the call instead -> movzx EAX, AL to movezx EAX, 1
on the call for patch 1of4
and then the same thing on the call to patch 3/4
Any crackers out there reading this ? LOL sound good ???
Bear in mind i don't know what the hell its patching in the first place LOLOL This post has been edited by westsidebud on Tuesday, Jun 26 2012, 17:15