Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need help calling an imported function from within the DLL.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
gir489
Grandmaster Cheater
Reputation: 13

Joined: 03 Jan 2012
Posts: 789
Location: Maryland, United States

PostPosted: Fri Jan 19, 2018 1:22 pm    Post subject: Need help calling an imported function from within the DLL. Reply with quote

So, I'm trying to call GetKeyState inside the DLL, since it's part of the import address table at FC3_d3d11.dll+1AA43DD.

I assembled a CALL ds:11AA43DD instruction with IDA's assembler, and it looks fine, but when I load it up with Cheat Engine, it gets a random offset each time.

I noticed that other locations that call it, usually have FF 15 00000000, with the 4 0s populated by the location of the IAT function during instantiation. FF 15 is a call exact.

So how can I get my injected code cave to update the address when the DLL is loaded? I'm basically doing this so I don't have to load Cheat Engine every time I play FC3, because I just want my code to be there already when I start the game.

_________________
I post the cheat tables I make for myself for the single player games I play. If you have an issue with one of my tables, and it isn't GODMODE PLSKTHX, you should PM me instead of replying to the thread.

DISCOBAN
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 9

Joined: 01 Feb 2016
Posts: 867

PostPosted: Fri Jan 19, 2018 2:40 pm    Post subject: Reply with quote

the offset you patched using ida was the raw offset (probably), not the virtual offset. (there is different types of offsets)

about injecting you code cave to be there forever .. im not sure if CE is the best tool to do it.

but you can open the executable as a file using CE, and allocate memory there.

note:
im not sure whats wrong with CE when opening a file, seems it cant search for the given pattern of bytes.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
patched cheat engine tutorials
Memory Hacker
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites