Advertisement
tcyknhrabirwjyljhp

Untitled

Apr 11th, 2022
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.23 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <CheatTable>
  3. <CheatEntries>
  4. <CheatEntry>
  5. <ID>92236</ID>
  6. <Description>"Enable"</Description>
  7. <LastState Activated="1"/>
  8. <VariableType>Auto Assembler Script</VariableType>
  9. <AssemblerScript Async="1">{ Game : domeromantik.exe
  10. Version:
  11. Date : 2022-04-11
  12. Author : cfe
  13.  
  14. This script does blah blah blah
  15. }
  16.  
  17. [ENABLE]
  18.  
  19. aobscanmodule(aobGetViewport,domeromantik.exe,48 8B 01 48 89 CB 41 89 D4 FF) // should be unique
  20. alloc(newmem,$1000,aobGetViewport)
  21.  
  22. label(code)
  23. label(return)
  24. label(pViewport)
  25. registersymbol(pViewport)
  26. label(Skip)
  27.  
  28. newmem:
  29.  
  30. code:
  31. push rax
  32. cmp qword ptr[pViewport],0
  33. jne Skip
  34. mov rax,[rcx+138]
  35. test rax,rax
  36. je Skip
  37. mov [pViewport],rax
  38. Skip:
  39. pop rax
  40. mov rax,[rcx]
  41. mov rbx,rcx
  42. jmp return
  43. pViewport:
  44. dq 0
  45.  
  46. aobGetViewport:
  47. jmp newmem
  48. nop
  49. return:
  50. registersymbol(aobGetViewport)
  51.  
  52. //////
  53.  
  54.  
  55. alloc(GetClassName,$1000,$process)
  56. registersymbol(GetClassName)
  57.  
  58. GetClassName:
  59. push rbx
  60. sub rsp,40
  61. mov rax,[rcx]
  62. call qword ptr[rax+30] // object::_get_class_namev
  63. add rsp,40
  64. pop rbx
  65. ret
  66.  
  67.  
  68.  
  69. [DISABLE]
  70.  
  71. aobGetViewport:
  72. db 48 8B 01 48 89 CB
  73.  
  74. dealloc(newmem)
  75. dealloc(GetClassName)
  76. unregistersymbol(*)
  77.  
  78. </AssemblerScript>
  79. <CheatEntries>
  80. <CheatEntry>
  81. <ID>92237</ID>
  82. <Description>"Activate Dev Mode"</Description>
  83. <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
  84. <LastState/>
  85. <Color>FF8000</Color>
  86. <VariableType>Auto Assembler Script</VariableType>
  87. <AssemblerScript>{$lua}
  88.  
  89. if syntaxcheck then return end
  90. function ReadNameString(ptr)
  91. local Name = readPointer(ptr)
  92. Name = readPointer(Name+0x10)
  93. return readString(Name,99,true)
  94. end
  95.  
  96. function MemRec(Name,Ptr,CEType,Owner)
  97. local newRec = addList.createMemoryRecord()
  98. newRec.setDescription(Name)
  99. newRec.setAddress(Ptr)
  100. newRec.setType(CEType)
  101. newRec.DontSave=true
  102. newRec.appendToEntry(Owner)
  103. end
  104.  
  105. function GetCEType(gType)
  106. if (gType == 1) then return 0 end --bool
  107. if (gType == 3) then return 5 end --a float is a double in godot
  108. if (gType == 5) then return 4 end --vector2 is a x,y float in godot
  109. if (gType == 4) then return 7 end --(unicode)string
  110. if (gType == 18) then return 3 end --node pointer
  111. return 2 --integer
  112. end
  113.  
  114. --GDScript
  115. function ReadName(member,index)
  116. if index == readInteger(member+0x38) then
  117. local NameString = readPointer(member+0x30)
  118. NameString = readPointer(NameString+0x10)
  119. local str = readString(NameString,99,true)
  120. return str
  121. end
  122. local NextMap = readPointer(member+0x20)
  123. if NextMap == 0 then return "null" end
  124. local retstr = ReadName(NextMap,index)
  125. return retstr
  126. end
  127.  
  128. --Visual Script
  129. function ReadNameVariant(member,mi)
  130. local NameString = readPointer(member+0x30)
  131. NameString = readPointer(NameString+0x10)
  132. local szName = readString(NameString,99,true)
  133. local Info = {}
  134. Info.Name = szName
  135. Info.Type = readInteger(member+0x38)
  136. Info.Ptr = member+0x40
  137. table.insert(mi,Info)
  138. local NextMap = readPointer(member+0x20)
  139. if NextMap == 0 then return MemberInfo end
  140. ReadNameVariant(NextMap,mi)
  141. end
  142.  
  143. function Transform(Node,NameRec)
  144. local Class = executeCodeEx(0,nil, getAddress("GetClassName"),Node)
  145. if Class == 0 or nil then return end
  146.  
  147. Class = ReadNameString(Class)
  148. if Class == "Sprite" then
  149. local SpriteTransform = Node + 0x288
  150. MemRec("Transform X",SpriteTransform,4,NameRec)
  151. MemRec("Transform Y",SpriteTransform+0x4,4,NameRec)
  152. MemRec("Transform Rotation(Radiants)",SpriteTransform+0x8,4,NameRec)
  153. MemRec("Transform Scale X",SpriteTransform+0xC,4,NameRec)
  154. MemRec("Transform Scale Y",SpriteTransform+0x10,4,NameRec)
  155. end
  156. if (Class == "Kinematic2D") then
  157. ---....
  158. end
  159. end
  160.  
  161. function FindNode(vp,str)
  162. local Childs = readPointer(vp+CONST_CHILDREN)
  163. if Childs == 0 then return 0 end
  164. local Size = readInteger(Childs-4)
  165.  
  166. for i=0,(Size-1) do
  167. local Node = readPointer(Childs+i*8)
  168. local NameString = readPointer(Node+CONST_NAMESTRING)
  169. NameString = readPointer(NameString+0x10)
  170. local szName = readString(NameString,99,true)
  171. if szName == str then return Node end
  172. local ret = FindNode(Node,str)
  173. if ret &gt; 0 then return ret end
  174. end
  175.  
  176. return 0
  177. end
  178.  
  179. function FindNodeWithScriptInstance(vp,str)
  180. local Childs = readPointer(vp+CONST_CHILDREN)
  181. if Childs == 0 then return 0 end
  182. local Size = readInteger(Childs-4)
  183. if Size == 0 or Size == nil then return 0 end
  184.  
  185. for i=0,(Size-1) do
  186. local Node = readPointer(Childs+i*8)
  187. if Node == 0 then return 0 end
  188. local NameString = readPointer(Node+CONST_NAMESTRING)
  189. if NameString == 0 or NameString == nil then return 0 end
  190. NameString = readPointer(NameString+0x10)
  191. local szName = readString(NameString,99,true)
  192. if szName == str and readQword(Node+CONST_SCRIPTINSTANCE) &gt; 0 then return Node end
  193. local ret = FindNodeWithScriptInstance(Node,str)
  194. if ret &gt; 0 and readQword(ret+CONST_SCRIPTINSTANCE) &gt; 0 then return ret end
  195. end
  196.  
  197. return 0
  198. end
  199.  
  200. function FindNodesWithScript(vp,str,array)
  201. local Childs = readPointer(vp+CONST_CHILDREN)
  202. if Childs == 0 then return 0 end
  203. local Size = readInteger(Childs-4)
  204.  
  205. for i=0,(Size-1) do
  206. local Node = readPointer(Childs+i*8)
  207. local NameString = readPointer(Node+CONST_NAMESTRING)
  208. if NameString == 0 then return 0 end
  209. NameString = readPointer(NameString+0x10)
  210. local szName = readString(NameString,99,true)
  211. if szName ~= nil and string.match(szName,str) and readQword(Node+CONST_SCRIPTINSTANCE) &gt; 0 then
  212. table.insert(array,Node)
  213. end
  214. FindNodesWithScript(Node,str,array)
  215. end
  216.  
  217. return array
  218. end
  219.  
  220. function FindNodeByScriptType(vp,stype)
  221. local Childs = readPointer(vp+CONST_CHILDREN)
  222. if Childs == 0 then return 0 end
  223. local Size = readInteger(Childs-4)
  224.  
  225. for i=0,(Size-1) do
  226. local Node = readPointer(Childs+i*8)
  227. if Node == 0 then return 0 end
  228. local Script = readPointer(Node+0x60)
  229. if Script &gt; 0 and Script ~= nil then
  230. local ResourcePtr = readPointer(Script+CONST_SCRIPT)
  231. if ResourcePtr &gt; 0 and ResourcePtr ~= nil then
  232. local name = readString(ResourcePtr,99,true)
  233. if string.match(name,stype) then return Node end
  234. end
  235. end
  236. local ret = FindNodeByScriptType(Node,stype)
  237. if ret &gt; 0 then return ret end
  238. end
  239.  
  240. return 0
  241.  
  242. end
  243.  
  244. function DebugDumpNodes(vp,bscript)
  245. local Childs = readPointer(vp+CONST_CHILDREN)
  246. if Childs == 0 then return 0 end
  247. local Size = readInteger(Childs-4)
  248.  
  249. for i=0,(Size-1) do
  250. local Node = readPointer(Childs+i*8)
  251. local NameString = readPointer(Node+CONST_NAMESTRING)
  252. NameString = readPointer(NameString+0x10)
  253. local szName = readString(NameString,99,true)
  254. if not bscript then
  255. print(string.format("%s : %X",szName,Node))
  256. else
  257. local Script = readPointer(Node+0x60)
  258. local ScriptName = "nil"
  259. if Script &gt; 0 and Script ~= nil then
  260. local Script = readPointer(Script+CONST_SCRIPT)
  261. if Script &gt; 0 and Script ~= nil then ScriptName = readString(Script,99,true) end
  262. end
  263. if (readQword(Node+CONST_SCRIPTINSTANCE) &gt; 0 ) then print(string.format("%s : %X (%s)",szName,Node,ScriptName)) end
  264. end
  265. DebugDumpNodes(Node,bscript)
  266. end
  267.  
  268. return 0
  269. end
  270.  
  271. function GenerateClassMember()
  272. addList = getAddressList()
  273. StringSearch = inputQuery( '', 'Node Name:', '' )
  274.  
  275. local vp = getAddress("pViewport")
  276. vp = readPointer(vp)
  277.  
  278. if vp == 0 then print("no viewport") error("") end
  279.  
  280. local Node = FindNodeWithScriptInstance(vp,StringSearch)
  281. if Node == 0 then print("node not found") error("") end
  282. local ScriptInstance = readPointer(Node+CONST_SCRIPTINSTANCE)
  283. local Script = readPointer(ScriptInstance+0x10)
  284.  
  285. local ScriptType = executeCodeEx(0,nil,getAddress("GetClassName"),Script)
  286. if ScriptType == 0 or nil then return end
  287.  
  288. local szScriptType = ReadNameString(ScriptType)
  289.  
  290. local NodeName = readPointer(Node+CONST_NAMESTRING)
  291. NodeName = readPointer(NodeName+0x10)
  292. local szNodeName = readString(NodeName,99,true)
  293.  
  294. local ParentRec = addList.createMemoryRecord()
  295. ParentRec.setDescription("Generated:")
  296. ParentRec.setAddress(0)
  297. ParentRec.setType(8)
  298. ParentRec.DontSave=true
  299.  
  300. local NameRec = addList.createMemoryRecord()
  301. NameRec.setDescription(szNodeName)
  302. NameRec.setAddress(0)
  303. NameRec.setType(8)
  304. NameRec.DontSave=true
  305. NameRec.appendToEntry(ParentRec)
  306.  
  307. if (szScriptType == "GDScript") then
  308. local VectorVariant = readPointer(ScriptInstance+0x20)
  309. local Size = readInteger(VectorVariant-0x4)
  310.  
  311. Transform(Node,NameRec)
  312.  
  313. for i=0,(Size-1) do
  314. local membermap = readPointer(Script+CONST_MEMBERINDICES)
  315. local endmap = readPointer(Script+CONST_MEMBERINDICES+0x8)
  316. local VarName = "null"
  317.  
  318. membermap = readPointer(membermap+0x10)
  319. if (readPointer(membermap+0x10) == endmap) then
  320. VarName = ReadName(membermap,i)
  321. else
  322. while (readPointer(membermap+0x10) ~= endmap) do
  323. membermap = readPointer(membermap+0x10)
  324. end
  325. VarName = ReadName(membermap,i)
  326. end
  327.  
  328. local Type = readInteger(VectorVariant)
  329. local CEType = GetCEType(Type)
  330.  
  331. local Ptr = VectorVariant+0x8
  332.  
  333. if (Type == 4 ) then -- if string
  334. Ptr=readPointer(Ptr) --read ptr to wchars
  335. end
  336.  
  337. if (Type == 5) then -- if vector2
  338. MemRec(string.format("[%x] %s Vec2.x", i,VarName),Ptr,CEType,NameRec)
  339. MemRec(string.format("[%x] %s Vec2.y", i,VarName),Ptr+0x4,CEType,NameRec)
  340. else
  341. MemRec(string.format("[%x] %s", i,VarName),Ptr,CEType,NameRec)
  342. end
  343.  
  344. VectorVariant=VectorVariant+0x18
  345. end
  346.  
  347. return
  348.  
  349. end
  350. --end of "GDSript"
  351.  
  352. if (szScriptType == "VisualScript") then
  353.  
  354. Transform(Node,NameRec)
  355.  
  356. local membermap = readPointer(ScriptInstance+0x18)
  357. local endmap = readPointer(ScriptInstance+0x20)
  358. local MemberInfos = {}
  359.  
  360. membermap = readPointer(membermap+0x10)
  361. if (readPointer(membermap+0x10) == endmap) then
  362. ReadNameVariant(membermap,MemberInfos)
  363. else
  364. while (readPointer(membermap+0x10) ~= endmap) do
  365. membermap = readPointer(membermap+0x10)
  366. end
  367. ReadNameVariant(membermap,MemberInfos)
  368. end
  369.  
  370. for i,v in pairs(MemberInfos) do
  371. local CEType = GetCEType(v.Type)
  372. MemRec(string.format("[%x] %s", i,v.Name),v.Ptr,CEType,NameRec)
  373. end
  374.  
  375. end
  376.  
  377. end
  378.  
  379. [ENABLE]
  380. CONST_CHILDREN = 0x108
  381. CONST_NAMESTRING = 0x120
  382. CONST_SCRIPTINSTANCE = 0x58
  383. CONST_SCRIPT = 0x250
  384. CONST_MEMBERINDICES = 0x1C0
  385.  
  386. local vp = getAddress("pViewport")
  387. vp = readPointer(vp)
  388.  
  389. if vp == 0 then print("error : no viewport") error("no viewport") return end
  390.  
  391. local GameWorld = FindNodeWithScriptInstance(vp,"GameWorld")
  392. if GamewWorld == 0 then print("error: GameWorld not found") error("no gameworld") return end
  393.  
  394. local ScriptInstance = readPointer(GameWorld+0x58)
  395. local VectorVariant = readPointer(ScriptInstance+0x20)
  396. writeBytes(VectorVariant+0x8,1)
  397.  
  398. [DISABLE]
  399.  
  400.  
  401.  
  402. </AssemblerScript>
  403. <CheatEntries>
  404. <CheatEntry>
  405. <ID>92238</ID>
  406. <Description>"Press F1 Ingame To Open"</Description>
  407. <LastState Value="" RealAddress="00000000"/>
  408. <GroupHeader>1</GroupHeader>
  409. </CheatEntry>
  410. </CheatEntries>
  411. </CheatEntry>
  412. </CheatEntries>
  413. </CheatEntry>
  414. </CheatEntries>
  415. </CheatTable>
  416.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement