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 


hooking?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
kitesan
Expert Cheater
Reputation: 0

Joined: 01 May 2014
Posts: 124

PostPosted: Mon Dec 28, 2015 3:43 pm    Post subject: hooking? Reply with quote

what does it mean to hook game's api?
how do i learn it?
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Mon Dec 28, 2015 8:58 pm    Post subject: Reply with quote

An API (Application Programming Interface) is a function that a .dll or .exe publishes so that other dlls/exes can use it. When a function is "published" (the exact term is "exported") then it appears in the list in CE's memory viewer->view->enumerate dll and symbols.

To explain hooking, let's take the example of a big company that has a mailbox ("exported symbol/name" in a program) for each service, like purchases, investor relationships, accounting, customer service, etc... (functions for a program).
Hooking the accounting service is like removing the "accounting" sticker on the accounting service's mailbox and putting it on yours. When their mail arrives in your mailbox, you take it, read it, optionally tweak it, put it back in an envelope and drop it in the real accounting box. That's hooking.

How to do it? memory viewer->tools->auto assemble->template->any of the injection templates. Yes this is what they actually do, except that they do not always hook at the beginning of a function like in my example but somewhere in the middle.
As for the "api hook" template, it just removes the sticker for the original maibox and puts it somewhere, you have to make sure that this somewhere corresponds to your/a mailbox.

_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
kitesan
Expert Cheater
Reputation: 0

Joined: 01 May 2014
Posts: 124

PostPosted: Mon Dec 28, 2015 11:00 pm    Post subject: Reply with quote

thank you infinitely , extremely clear. do you know if this technique is also used for calling game's functions in game ? for example if i want to spawn a creature , i must call the game function that does that...
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Tue Dec 29, 2015 3:17 am    Post subject: Reply with quote

In a normal game, nothing is hooked. Hooking is typically used when you want to alter the behavior of another program, one that you did not write. For example hooking is used by AVs, malwares, DRMs, cracking tools, anticheats, cheats, and some mods. Overlays (like steam in-game) and directx manipulation tools (dxwnd and the likes) are also hooking some directx related functions.

If I wanted to make a hack that spawns a monsters I'd probably use hooking. It is likely that the mob spawner will want a pointer to an entity manager or an entity list so I'd hook a function that accesses it and call the spawner from my hook.
Or I could also hook the mob spawner itself so that each time it spawns something it also spawns my mob.

_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
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