| 
			
				|  | Cheat Engine The Official Site of Cheat Engine
 
 
 |  
 
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| Brookthesoul How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 03 Sep 2019
 Posts: 8
 
 
 | 
			
				|  Posted: Thu Jun 05, 2025 10:52 pm    Post subject: Change register at this location (DBVM) & Lua |   |  
				| 
 |  
				| hi, can anyone help me with changing register like RAX and CF flag like in the picture using Lua? i used to do it manually 
 open memory viewer->go to address->right click->Change register at this location->check the "Use DBVM Cloaked BP's" and change the register of RAX(or others) and set flag CF(PF or others)->click ok button.
 
 and the address will highlight with green like breakpoint is set and the bytes changes to green.
 
 i open the CE help-> Lua documentation and found few line of code i think like
 
 dbvm_cloak_activate(physicalbase, virtualbase OPTIONAL):
 
 dbvm_cloak_deactivate(physicalbase):
 
 dbvm_cloak_readOriginal(physicalbase):
 
 dbvm_cloak_writeOriginal(physicalbase, bytetable[4096]):
 
 dbvm_changeregonbp(physicaladdress, changereginfo, virtualaddress OPTIONAL): boolean
 sets a breakpoint at the given position. When a breakpoint hits the registers will be changed according to the changereginfo table
 changereginfo table:  (set the field to nil, or don't define it, if you don't want to change it)
 newCF: integer/boolean (false=0, true=1)
 newPF: integer/boolean (false=0, true=1)
 newAF: integer/boolean (false=0, true=1)
 newZF: integer/boolean (false=0, true=1)
 newSF: integer/boolean (false=0, true=1)
 newOF: integer/boolean (false=0, true=1)
 newRAX: integer
 newRBX: integer
 newRCX: integer
 newRDX: integer
 newRSI: integer
 newRDI: integer
 newRBP: integer
 newRSP: integer
 newRIP: integer
 newR8:  integer
 newR9:  integer
 newR10: integer
 newR11: integer
 newR12: integer
 newR13: integer
 newR14: integer
 newR15: integer
 
 dbvm_removechangeregonbp(physicaladdress) : Disables the changeregonbp breakpoint
 
 
 i dont know how to apply it or use it.
 whre can i find this physicalbase and physicaladdress
 can anyone help me code this so i can active and deactivate by the cheat table please.
 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 14.37 KB |  
		| Viewed: | 2141 Time(s) |  
		| 
  
 
 |  
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 70 KB |  
		| Viewed: | 2141 Time(s) |  
		| 
  
 
 |  
 |  |  
		| Back to top |  |  
		|  |  
		| Dark Byte Site Admin
 
  Reputation: 470 
 Joined: 09 May 2003
 Posts: 25807
 Location: The netherlands
 
 | 
			
				|  Posted: Fri Jun 06, 2025 1:33 pm    Post subject: |   |  
				| 
 |  
				| go to the address in the hexview part and it'll show you the physical address (or use dbk_getPhysicalAddress(address)) 
 
 then
 dbvm_changeregonbp(physicalAddress, {newRCX=300, newCF=1})
 
 or if you want to show the region is cloaked:
 dbvm_changeregonbp(physicalAddress, {newRCX=300, newCF=1}, virtualAddress)
 
 virtualAddress would be something like the address of notepad.exe+7
 _________________
 
 Do not ask me about online cheats. I don't know any and wont help finding them.
 Like my help? Join me on Patreon so i can keep helping
 |  |  
		| Back to top |  |  
		|  |  
		| Brookthesoul How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 03 Sep 2019
 Posts: 8
 
 
 | 
			
				|  Posted: Fri Jun 06, 2025 8:37 pm    Post subject: |   |  
				| 
 |  
				|  	  | Dark Byte wrote: |  	  | go to the address in the hexview part and it'll show you the physical address (or use dbk_getPhysicalAddress(address)) 
 
 then
 dbvm_changeregonbp(physicalAddress, {newRCX=300, newCF=1})
 
 or if you want to show the region is cloaked:
 dbvm_changeregonbp(physicalAddress, {newRCX=300, newCF=1}, virtualAddress)
 
 virtualAddress would be something like the address of notepad.exe+7
 | 
 
 so i try do the script in auto assemble but i got an error. am i doing it wrong?
 
 
  	  | Code: |  	  | [ENABLE]
 {$lua}
 dbvm_changeregonbp(1BD59B007, {newRCX=300, }, NOTEPAD.EXE+7)
 
 [DISABLE]
 dbvm_removechangeregonbp(1BD59B007, {newRCX=300, }, NOTEPAD.EXE+7)
 
 | 
 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 15.85 KB |  
		| Viewed: | 1950 Time(s) |  
		| 
  
 
 |  
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 5.68 KB |  
		| Viewed: | 1950 Time(s) |  
		| 
  
 
 |  
 |  |  
		| Back to top |  |  
		|  |  
		| Dark Byte Site Admin
 
  Reputation: 470 
 Joined: 09 May 2003
 Posts: 25807
 Location: The netherlands
 
 | 
			
				|  Posted: Sun Jun 08, 2025 3:19 am    Post subject: |   |  
				| 
 |  
				| hexadecimal numbers start with 0x 
 also you need to use getAddress to get the address of notepad.exe+7
 _________________
 
 Do not ask me about online cheats. I don't know any and wont help finding them.
 Like my help? Join me on Patreon so i can keep helping
 |  |  
		| Back to top |  |  
		|  |  
		| Brookthesoul How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 03 Sep 2019
 Posts: 8
 
 
 | 
			
				|  Posted: Sun Jun 08, 2025 6:14 am    Post subject: |   |  
				| 
 |  
				|  	  | Dark Byte wrote: |  	  | hexadecimal numbers start with 0x 
 also you need to use getAddress to get the address of notepad.exe+7
 | 
 
 
 This is what i found when i search for lua getAddress.
 
 
  	  | Code: |  	  | function getAddress(AddressString, local OPTIONAL) : integer | 
 
 Is this how you code it? i try it but it give me an error so can you show me how should i use the code please?
 
 
  	  | Code: |  	  | [ENABLE]
 {$lua}
 getAddress(NOTEPAD.EXE+7)
 dbvm_changeregonbp(0xD77D0A7, {newRCX=300})
 
 {$asm}
 [DISABLE]
 {$lua}
 dbvm_removechangeregonbp(0xD77D0A7, {newRCX=300})
 
 
 | 
 
 ok i try do some serach and i found string need to put between ("text") and it didn't give any error but how do get that address?
 
 sorry, i edit this a few times. now i found how to make the value appeared by using the print(string.format()) and i manage to get the value by defining it
 
 
  	  | Code: |  	  | [ENABLE]
 {$lua}
 dbvm_changeregonbp(0x225956007, {newRCX=300}, 0x7FF66A7B0007)
 {$asm}
 //a=dbk_getPhysicalAddress("NOTEPAD.EXE+7") code for finding physical Address
 //b=getAddress("NOTEPAD.EXE+7") code for finding Address
 //print(string.format(a, b)) code to show the address in hex
 [DISABLE]
 {$lua}
 dbvm_removechangeregonbp(0x225956007, {newRCX=300}, 0x7FF66A7B0007)
 
 | 
 
 Thank you for your guidance and time, and sorry for my slow brain. but if the code above isn't good i am humbly asking for your guidance again. thanks again.
 
 edit again:
 
 I just discovered that you don't need to use the print code. just use the variable that already define
  i'm so dumb. 
 
  	  | Code: |  	  | dbvm_changeregonbp(a, {newRCX=300}, b)
 
 | 
 |  |  
		| Back to top |  |  
		|  |  
		|  |  
  
	| 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 You cannot attach files in this forum
 You can download files in this forum
 
 |  |