unknowncheats uc-forum.com ucdownloads ucdownloads.com

Go Back   UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials > First-Person Shooters > Battlefield Series > Battlefield Heroes

- Sponsored Advertisement -
http://www.myfpscheats.com/


Reply
 
Thread Tools Display Modes
  #1  
Old 02-26-2010, 06:52 PM
Freaky123 Freaky123 is offline
Junior Member
 
Join Date: Feb 2010
Posts: 14
Default Portable way to get classmanager

I don't like static offsets and with patches coming for BF2 and BF2142 I have been looking at my code to see how I can head off any work they may create. With my ClassManager offset being hardcoded I decided to make this little function to get a pointer to the ClassManager from RendDX9.dll.

Tested on BF2 1.41 and BF2142 v1.50 and BFH

Put this in header file
Code:
// Tested on BF2(1.41) and BF2142(1.50)
#define PATT_CLASSMANAGER "\x89\x35\x99\x99\x99\x99\xFF\x15\x99\x99\x99\x99\x8B\x0D\x99\x99\x99\x99\x8B\x01"
#define MASK_CLASSMANAGER "xx????xx????xx????xx"

CClassManager* getBFClassManager(void);
Code:
CClassManager* getBFClassManager(void)
{

    HMODULE hModule = NULL;

    while (hModule==NULL)
    {
        hModule = GetModuleHandle("RendDx9.dll");
        if (hModule == NULL) Sleep(200);
    }

    DWORD dwInitDLL = (DWORD)GetProcAddress(hModule, "initDll");
    CloseHandle(hModule);

    if (dwInitDLL)
    {
        DWORD dwPointerOffset = FindPattern(dwInitDLL, dwInitDLL + 512, (BYTE*)PATT_CLASSMANAGER, MASK_CLASSMANAGER);
        if (dwPointerOffset)
        {
            DWORD* ptr = (DWORD*)(dwPointerOffset + 2);
            return *((CClassManager**)((DWORD)*ptr));
        }
    }

    return 0;

}
You will need Strife's FindPattern function, scroll to end and get the updated version.
UnKnoWnCheaTs - Multiplayer Game Hacking and Cheats

Credits:
Me for being lazy
Strife for his FindPattern function
Patrick@GD for initDll idea

Author: zoomgod
Link to thread...
Reply With Quote
  #2  
Old 03-19-2010, 03:28 AM
sergcool sergcool is offline
Junior Member
 
Join Date: Mar 2010
Posts: 1
Default

I tried to insert the header but i get error...

i started learning C++ and got stuck, mayb a little tutorial how to get from A to B with this code?
Reply With Quote
Reply

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit

Tags
classmanager, portable

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:49 PM.