View previous topic :: View next topic |
Author |
Message |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Jun 05, 2015 9:16 pm Post subject: Witcher 3 Console Plug-in |
|
|
Before we get started: Yes, I am asking for help trying to use someone else's code.
But, he has provided the source code and his plug-in has stopped working.
https://github.com/gamebooster/witcher3-booster
I am trying to figure out specifically where this code is injecting the hook.
Code: | game_hook = new utils::VtableHook(*global_game);
game_hook->HookMethod(OnViewportInputDebugAlwaysHook, 128); |
Variable global_game is defined as:
Code: | global_game = hook::pattern("48 8B 05 ? ? ? ? 48 8D 4C 24 ? C6 44 24").count(1).get(0).extract<CGame**>(3); |
The code at that array of bytes is:
Code: | global_game - 48 8B 05 9031EA01 - mov rax,[witcher3.exe+29A0540] |
So, I believe global_game is to contain the same value at witcher3.exe+29A0540.
However, neither that address nor the pointer address are the game's instructions.
So I'm lost as to where the hook in the first code block above is actually pointing.
|
|
Back to top |
|
 |
Tiffany Cheater
Reputation: 0
Joined: 14 Jan 2015 Posts: 38
|
Posted: Fri Jun 05, 2015 9:28 pm Post subject: |
|
|
His mod used a dsound.dll and a debug-console-enabler.dll so if you're only looking at one of those perhaps it's in the other?
edit: This is the source for the hook: https://github.com/gamebooster/dll-plugins-loader
|
|
Back to top |
|
 |
ubiByte Advanced Cheater
Reputation: 1
Joined: 08 Mar 2013 Posts: 57
|
Posted: Fri Jun 05, 2015 9:54 pm Post subject: Re: Witcher 3 Console Plug-in |
|
|
Zanzer wrote: | Before we get started: Yes, I am asking for help trying to use someone else's code.
But, he has provided the source code and his plug-in has stopped working.
https://github.com/gamebooster/witcher3-booster
I am trying to figure out specifically where this code is injecting the hook.
Code: | game_hook = new utils::VtableHook(*global_game);
game_hook->HookMethod(OnViewportInputDebugAlwaysHook, 128); |
Variable global_game is defined as:
Code: | global_game = hook::pattern("48 8B 05 ? ? ? ? 48 8D 4C 24 ? C6 44 24").count(1).get(0).extract<CGame**>(3); |
The code at that array of bytes is:
Code: | global_game - 48 8B 05 9031EA01 - mov rax,[witcher3.exe+29A0540] |
So, I believe global_game is to contain the same value at witcher3.exe+29A0540.
However, neither that address nor the pointer address are the game's instructions.
So I'm lost as to where the hook in the first code block above is actually pointing. |
Yea I was looking into this as well but I believe with the patch the array of bytes no longer point to the same location that's just my guess, this is the array he used in his code:
Code: | global_game = hook::pattern("48 8B 05 ? ? ? ? 48 8D 4C 24 ? C6 44 24").count(1).get(0).extract<CGame**>(3);
global_debug_console = hook::pattern("48 89 05 ? ? ? ? EB 07 48 89 35 ? ? ? ? 48 8B 47 60").count(1).get(0).extract<void**>(3); |
global_debug_console may not be pointing anywhere anymore but it's just a guess.
|
|
Back to top |
|
 |
Tiffany Cheater
Reputation: 0
Joined: 14 Jan 2015 Posts: 38
|
Posted: Fri Jun 05, 2015 10:01 pm Post subject: Re: Witcher 3 Console Plug-in |
|
|
ubiByte wrote: | global_debug_console may not be pointing anywhere anymore but it's just a guess. |
That would be a really dick move if they did that...
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Jun 05, 2015 10:08 pm Post subject: |
|
|
All of the AOBs still work fine and appear to be the correct place.
I think they might have just updated the vtable which caused the plug-in to hook into the wrong function.
I'm not that familiar with the whole vtable concept and I'm having difficulties following the code.
I believe the following code is what's broken.
Code: | game_hook = new utils::VtableHook(*global_game);
game_hook->HookMethod(OnViewportInputDebugAlwaysHook, 128); |
I think 128 is no longer the correct index for the keyboard input method.
I just have no clue how that hook logic operated in the first place to find the method myself.
|
|
Back to top |
|
 |
ubiByte Advanced Cheater
Reputation: 1
Joined: 08 Mar 2013 Posts: 57
|
Posted: Fri Jun 05, 2015 10:18 pm Post subject: |
|
|
Does the console actually hook at all for you? Your post under the witcher 3 table was saying you had the console open if that's the case it's hooking into the game. In my case, it doesn't even load the dll at all
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Jun 05, 2015 10:26 pm Post subject: |
|
|
No, I used his AOB's and searched around the game code.
To display the console, create a byte pointer for [witcher3.exe+2990C38]+85 and set the value to 1.
To input keys to the console, create a 4-byte pointer for [witcher3.exe+2990C38]+60.
Enter an input key code to insert that key into the console.
Set it to 0 (null) to stop entering a key.
Set it to 13 (return) to submit the console command.
To get capital letters, create a 1-byte pointer for [witcher3.exe+2990C38]+86 and set the value to 1.
I'd prefer to actually hook into the keyboard method so I can simply type the command like before.
Last edited by Zanzer on Fri Jun 05, 2015 10:28 pm; edited 2 times in total |
|
Back to top |
|
 |
ubiByte Advanced Cheater
Reputation: 1
Joined: 08 Mar 2013 Posts: 57
|
Posted: Fri Jun 05, 2015 10:27 pm Post subject: |
|
|
ohh okay I see what you're saying. I'm looking through this trying to figure it out I'll post something here if I can get it to work.
I was going to use cheat engine for now to type commands but it's impossible lol once input keycode is entered it keeps repeating it
|
|
Back to top |
|
 |
Sarcen How do I cheat?
Reputation: 0
Joined: 07 Jul 2013 Posts: 2
|
Posted: Sat Jun 06, 2015 9:46 am Post subject: |
|
|
Zanzer wrote: | I think 128 is no longer the correct index for the keyboard input method.
|
Well you were right, after some trial and error (1 attempt lol, changed it to 129) I recompiled it and my debugger console dll works again. Guess they added another virtual function so it shifted one spot.
|
|
Back to top |
|
 |
Tiffany Cheater
Reputation: 0
Joined: 14 Jan 2015 Posts: 38
|
Posted: Sat Jun 06, 2015 9:59 am Post subject: |
|
|
Sarcen wrote: | Zanzer wrote: | I think 128 is no longer the correct index for the keyboard input method.
|
Well you were right, after some trial and error (1 attempt lol, changed it to 129) I recompiled it and my debugger console dll works again. Guess they added another virtual function so it shifted one spot. |
Holy crap, you fixed it? Can you upload it somewhere?
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Jun 06, 2015 10:07 am Post subject: |
|
|
I guess I should've tried that, LOL. Yep, it's working now.
|
|
Back to top |
|
 |
illob How do I cheat?
Reputation: 0
Joined: 06 Jun 2015 Posts: 1
|
Posted: Sat Jun 06, 2015 10:13 am Post subject: |
|
|
i have no clue about all these things, but i used the info above, compiled and uploaded it, thanks to the guys who did the actual work
https://mega.nz/#!zlsW2CLC!Ov8TUIczXlA9ofDdAAuaHiSTpaczb-xbs76EUSjw9yg
sorry, can't post url tags. copy and paste is your friend.
|
|
Back to top |
|
 |
Valyngar How do I cheat?
Reputation: 0
Joined: 06 Jun 2015 Posts: 1
|
Posted: Sat Jun 06, 2015 4:53 pm Post subject: |
|
|
illob wrote: | i have no clue about all these things, but i used the info above, compiled and uploaded it, thanks to the guys who did the actual work
https://mega.nz/#!zlsW2CLC!Ov8TUIczXlA9ofDdAAuaHiSTpaczb-xbs76EUSjw9yg
sorry, can't post url tags. copy and paste is your friend. |
Posted your mod to witcher3 nexus mod site, gave you the credit hope you don't mind sharing.
Valyngar
|
|
Back to top |
|
 |
|