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 


What the hell am I doing wrong here?

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

Joined: 12 May 2007
Posts: 620
Location: Israel - CEF

PostPosted: Fri Nov 14, 2008 2:09 pm    Post subject: What the hell am I doing wrong here? Reply with quote

Hello everybody.

I am trying to make a DLL for Crysis, for infinite Ammo...

I found out that 3913B117 is "mov [eax+14], edx".

by changing this to nop [0x90] the ammo becomes infinite.

that's what I've made so far (after i searched the forum abit), It still doesn't work, it has no effect...

Code:

#include <Windows.h>

BOOL lQuit = false;
DWORD val;

void FreezeAmmo()
{
   while(!lQuit)
   {
      *(char*)0x3913B117 = val;
      *(char*)0x3913B118 = val;
      *(char*)0x3913B119 = val;
      Sleep(5);
   }
}

BOOLEAN
WINAPI
DllMain(
    HINSTANCE hDllHandle,
   HMODULE     hModule,
    DWORD     nReason,   
    LPVOID    Reserved   
)
{
   switch ( nReason )
   {
   case DLL_PROCESS_ATTACH:
      DisableThreadLibraryCalls( hModule );
      val = 0x90;
      CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)FreezeAmmo, NULL, 0, 0 );
      return TRUE;
   case DLL_PROCESS_DETACH:
      lQuit = true;
      return TRUE;
   }
   return TRUE;

}



*code example is welcomed too!*

if you know why, please tell me.

Thanks from advance!
Back to top
View user's profile Send private message
Psy
Grandmaster Cheater Supreme
Reputation: 1

Joined: 27 Mar 2008
Posts: 1366

PostPosted: Fri Nov 14, 2008 2:18 pm    Post subject: Reply with quote

This may not be a direct solution to your problem or that code, however, all Crytek games 'code-shift'. The module (crygame.dll in this case) gets rellocated.

A lot of the time with SP games, codeshifting only takes effect when comparing seperate PC's. Once installed and running the game usually maps its modules into the same memory spaces, however in my experience the Crysis games like to do it after restarts.

This might be something to do with it, I, your offset for ammo is no longer the right one. Kind of like a glorified DMA really for all intents and purposes. Might want to check that out before tearing up your work.

~Psy
Back to top
View user's profile Send private message
Endlesskiss
Grandmaster Cheater
Reputation: 0

Joined: 12 May 2007
Posts: 620
Location: Israel - CEF

PostPosted: Fri Nov 14, 2008 2:30 pm    Post subject: Reply with quote

I restarted the game + my computer, 0x3913B117 is still "mov [eax+14], edx".

anyway, I used Step 6 to get the "static" address (its not the static address, but by changing that to nop we will solve the problem).


I also tried to scan and then change those addresses in the DLL _WITHOUT_ closing the game, and failed.

Do you have any code that will solve the problem, or do you think I should do also Step 7 in CE?

Thanks again, and sorry for my bad english.

EDIT:

Ok, I found out that 0x3928B5CC with offset 198 points to the ammo address.


How can I do 0x3928B5CC+198 if i have an Injected DLL? *(unsigned char*)0x3928B5CC+0x198 = 0x90; doesn't seems to compile... Sad


any ideas?
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