Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
FrostBite hacking programming reversing
You are Unregistered, please register to gain Full access.
Since the server leak happened it has become apparent to me that EASTL is vital to anybodies hook.
EASTL is the "Electronic Arts Standard Template Library", which replaces the need in most cases to use the STL (Standard Template Library), which you might know from types such as "std::string", "std::vector" or "std::list" which you might remember from BF2 actually.
Anyway here is my EASTL Source code as of June 22nd, 2010.
PHP Code:
#ifndef __EASTL_HEADER__ #define __EASTL_HEADER__
#include <string>
// This is an EASTL reconstruction attempt by s0beit // EASTL is the "EA Standard Template Library" which was created by EA as an optimized form of STL // www.thisgamesux.net // www.uc-forum.com // www.guidtech.net
namespace eastl { // If you make a class with no members and no virtuals, only static functions // the size of the class is 0x1, one byte, The more you know * // each class we make below will have its own allocators // strictly because it is not realistic to actually reconstruct the allocator // considering the allocators are static functions in the game module which proceed to jump around // and it gets quite complex.
class allocator { public: __forceinline allocator(){} __forceinline allocator( eastl::allocator *__formal ){} __forceinline void set_name( const char *__formal ){} __forceinline const char* get_name(){ return "EASTL"; } __forceinline void* allocate( unsigned int n, int flags ){ return malloc( n ); } __forceinline void deallocate( void *p, unsigned int __formal ){ free( p ); } };
// Aligned buffer is a buffer of bytes the size of "num", and is aligned by the second parameter // for example if "align" was two, it would probably contain a 2-byte value like a short // for example if "align" was four, it would probably contain a 4-byte value like long, int or a pointer // it is unknown what it is used for beyond... nothing, lol
template< size_t num, size_t align > class aligned_buffer { public: unsigned char buffer[ num ]; //0000 };
__forceinline bool operator == ( VectorBase & From ) { return compare( From ); }
// This will check if the VectorBase is EXACTLY equal to the current __forceinline bool compare_precise( VectorBase & From ) { return ( mpBegin == From.mpBegin && mpEnd == From.mpEnd && mpCapacity == From.mpCapacity ); }
// This will check if the VectorBase members are all equal to the current __forceinline bool compare( VectorBase & From ) { size_t len_1 = length(); size_t len_2 = From.length();
if( len_1 != len_2 ) { return false; }
for( size_t i = 0; i < len_1; i++ ) { if( From.at( i ) != at( i ) ) { return false; } }
for( size_t l = 0; l < length(); l++ ) { ret += at( l ); }
return ret; } }; };
#endif
===== FAQ =====
Q: Hey, this looks a lot like mattdog's ID_LIST A: Yeah, ID_LIST was really VectorBase but he did not documented them in the proper alignment and he did not add the amount of support i have added (and in proper format)
Q: what about <x>? A: Some EASTL classes are missing or incomplete in this reverse-engineered release
Q: Can you add <x>? A: Maybe, tell me what you need.
Q: This is crashing, how do i fix it? A: Make a reply here and i will try to see what you did wrong.
Q: Can i call the deconstructor on strings or other EASTL objects the game created? A: NO. EASTL natively has an allocator which handles allocation and deallocation of objects like VectorBase and basic_string, if you try to "delete" it i don't see how the game could survive and would probably crash.
Q: Who do i thank??? A: s0beit, Kanavel, GHOSTER, mattdog and domo (leaked the server files)
notes: fixed_vector might be off in size because it seems the size of any given fixed_vector (with a template) can vary in size.
Please keep this in mind when reversing classes.
yep..
it can be vec in some struct aligned to 8 bytes - it happens if struct contains any double var (8b long ofc)
EA just didnt touch compiler settings to set alignment mode
so i added 4rd dword to my id_list struct to have 16b size
Once again... Thank you to s0beit, Kanavel, GHOSTER, mattdog and domo!
Outstanding contribution(s), which I hope to put back into this community once I've completed my own project.
P.S: I'm sorry for the resurrection, but I thought this thread should be commended some more!!!
Yet, I still didn't get it to compile though (error C2894: templates cannot be declared to have 'C' linkage).
This was before none of it was public I believe..
__________________ Cal Hockley: Where are you going? To him? To be a whore to a gutter rat? Rose: I'd rather be his whore than your wife.
----------------------------------------------------- Georg Henrik von Wright: If one is satisfied with things, one doesn't complain about the downsides that exist, either.
Quote:
Winslow: Hanoi, your 'english' is not understandable
Quote:
AdilAA: not sure if i should release my incomplete BF P4F Hack with non-working toggles
Roverturbo: Hanoi22 is just a bitch, and it's hard to please bitches unless you let them get their own way.
Style by lowHertz.
Nope it was released in the Sims 3 EA WebKit from March/April 2010 already (maybe even earlier).
But yeah, might have not been that much of an interest what EA did on their GPL page. :-)