View previous topic :: View next topic |
Author |
Message |
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Sat Sep 21, 2019 1:27 am Post subject: How to get DBVM/DBK to work on 32-Bit VM OS |
|
|
So, I'm working with a game that I can only write to while DBK is active. Cheat Engine scripts work perfectly fine on my native OS on 64-bit with DBK working as well. However, I needed to test to see if the scrpts I made in CE work on 32-bit. Only problem is I don't have a 32-bit machine lying around and I can't seem to get anyone to test my stuff for me, so I had to rely on using a Virtual Machine. My Real Machine is on Windows 10 (64-bit) and my VM is on Windows 10 (32-bit). Cheat Engine says my virtual machine doesn't support DBVM, even though it works fine on my real machine. How do I fix this? By the way, this is what I'm using to attempt to load DBK:
Code: |
dbk_initialize()
openProcess([[cheatengine-x86_64.exe]])
reinitializeSymbolhandler()
autoAssemble([[
alloc(NewVirtualProtectEx,256, VirtualProtectEx )
alloc(OriginalVirtualProtectEx, 8, VirtualProtectEx)
registersymbol(NewVirtualProtectEx)
registersymbol(OriginalVirtualProtectEx)
label(notself)
NewVirtualProtectEx:
cmp ecx,ffffffff
jne short notself
jmp [OriginalVirtualProtectEx]
notself:
xor rax,rax
ret
]])
s=generateAPIHookScript("VirtualProtectEx", "NewVirtualProtectEx", "OriginalVirtualProtectEx")
--stupid bug in generateAPIHookScript forgets the alloc originalcall0
s=[[alloc(originalcall0, 64, VirtualProtectEx)
]]..s
autoAssemble(s)
dbk_useKernelmodeOpenProcess()
dbk_useKernelmodeProcessMemoryAccess()
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sat Sep 21, 2019 2:58 am Post subject: |
|
|
What is the problem you're having? What isn't working? (Do you use DBVM and if so for that?)
As for your script it looks like it's using 64-bit calling conventions instead of 32-bit, and you're opening the 64-bit CE exe which obviously isn't running
And it's easier to go to settings->general and tick the "Never change memory protection when editing" option
_________________
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 |
|
|
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Sat Sep 21, 2019 4:53 am Post subject: |
|
|
Basically, it's the same issue I had here a while back, plus trying to work in a 32-Bit Virtual Machine.
https://forum.cheatengine.org/viewtopic.php?t=594110&sid=8f8dbd89316653f9a2792c030638f951
I made a trainer that woraked to hack Pokemon XD Gale of Darkness for 64-bit operating systems a long time ago. Now I've tried porting it to a 32-bit OS. No one has volunteered to test it for me after asking, so I decided to try things out on my own. I've downloaded both VMWare and VirtualBox and have ran a Windows 10 32-bit image. Cheat Engine says DBVM is not supported on the virtual machine in the about area (but says it is supported on my non-virtual machine on the same computer). Essentially, every time my tool writes to the Dolphin process, all the game addresses relocate. The solution, as you mentioned last time, was loading DBVM and including kernel tools in the trainer.
As you said, the script I used was incorrect for 32-bit systems. What is the correct script for 32-bit systems, then? And on top of that, do you know of any modern virtual machine that supports DBVM so I can test the program afterwards on a 32-bit image? Bochs wasn't working for me.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sat Sep 21, 2019 5:34 am Post subject: |
|
|
I don't mention DBVM anywhere, just DBK
Anyhow, have you tried the more recent version with the "Never change memory protection when editing"
What happens when that is checked ? Because that assembler code can go
_________________
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 |
|
|
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Sat Sep 21, 2019 3:18 pm Post subject: |
|
|
I just tried it and it appears to work. The first few times my VM said something about a video feature needing to be enabled and then it crashed shortly after writing to a value. However, after tinkering around with some settings in Dolphin and the VM, it appears to be able to write values without them relocating or crashing the VM now. How would I go about enabling the "Never change memory protection when editing" setting in a Standalone Cheat Engine Trainer (.EXE)?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sat Sep 21, 2019 3:46 pm Post subject: |
|
|
Have you tried without that setting? It may not even be needed
As for trainer if it is still needed, you have to use getSettings and then change the registry setting in ce followed by reloadSettingsFromRegistry()
(currently not at my desk so can't tell you the exact settingsname, but do check if it is needed)
_________________
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 |
|
|
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Sat Sep 21, 2019 4:50 pm Post subject: |
|
|
I just tried it on both my host machine and my virtual machine. I tested this with the setting off on 7.0 and apparently, it doesn't seem to be needed at all. Executing a writeBytes function in Cheat Engine 6.5.1 (the one I used to compile my earlier trainers) causes the memory to reallocate, but executing the same function in Cheat Engine 7.0 works just fine. 7.0 must've fixed something that was wrong in 6.5.1. I shouldn't even need anything extra like DBK or DBVM now. Thanks.
|
|
Back to top |
|
|
|