Skip to content

Commit

Permalink
add enableKernelSymbols and document the dbvm_speedhack_setSpeed and …
Browse files Browse the repository at this point in the history
…dbvm_setTSCAdjust
  • Loading branch information
cheat-engine committed Jul 9, 2019
1 parent 0202511 commit 9a66390
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Cheat Engine/LuaHandler.pas
Original file line number Diff line number Diff line change
Expand Up @@ -11244,6 +11244,13 @@ function lua_enableWindowsSymbols(L: PLua_state): integer; cdecl;
result:=0;
end;

function lua_enableKernelSymbols(L: PLua_state): integer; cdecl;
begin
symhandler.kernelsymbols:=true;
MemoryBrowser.Kernelmodesymbols1.checked:=true;
symhandler.reinitialize(true);
end;

function lua_enumExports(L: PLua_state): integer; cdecl;
var
address: ptruint;
Expand Down Expand Up @@ -11999,6 +12006,8 @@ procedure InitializeLua;
lua_register(L, 'getHotkeyHandlerThread', lua_getHotkeyHandlerThread);
lua_register(L, 'enumMemoryRegions', lua_enumMemoryRegions);
lua_register(L, 'enableWindowsSymbols', lua_enableWindowsSymbols);
lua_register(L, 'enableKernelSymbols', lua_enableKernelSymbols);

lua_register(L, 'compareMemory', lua_compareMemory);

lua_register(L, 'enumExports', lua_enumExports);
Expand Down
4 changes: 3 additions & 1 deletion Cheat Engine/bin/celua.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ getFileVersion(pathtofile): returns the 64-bit file version, and a table that ha
getFileList(Path:string, searchMask:string OPTIONAL, SearchSubDirs: boolean OPTIONAL, DirAttrib: integer OPTIONAL): Returns an indexed table with filenames
getDirectoryList(Path:string, SearchSubDirs: boolean OPTIONAL): Returns an indexed table with directory names


enableWindowsSymbols(): Will download the PDB files of Windows and load them (Takes a long time the first time)
getAddress(string, local OPTIONAL): returns the address of a symbol. Can be a modulename or an export. set Local to true if you wish to querry the symboltable of the ce process
enableKernelSymbols(): Will check the option for kernelmode symbols in memory view (Gets only the exports unless enableWindowsSymbols() is used)
getAddressSafe(string, local OPTIONAL): returns the address of a symbol, or nil if not found. Similar to getAddress when errorOnLookup is false, but returns nil instead
getSymbolInfo(symbolname): Returns a table as defined by the SymbolList class object (modulename, searchkey, address, size)
getModuleSize(modulename): Returns the size of a given module (Use getAddress to get the base address)
Expand Down Expand Up @@ -2514,6 +2514,8 @@ dbvm_changeregonbp(physicaladdress, changereginfo, virtualaddress OPTIONAL): boo
dbvm_log_cr3_start() : Tells DBVM to record (up to 512) unique CR3 values it encounters
dbvm_log_cr3_stop() : Stops the logging and returns the results as a table

dbvm_speedhack_setSpeed(speed): Changes the speed the timestamp counter goes up (similar to speedhack in a process but affects the whole system including the clock)
dbvm_setTSCAdjust(enabled, timeout): If enabled (default true with timeout 2000) will return a small(20-30) timestamp between multiple rdtsc/rdtscp instructions. The timeout is the number of actual TSC to watch else the actual time is given. A high timeout can make your system unstable

dbk_getCR0(): Returns Control Register 0
dbk_getCR3(): Returns Control Register 3 of the currently opened process
Expand Down

0 comments on commit 9a66390

Please sign in to comment.