Jump to content

[ Source ] GG Decompiler Tool Source Code by Dj-jom2x


Dj-jom2x
 Share

Recommended Posts

Here you can use this but dont own it.. give some credits.. 

gg snooper only log important code.

you dont have to be ingame to log the source code.. if you use snooper.. you can select any dummy process.. it will not execute the function anyway.. so it doesn't matter.. it will output the code only.. 

please download the code below dont copy paste else you will get unknown symbols.. this is due to this code bbcode in this forum..

 

it can produce detailed like this

example if you have

Quote

old = gg.getRanges()
gg.searchNumber('6667671', gg.TYPE_DOUBLE, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(100)
gg.editAll("-126", gg.TYPE_DOUBLE)
gg.clearResults()
gg.setRanges(bit32.bxor(gg.REGION_C_HEAP, gg.REGION_C_ALLOC, gg.REGION_ANONYMOUS))
gg.setRanges(gg.REGION_C_HEAP)
gg.setRanges(old)
 

then it will output like this

Quote

var = gg.getRanges()
gg.searchNumber("6667671",gg.TYPE_DOUBLE,false,gg.SIGN_FUZZY_EQUAL,0,-1)
var = gg.getResults(100)
gg.editAll("-126",gg.TYPE_DOUBLE)
gg.clearResults()
-- bxor auto calculated
gg.setRanges(37)
-- normal range
gg.setRanges(gg.REGION_C_HEAP)
-- restore via var
gg.setRanges(var)

another example if you got

Quote

gg.clearResults()
gg.searchNumber("1235", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
t= gg.getResults(8) --load items))
t[1].value = "1245"
t[2].value = "1235"
t[3].value = "1245"
t[4].value = "1235"
t[1].freeze = true
t[2].freeze = true
t[3].freeze = true
t[4].freeze = true
t[1].freezeType = gg.FREEZE_NORMAL
t[2].freezeType = gg.FREEZE_NORMAL
t[3].freezeType = gg.FREEZE_NORMAL
t[4].freezeType = gg.FREEZE_NORMAL
print("addListItems: ", gg.addListItems(t))
gg.toast ("凸ಠ益ಠ)凸")
gg.clearResults()

it can produce like this

Quote

Script ended:
gg.clearResults()
gg.searchNumber("1235",gg.TYPE_DWORD,false,gg.SIGN_FUZZY_EQUAL,0,-1)
var = gg.getResults(8)
var[1].value = 1245
var[1].freeze = true
var[1].freezeType = gg.FREEZE_NORMAL
var[2].value = 1235
var[2].freeze = true
var[2].freezeType = gg.FREEZE_NORMAL
var[3].value = 1245
var[3].freeze = true
var[3].freezeType = gg.FREEZE_NORMAL
var[4].value = 1235
var[4].freeze = true
var[4].freezeType = gg.FREEZE_NORMAL
gg.addListItems(var)
gg.clearResults()

 

autodecompile.lua

Link to comment
Share on other sites

3 minutes ago, CmP said:

Not bad script, but it lacks error handling in some cases.

Source code that you have published contains some unreadable symbols which cause lua interpreter to fail.
Removed them and fixed indentation (other things weren't changed)
decompiler.lua

thats for them to fix.. no support intended... its poc.

Link to comment
Share on other sites

18 minutes ago, Dj-jom2x said:

thats for them to fix.. no support intended... its poc.

You can't force them to think and solve some tasks if they don't want to.

Anyway, check updated version of this script by Enyby. 

Script compiler (#9b2xri28)

It has "Dump all data from load call" and "Log all GG calls" features which are intended for almost same purposes as your script is.
However, the implementation of these two features takes only ~60 lines of code there. It also saves the result to a file, which, I think, is more comfortable way than printing them to standard output, because last option requires additional operations to be able to work with the results.

Edited by CmP
Link to comment
Share on other sites

46 minutes ago, CmP said:

You can't force them to think and solve some tasks if they don't want to.

Anyway, check updated version of this script by Enyby. 

Script compiler (#9b2xri28)

It has "Dump all data from load call" and "Log all GG calls" features which are intended for almost same purposes as your script is.
However, the implementation of these two features takes only ~60 lines of code there. It also saves the result to a file, which, I think, is more comfortable way than printing them to standard output, because last option requires additional operations to be able to work with the results.

hmm saving a file is easy.. and im comfortable on printing it than saving it.. beacause you have to clean it before saving it..  if the script have more printing things and stuff.. also if you use that and the menu have loop that makes the script stays on the top.. you willl see a lot of gg.isVisible on log

 

also you need to reconstruct that else you will get this

 

gg.clearResults()
gg.searchNumber("1234", 16)
gg.getResults(3)
gg.addListItems(table(1665007): {
    [1] = table(15c6534): {
    [address] = 546365621144
    [flags] = 16
    [freezeType] = 0
    [freeze] = true
    [value] = 1234
}
    [2] = table(5651f5d): {
    [address] = 546373456808
    [flags] = 16
    [freezeType] = 0
    [freeze] = true
    [value] = 1234
}
    [3] = table(a8ae0d2): {
    [address] = 546373490584
    [flags] = 16
    [freezeType] = 0
    [freeze] = true
    [value] = 1234
}
})
gg.clearResults()
 

and also settings ranges need to be reconstructed. thats why mine takes a lot of lines because im trying to reconstruct the original code and focus on the code inside not to log other unimportant gg calls at the background. not just logging it. and that separates mine to him. also you have to be in game to use his script and wait for the code to execute to be logged. mine you can use any dummy process to use snooper. and no more waiting for log.

i already split mine so i can orginize them and to recreate the code behind it.. to save more time..

Edited by Dj-jom2x
more details
Link to comment
Share on other sites

5 minutes ago, Dj-jom2x said:

hmm saving a file is easy..

Noone said that it is hard.

6 minutes ago, Dj-jom2x said:

you willl see a lot of gg.isVisible on log

Not really, depends on how analyzed script is written.

7 minutes ago, Dj-jom2x said:

also you need to reconstruct that else you will get this

 

gg.clearResults()
gg.searchNumber("1234", 16)
gg.getResults(3)
gg.addListItems(table(1665007): {
    [1] = table(15c6534): {
    [address] = 546365621144
    [flags] = 16
    [freezeType] = 0
    [freeze] = true
    [value] = 1234
}
    [2] = table(5651f5d): {
    [address] = 546373456808
    [flags] = 16
    [freezeType] = 0
    [freeze] = true
    [value] = 1234
}
    [3] = table(a8ae0d2): {
    [address] = 546373490584
    [flags] = 16
    [freezeType] = 0
    [freeze] = true
    [value] = 1234
}
})
gg.clearResults()

And it is perfectly fine to understand what's going on in the script.
Enyby's script is a general tool, it's not intended for, as you said, reconstructing the original code. If one needs such feature, then one can write script that will fit to his purposes (just like you did).

Link to comment
Share on other sites

10 minutes ago, CmP said:

Noone said that it is hard.

Not really, depends on how analyzed script is written.

And it is perfectly fine to understand what's going on in the script.
Enyby's script is a general tool, it's not intended for, as you said, reconstructing the original code. If one needs such feature, then one can write script that will fit to his purposes (just like you did).

then case close.... im giving all leechers more favor. ?

Edited by Dj-jom2x
Link to comment
Share on other sites

25 minutes ago, Dj-jom2x said:

thats why mine takes a lot of lines because im trying to reconstruct the original code and focus on the code inside not to log other unimportant gg calls at the background.

I already replied to this in my previous message, just want to add that "unimportant gg calls" are not important for you, this does not mean that they are not important for someone else. Everyone has their own needs and if the tool with general approach does not suffice, then it is usually possible to write a script, that will meet custom requirements.

Link to comment
Share on other sites

9 minutes ago, CmP said:

I already replied to this in my previous message, just want to add that "unimportant gg calls" are not important for you, this does not mean that they are not important for someone else. Everyone has their own needs and if the tool with general approach does not suffice, then it is usually possible to write a script, that will meet custom requirements.

if they need more they can add more.. just follow the structure of the code.

im logging all gg calls that people usually used.. edit search clear etc

they can read more here https://gameguardian.net/help/classgg.html

Edited by Dj-jom2x
Link to comment
Share on other sites

16 minutes ago, Dj-jom2x said:

im logging all practical codes that people usually used..

If you mean those awkward scripts for pubg and some other popular games, then I do agree with you.
But if you want to be able to reconstruct some function from good-written script, then consider adding support for the next gg functions: clearList, getListItems, getRangesList, getResultsCount, getValues, removeListItems, removeResults, searchAddress, searchFuzzy, setValues, startFuzzy and some others.

However, you still won't be able to recreate source code in it's initial form, because this approach in general can't "capture" control structures (which are essential part of any good script).

Edited by CmP
Link to comment
Share on other sites

dear gg.. i hate the editor when using mobile i cant delete or remove the code.. I added download link and i want to delete the code text above because it gives a unknown symbols if they copy that and paste to their notepads zzz.

5 minutes ago, CmP said:

If you mean those awkward scripts for pubg and some other popular games, then I do agree with you.
But if you want to be able to reconstruct some function from good-written script, then consider adding support for the next gg functions: clearList, getListItems, getRangesList, getResultsCount, getValues, removeListItems, removeResults, searchAddress, searchFuzzy, setValues, startFuzzy and some others.

However, you still won't be able to recreate source code in it's initial form, because this approach in general can't "capture" control structures (which are essential part of any good script).

well they have codes and hands and minds and comonsense. they have to do it on their own.. and don't tell me "I cant force them to think and do some task if they dont want too" ... I will force them to learn to code.. to enhance their minds. its healthy tho ? keeps your mind active.

 

 

 

Link to comment
Share on other sites

  • Administrators

You can use dump. Usually it is enough for restore script flow.

Most script has very easy work flow. Rare use loop or even functions.

And run in this script can be easly detected, because here functions replaced by table with metatag "call". I use function with local vars, so it more hard detect.

_______________________________________________
added 1 minute later

Forum not good. But we can  do nothing with its. IPS authors have different point of view for editor and many other things.

Link to comment
Share on other sites

Just now, Enyby said:

You can use dump. Usually it is enough for restore script flow.

Most script has very easy work flow. Rare use loop or even functions.

And run in this script can be easly detected, because here functions replaced by table with metatag "call". I use function with local vars, so it more hard detect.

senpai notice me ?

can you delete the code above ? because its the bbcode gives a unknown symbols when they try to copy and pasted it.. also the editor on mobile i cant delete the code.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.