Advertisement
tcyknhrabirwjyljhp

Untitled

Mar 26th, 2022
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.82 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <CheatTable>
  3. <CheatEntries>
  4. <CheatEntry>
  5. <ID>6</ID>
  6. <Description>"Enable Test"</Description>
  7. <LastState Activated="1"/>
  8. <VariableType>Auto Assembler Script</VariableType>
  9. <AssemblerScript>{ Game : godot.windows.opt.64.exe
  10. Version:
  11. Date : 2022-03-24
  12. Author : cfe
  13.  
  14. This script does blah blah blah
  15. }
  16.  
  17. [ENABLE]
  18.  
  19. 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
  20. alloc(newmem,$1000,aobGetScripts)
  21.  
  22. label(code)
  23. label(return)
  24. label(pScripts)
  25. registersymbol(pScripts)
  26. label(Ending)
  27. label(Again)
  28.  
  29. newmem:
  30.  
  31. code:
  32. // there is static way to get all scripts
  33. // rootScene is static
  34. // rootScene does contain all nodes
  35. // and then check every node if it does contain a script
  36. // all nodes in the rootsCene are stored inside a map&lt;&gt; container
  37.  
  38. push rax
  39. push rbx
  40. mov rax,pScripts
  41. xor rbx,rbx
  42. Again:
  43. cmp qword ptr[rax+rbx*8],0
  44. jne short @f
  45. mov [rax+rbx*8],r8
  46. jmp Ending
  47. @@:
  48. cmp qword ptr[rax+rbx*8],r8
  49. je Ending
  50. inc rbx
  51. jmp Again
  52. Ending:
  53. pop rbx
  54. pop rax
  55. mov [rsp+10],rdx
  56. jmp return
  57. pScripts:
  58. dq 0
  59.  
  60. alloc(GetClassName,$1000,$process)
  61. registersymbol(GetClassName)
  62.  
  63. GetClassName:
  64. push rbx
  65. sub rsp,40
  66. mov rax,[rcx]
  67. call qword ptr[rax+30]
  68. add rsp,40
  69. pop rbx
  70. ret
  71.  
  72. aobGetScripts:
  73. jmp newmem
  74. return:
  75. registersymbol(aobGetScripts)
  76.  
  77. [DISABLE]
  78.  
  79. aobGetScripts:
  80. db 48 89 54 24 10
  81.  
  82.  
  83. dealloc(GetClassName)
  84. unregistersymbol(*)
  85. </AssemblerScript>
  86. <CheatEntries>
  87. <CheatEntry>
  88. <ID>90393</ID>
  89. <Description>"Generate"</Description>
  90. <LastState/>
  91. <VariableType>Auto Assembler Script</VariableType>
  92. <AssemblerScript>/*
  93. Script Variables Types:
  94. 0 = null
  95. 1 = bool
  96. 2 = int
  97. 3 = float
  98. 4 = string
  99. 5 = vec2
  100. 6 = vec2i
  101. todo : add more
  102. */
  103.  
  104. {$lua}
  105. if syntaxcheck then return end
  106.  
  107. function GetCEType(gType)
  108. if (gType == 1) then return 0 end --bool
  109. if (gType == 3) then return 5 end --a float is a double in godot
  110. if (gType == 5) then return 4 end --vector2 is a x,y float in godot
  111. if (gType == 4) then return 7 end --(unicode)string
  112. return 2 --integer
  113. end
  114.  
  115. [ENABLE]
  116. local Scripts = getAddress("pScripts")
  117. local i = 0
  118. addList = getAddressList()
  119.  
  120. local GenRec = addList.createMemoryRecord()
  121. GenRec.setDescription("Generated:")
  122. GenRec.setAddress(0)
  123. GenRec.setType(8)
  124. GenRec.DontSave=true
  125.  
  126. while( readQword(Scripts+i*8) &gt; 0) do
  127. local ScriptInstance = readPointer(Scripts+i*8)
  128. local Variants = readPointer(ScriptInstance+0x20)
  129. local Vars = readInteger(Variants-0x4)
  130. Vars=Vars-1 --Vector&lt;Variants&gt; length - 1
  131.  
  132. local Script = readPointer(ScriptInstance+0x10)
  133. local ScriptNamePtr = readPointer(Script+0x250)
  134. local szScriptName = readString(ScriptNamePtr+0xC,99,true)
  135.  
  136. --Node = owner of the scriptinstance
  137. --OOP : Object -&gt; Node -&gt; (Canvas/Node2D/Node3D) -&gt; xxx(e.g Label1)
  138.  
  139.  
  140. local Node = readPointer(ScriptInstance+0x8)
  141. local NodeName = readPointer(Node+0x120) -- NameString
  142. local NodeNamePtr = readPointer(NodeName +0x10)
  143.  
  144. --a Node is like a GameObject(Unity) or Actor(Unreal)
  145. --the node name is the name that is used from the dev to name the object
  146. --in the editor
  147.  
  148. local szNodeName = readString(NodeNamePtr,99,true)
  149.  
  150. local Infos = string.format("%s(%s)",szNodeName,szScriptName)
  151.  
  152. local OwnerRec = addList.createMemoryRecord()
  153. OwnerRec.setDescription(szNodeName)
  154. OwnerRec.setAddress(0)
  155. OwnerRec.setType(8)
  156. OwnerRec.DontSave=true
  157. OwnerRec.appendToEntry(GenRec)
  158.  
  159. -- currently only transform support for sprites
  160. -- todo:
  161. -- add transform support for StaticBody2D and KinematicBody2D
  162. -- +3D types
  163.  
  164. local Class = executeCodeEx(0, nil,getAddress("GetClassName"),Node)
  165. if (Class &gt; 0) then
  166. Class = readPointer(Class)
  167. Class = readPointer(Class+0x10)
  168. local ClassName = readString(Class,99,true)
  169. if (ClassName == "Sprite") then
  170. local newRec = addList.createMemoryRecord()
  171. newRec.setDescription("Transform Position X")
  172. newRec.setAddress(Node+0x288)
  173. newRec.setType(4)
  174. newRec.DontSave=true
  175. newRec.appendToEntry(OwnerRec)
  176.  
  177. local newRec = addList.createMemoryRecord()
  178. newRec.setDescription("Transform Position Y")
  179. newRec.setAddress(Node+0x288+0x4)
  180. newRec.setType(4)
  181. newRec.DontSave=true
  182. newRec.appendToEntry(OwnerRec)
  183.  
  184. local newRec = addList.createMemoryRecord()
  185. newRec.setDescription("Transform Rotation")
  186. newRec.setAddress(Node+0x288+0x8)
  187. newRec.setType(4)
  188. newRec.DontSave=true
  189. newRec.appendToEntry(OwnerRec)
  190.  
  191. local newRec = addList.createMemoryRecord()
  192. newRec.setDescription("Transform Scale X")
  193. newRec.setAddress(Node+0x288+0xC)
  194. newRec.setType(4)
  195. newRec.DontSave=true
  196. newRec.appendToEntry(OwnerRec)
  197.  
  198. local newRec = addList.createMemoryRecord()
  199. newRec.SetDescription("Transform Scale Y")
  200. newRec.setAddress(Node+0x288+0x10)
  201. newRec.setType(4)
  202. newRec.DontSave=true
  203. newRec.appendToEntry(OwnerRec)
  204. end
  205. end
  206.  
  207. for n=0,Vars do
  208. local Type = readInteger(Variants)
  209. local CEType = GetCEType(Type)
  210.  
  211. local Ptr = Variants+0x8
  212.  
  213. if (Type == 4 ) then -- if string
  214. Ptr=readPointer(Ptr) --read ptr to wchars
  215. end
  216.  
  217. if (Type == 5 ) then -- if vector2
  218. --X
  219. local VecInfo = string.format("Vec2.x(%s)",szScriptName)
  220. local newRec = addList.createMemoryRecord()
  221. newRec.setDescription(VecInfo)
  222. newRec.setAddress(Ptr)
  223. newRec.setType(CEType)
  224. newRec.DontSave=true
  225. newRec.appendToEntry(OwnerRec)
  226. --Y
  227. local VecInfo = string.format("Vec2.y(%s)",szScriptName)
  228. local newRec = addList.createMemoryRecord()
  229. newRec.setDescription(VecInfo)
  230. newRec.setAddress(Ptr+0x4)
  231. newRec.setType(CEType)
  232. newRec.DontSave=true
  233. newRec.appendToEntry(OwnerRec)
  234. else
  235. local newRec = addList.createMemoryRecord()
  236. newRec.setDescription("Variable("..szScriptName..")")
  237. newRec.setAddress(Ptr)
  238. newRec.setType(CEType)
  239. newRec.DontSave=true
  240. newRec.appendToEntry(OwnerRec)
  241. end
  242.  
  243. Variants=Variants+0x18
  244. end
  245.  
  246. i=i+1
  247. end
  248.  
  249.  
  250. [DISABLE]
  251. local Generated = addList.getMemoryRecordByDescription("Generated:")
  252.  
  253. if Generated ~= nil then
  254. while Generated.Count &gt; 0 do
  255. Generated.Child[0]:Delete()
  256. end
  257. Generated:Delete()
  258. end
  259. </AssemblerScript>
  260. </CheatEntry>
  261. </CheatEntries>
  262. </CheatEntry>
  263. </CheatEntries>
  264. </CheatTable>
  265.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement