This repository was archived by the owner on Jul 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhops.CT
More file actions
83 lines (76 loc) · 2.45 KB
/
hops.CT
File metadata and controls
83 lines (76 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="42">
<CheatEntries>
<CheatEntry>
<ID>0</ID>
<Description>"Dump"</Description>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
{$lua}
--https://forum.cheatengine.org/viewtopic.php?p=5747559#5747559
function AOBScanAA(script, symbol)
local success,disableInfo = autoAssemble(script)
if not success then return nil, disableInfo end -- disableInfo is error message on failure
local addr = getAddress(symbol)
autoAssemble(script, disableInfo) -- disable script and unregister symbol
return addr, 'success'
end
function AOBScanModule(bytestr, module)
local script = ([[
aobscanmodule(luaAOBScanModuleSymbol,%s,%s)
registersymbol(luaAOBScanModuleSymbol)
unregistersymbol(luaAOBScanModuleSymbol)
]]):format(module, bytestr)
return AOBScanAA(script,'luaAOBScanModuleSymbol')
end
function getmetadatasize()
local gamepath = extractFilePath(enumModules()[1].PathToFile)
local gamedata = getFileList(gamepath,"global-metadata.dat" ,true)
local gamedatapath = gamedata[1]
print(gamedatapath)
local f = io.open(gamedatapath, 'rb');
if f == nil then
print("can't find metadata")
return 0
end
local size = f:seek('end')
f:close();
return size
end
function dumpmetadata()
-- 48 89 ? ? ? ? ? 48 89 ? ? ? ? ? 48 8B ? ? ? ? ? 48 63
local addr = AOBScanModule('48 89 05 * * * * 48 89 05 * * * * 48 8B 05 * * * * 48 63 48', "GameAssembly.dll")
if addr then
local hexaddr = ('%X'):format(addr);
local dism = createDisassembler()
dism.disassemble(hexaddr)
local metadatamem = dism.decodeLastParametersToString()
local str = string.format('%s', metadatamem);
local addrmetadata = string.sub(str, 2 ,string.len(str)-1)
print(string.format('global-metadata.dat 0x%s',addrmetadata) )
local datasize = getmetadatasize()
if datasize ~= 0 then
local gamepath = extractFilePath(enumModules()[1].PathToFile)
writeRegionToFile(string.format("%s\\global-metadata.dat",gamepath),addrmetadata,datasize)
shellExecute(gamepath)
end
else
print('Cant Find AOB ;c')
end
end
if process ~= nil then
dumpmetadata()
else
print("Attach ce to game!")
end
{$asm}
[DISABLE]
// https://github.com/Japrajah/HiredOps-SDK
</AssemblerScript>
</CheatEntry>
</CheatEntries>
<UserdefinedSymbols/>
<LuaScript>
</LuaScript>
</CheatTable>