Well, don't even bother with register compare on Godot
Attached is table that will do the following things:
-Dump all objects(nodes) in current level
-Generate player/player-weapon/global-variables - it will generate a bigass list of pointers
-Dump all player functions ( name + pointer to the function object that is containing the script byte buffer )
-God mode example script
some notes:
all player related scripts will only activate if a level is loaded coz my script is getting the player at runtime, that means you need to reactivate them after each level.
you will see a ammo value inside the weapon struct that will not make any sense, the reason for that is that ammo is stored as a VariantArray( my dumper does only support Integers,Floats/Doubles and Strings, everything that is not detected will just show as 4 bytes )
VariantArray means the ammo is stored inside a
array with an index for each weapon, I didn't bother to write something to read it out ... probably its possibly to search for the "consume ammo" function and then return it (like I did with the god example script ) but again : I didn't look at that!
Dumper tested on version v21.11.2021 (Godot 3.3)
So yeah thats it, its not a "ready 2 use" table, its just my personal Godot Dumper
The "Goal" on Godot is getting the Viewport, this allows to get all the objects(childrens of the viewport) that are loaded in the current level.
After that Im starting to find the names of the variables and functions, the names are stored inside a <string,int> map ( the int value of the map matches with the index from the vector<variant> that is storing the value )
How to get the Viewport:
A)String search for "bad dynamic_cast" to find the Dynamic_Cast function, Godot is calling this function often so you can easily set a breakpoint to catch all pointers that are returned,every object that is inheriting from
Node has the Viewport pointer.
B)String search for "SceneTree" references and then do a 8 Byte Hex search for the function start address, if the result is green ( static ) then you found the vtable, subtract 0x30 and search again 8 Byte Hex = Instance of SceneTree that contains a pointer to the viewport.
C)Memory scan for ANY value, the found address is inside a vector<variant>, a variant is 0x18 byte sized and contains the type and the value, now try to find the first index of the vector.
(first index - 0x4 ) = size of the vector
do a 8 Byte Hex scan for the address of the first index and you will find the ScriptInstance.
ScriptInstance + 0x10 = Owner ( Any Node )
Viewport pointer offset inside a Node depends on the Godot version, every Node contains also:
-class name (vtable + 0x30 )
-node name
-script name ( if a script is attached)
The offsets for the node and script names are depending on the Godot version, but you can always figure out what you are looking at
Okay thats it, a short overview of "how to hack godot" ...Yes Godot is really not a easy Engine for Game-Hacking ...