

![]() |
![]() |
|
|||||||
![]() |
![]() |
| Reverse Engineering Game hacking discussion and open source development. |
![]() |
|
|
LinkBack | Thread Tools |
![]() |
![]() |
|
|
#1 (permalink) | |
|
A God Among Men
![]() ![]() ![]() ![]() Disciple Join Date: May 2007
Posts: 423
![]() |
Since no one posted an update to this yet :p.
This works by checking the opcode of a game class that is null unless you are inside a game. Code:
Warcraft_CheckGameState proc
;//Game state checking function
.data
FXN_GameClass dd 6FAA1988h
.code
;//Move GameClass into EAX
mov eax, FXN_GameClass
;//Check to see if we're in a game and return true/false.
.if byte ptr [eax] == 0h
mov eax, 0
.else
mov eax, 1
.endif
ret
Warcraft_CheckGameState endp
__________________
Quote:
|
|
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#2 (permalink) |
|
Mortal
Join Date: Jul 2008
Posts: 3
![]() |
I think it's not exactly a class, but the address of a global variable inside Game.dll's .data section which points to the address of the first member of a dynamically allocated structure.
Last edited by Epsilon : 07-21-2008 at 03:22 PM. |
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#4 (permalink) | |
|
A God Among Men
![]() ![]() ![]() ![]() Disciple Join Date: May 2007
Posts: 423
![]() |
I have never used auto-it or any other cheap shot easy-make programs, but I'm sure if auto-it can read the process memory it shouldn't be a problem.
__________________
Quote:
|
|
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#6 (permalink) | |
|
A God Among Men
![]() ![]() ![]() ![]() Disciple Join Date: May 2007
Posts: 423
![]() |
ignore all that and just read the memory for offset 6FAA1988 and if its 00h it means no game is active.
__________________
Quote:
|
|
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#11 (permalink) | ||
![]() ![]() ![]() Blessed |
Quote:
__________________
Ultimate Guide/Resource/Tutorial/Book Thread
Technobabble! - My Blog About All Things Technological Quote:
|
||
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#13 (permalink) | |
![]() ![]() ![]() Blessed |
You're wrong. Think about it. The code reads a value from a given address, which is always going to be a one or zero. This is traditionally called a boolean. And while a boolean could be fit into a single bit, bytes are the smallest common data unit, and it is more likely that Blizzard's developers simply used either C++'s intrinsic "bool" type, or C's "BOOL" typedef, both of which resolves to bytes. Therefore, an address that points to this byte, must therefore be a byte pointer. As a matter of fact, if you read the code, the address is placed in EAX, and then the code treats EAX as a byte pointer. Ipso facto, it's a byte pointer. While we're on the subject...
Code:
bool AreYouInGame() {
return (*(BYTE*)(0x6FAA1988));
}
__________________
Ultimate Guide/Resource/Tutorial/Book Thread
Technobabble! - My Blog About All Things Technological Quote:
Last edited by Dyndrilliac : 07-24-2008 at 04:06 PM. |
|
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#14 (permalink) | |
|
Gold Member
![]() ![]() Deviant Join Date: Nov 2007
Posts: 73
![]() |
Quote:
I understand your logic, but I reversed those parts of Warcraft's game code myself and it's not a boolean. Of course, you can still apply boolean logic to it :p Although, it could be that we'r talking about different topics, are you refering to Rufus' code or to the actual data? Last edited by zev : 07-24-2008 at 04:09 PM. |
|
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#15 (permalink) | |
![]() ![]() ![]() Blessed |
...
Ok, I don't know how else to say this. What the **** do you think NULL is? It's a constant for zero. If a piece of data can only be a one or a zero, it is a boolean. Not a pointer to the instance of a class. Do you know why? Because if it were a pointer to the instance of a class, checking for one would not work. The data would be the address at memory where the instance of the class is located, and thus the gamestate check function that was posted would fail.
__________________
Ultimate Guide/Resource/Tutorial/Book Thread
Technobabble! - My Blog About All Things Technological Quote:
|
|
|
|
|
![]() |
![]() |
![]() |
![]() |
|
|
#16 (permalink) | |
|
Gold Member
![]() ![]() Deviant Join Date: Nov 2007
Posts: 73
![]() |
Quote:
Not in game: ![]() In game: ![]() Just because you can apply boolean logic to it, doesn't mean that it was implemented as a boolean by the Blizzard programmer. The code posted in this thread doesn't check for one either, it checks for 0. ( It could be heavily improved by using boolean logic, though ) Last edited by zev : 07-24-2008 at 04:39 PM. |
|
|
|
|
![]() |
![]() |