Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <CheatTable>
- <CheatEntries>
- <CheatEntry>
- <ID>6</ID>
- <Description>"Enable Test"</Description>
- <LastState Activated="1"/>
- <VariableType>Auto Assembler Script</VariableType>
- <AssemblerScript>{ Game : godot.windows.opt.64.exe
- Version:
- Date : 2022-03-24
- Author : cfe
- This script does blah blah blah
- }
- [ENABLE]
- aobscanmodule(aobGetScripts,$process,48 89 54 24 10 55 53 56 57 41 54 41 55 41 56 41 57 48 81) // should be unique
- alloc(newmem,$1000,aobGetScripts)
- label(code)
- label(return)
- label(pScripts)
- registersymbol(pScripts)
- label(Ending)
- label(Again)
- newmem:
- code:
- // there is static way to get all scripts
- // rootScene is static
- // rootScene does contain all nodes
- // and then check every node if it does contain a script
- // all nodes in the rootsCene are stored inside a map<> container
- push rax
- push rbx
- mov rax,pScripts
- xor rbx,rbx
- Again:
- cmp qword ptr[rax+rbx*8],0
- jne short @f
- mov [rax+rbx*8],r8
- jmp Ending
- @@:
- cmp qword ptr[rax+rbx*8],r8
- je Ending
- inc rbx
- jmp Again
- Ending:
- pop rbx
- pop rax
- mov [rsp+10],rdx
- jmp return
- pScripts:
- dq 0
- alloc(GetClassName,$1000,$process)
- registersymbol(GetClassName)
- GetClassName:
- push rbx
- sub rsp,40
- mov rax,[rcx]
- call qword ptr[rax+30]
- add rsp,40
- pop rbx
- ret
- aobGetScripts:
- jmp newmem
- return:
- registersymbol(aobGetScripts)
- [DISABLE]
- aobGetScripts:
- db 48 89 54 24 10
- dealloc(GetClassName)
- unregistersymbol(*)
- </AssemblerScript>
- <CheatEntries>
- <CheatEntry>
- <ID>90393</ID>
- <Description>"Generate"</Description>
- <LastState/>
- <VariableType>Auto Assembler Script</VariableType>
- <AssemblerScript>/*
- Script Variables Types:
- 0 = null
- 1 = bool
- 2 = int
- 3 = float
- 4 = string
- 5 = vec2
- 6 = vec2i
- todo : add more
- */
- {$lua}
- if syntaxcheck then return end
- function GetCEType(gType)
- if (gType == 1) then return 0 end --bool
- if (gType == 3) then return 5 end --a float is a double in godot
- if (gType == 5) then return 4 end --vector2 is a x,y float in godot
- if (gType == 4) then return 7 end --(unicode)string
- return 2 --integer
- end
- [ENABLE]
- local Scripts = getAddress("pScripts")
- local i = 0
- addList = getAddressList()
- local GenRec = addList.createMemoryRecord()
- GenRec.setDescription("Generated:")
- GenRec.setAddress(0)
- GenRec.setType(8)
- GenRec.DontSave=true
- while( readQword(Scripts+i*8) > 0) do
- local ScriptInstance = readPointer(Scripts+i*8)
- local Variants = readPointer(ScriptInstance+0x20)
- local Vars = readInteger(Variants-0x4)
- Vars=Vars-1 --Vector<Variants> length - 1
- local Script = readPointer(ScriptInstance+0x10)
- local ScriptNamePtr = readPointer(Script+0x250)
- local szScriptName = readString(ScriptNamePtr+0xC,99,true)
- --Node = owner of the scriptinstance
- --OOP : Object -> Node -> (Canvas/Node2D/Node3D) -> xxx(e.g Label1)
- local Node = readPointer(ScriptInstance+0x8)
- local NodeName = readPointer(Node+0x120) -- NameString
- local NodeNamePtr = readPointer(NodeName +0x10)
- --a Node is like a GameObject(Unity) or Actor(Unreal)
- --the node name is the name that is used from the dev to name the object
- --in the editor
- local szNodeName = readString(NodeNamePtr,99,true)
- local Infos = string.format("%s(%s)",szNodeName,szScriptName)
- local OwnerRec = addList.createMemoryRecord()
- OwnerRec.setDescription(szNodeName)
- OwnerRec.setAddress(0)
- OwnerRec.setType(8)
- OwnerRec.DontSave=true
- OwnerRec.appendToEntry(GenRec)
- -- currently only transform support for sprites
- -- todo:
- -- add transform support for StaticBody2D and KinematicBody2D
- -- +3D types
- local Class = executeCodeEx(0, nil,getAddress("GetClassName"),Node)
- if (Class > 0) then
- Class = readPointer(Class)
- Class = readPointer(Class+0x10)
- local ClassName = readString(Class,99,true)
- if (ClassName == "Sprite") then
- local newRec = addList.createMemoryRecord()
- newRec.setDescription("Transform Position X")
- newRec.setAddress(Node+0x288)
- newRec.setType(4)
- newRec.DontSave=true
- newRec.appendToEntry(OwnerRec)
- local newRec = addList.createMemoryRecord()
- newRec.setDescription("Transform Position Y")
- newRec.setAddress(Node+0x288+0x4)
- newRec.setType(4)
- newRec.DontSave=true
- newRec.appendToEntry(OwnerRec)
- local newRec = addList.createMemoryRecord()
- newRec.setDescription("Transform Rotation")
- newRec.setAddress(Node+0x288+0x8)
- newRec.setType(4)
- newRec.DontSave=true
- newRec.appendToEntry(OwnerRec)
- local newRec = addList.createMemoryRecord()
- newRec.setDescription("Transform Scale X")
- newRec.setAddress(Node+0x288+0xC)
- newRec.setType(4)
- newRec.DontSave=true
- newRec.appendToEntry(OwnerRec)
- local newRec = addList.createMemoryRecord()
- newRec.SetDescription("Transform Scale Y")
- newRec.setAddress(Node+0x288+0x10)
- newRec.setType(4)
- newRec.DontSave=true
- newRec.appendToEntry(OwnerRec)
- end
- end
- for n=0,Vars do
- local Type = readInteger(Variants)
- local CEType = GetCEType(Type)
- local Ptr = Variants+0x8
- if (Type == 4 ) then -- if string
- Ptr=readPointer(Ptr) --read ptr to wchars
- end
- if (Type == 5 ) then -- if vector2
- --X
- local VecInfo = string.format("Vec2.x(%s)",szScriptName)
- local newRec = addList.createMemoryRecord()
- newRec.setDescription(VecInfo)
- newRec.setAddress(Ptr)
- newRec.setType(CEType)
- newRec.DontSave=true
- newRec.appendToEntry(OwnerRec)
- --Y
- local VecInfo = string.format("Vec2.y(%s)",szScriptName)
- local newRec = addList.createMemoryRecord()
- newRec.setDescription(VecInfo)
- newRec.setAddress(Ptr+0x4)
- newRec.setType(CEType)
- newRec.DontSave=true
- newRec.appendToEntry(OwnerRec)
- else
- local newRec = addList.createMemoryRecord()
- newRec.setDescription("Variable("..szScriptName..")")
- newRec.setAddress(Ptr)
- newRec.setType(CEType)
- newRec.DontSave=true
- newRec.appendToEntry(OwnerRec)
- end
- Variants=Variants+0x18
- end
- i=i+1
- end
- [DISABLE]
- local Generated = addList.getMemoryRecordByDescription("Generated:")
- if Generated ~= nil then
- while Generated.Count > 0 do
- Generated.Child[0]:Delete()
- end
- Generated:Delete()
- end
- </AssemblerScript>
- </CheatEntry>
- </CheatEntries>
- </CheatEntry>
- </CheatEntries>
- </CheatTable>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement