Post: BF3 Reversal
06-25-2017, 08:51 PM #1
OG Trojan041
Little One
(adsbygoogle = window.adsbygoogle || []).push({}); Hey NGU, small project I started working on. If anyone is interested just post your finding in this thread!
Button Monitoring
    
#define FBButtons 0x1740000
#define Up IsDown(0x00000001)
#define Down IsDown(0x0000002)
#define Left IsDown(0x00000004)
#define Right IsDown(0x0000000Cool Man (aka Tustin)
#define Cross IsDown(0x00000020)
#define Square IsDown(0x00000040)
#define Circle IsDown(0x00000080)
#define Triangle IsDown(0x00000010)
#define L1 IsDown(0x00010000)
#define L2 IsDown(0x00004000)
#define L3 IsDown(0x00000400)
#define R1 IsDown(0x00020000)
#define R2 IsDown(0x00008000)
#define R3 IsDown(0x000000800)
#define Select IsDown(0x00002000)
#define sStart IsDown(0x00001000)

bool IsDown(int Button)
{
int ptr = *(int*)(FBButtons + 0x220c);
return (*(int*)(*(int*)(ptr + 0x10) + 0xc) & Button);
}


Structures
    class ClientPlayer;
class ClientControllableEntity;
class ClientCharacterEntity;
class ClientSoldierEntity;
class ClientScoreManager;
class ClientSoldierWeaponsComponent;
class WeaponHandler;
class ClientSoldierWeapon;
class ClientWeapon;
class WeaponFiringData;
class WeaponModifier;
class FiringFunctionData;
class WeaponFiring;
class AmmoConfigData;
class WeaponSway;
class N030EFF29;
class N0310FB7F;
class ClientSoldierBodyComponent;
class ClientBoneCollisionComponent;
class IClientSoldierHealthModule;


#define fbClientGameContext 0x17BCD30

class ClientDamageGiverInfo
{
const class ClientPlayer * m_damageGiver; // this+0x0
void* m_weaponUnlockAsset; // this+0x4
}; // fb::ClientDamageGiverInfo

class ClientDamageInfo
{

Vector3 m_position; // this+0x0
Vector3 m_direction; // this+0x10
Vector3 m_origin; // this+0x20
float m_damage; // this+0x30
float m_distributeDamageOverTime; // this+0x34
unsigned int m_boneIndex; // this+0x38
unsigned int m_hitDirection; // this+0x3C
bool m_isBulletDamage; // this+0x40, len(0x1)

}; // fb::ClientDamageInfo

class ClientGameContext
{
public:
char _0x0000[48];
PlayerManager* m_PlayerManager; //0x0030
OnlineManager* m_OnlineManager; //0x0034
char _0x0038[4];
ClientScoreManager* m_ScoreManager; //0x003C

static ClientGameContext* GetInstance()
{
return *(ClientGameContext**)(fbClientGameContext);
}

};//Size=0x0040

class PlayerManager
{
public:
char _0x0000[188];
ClientPlayer* m_LocalPlayer; //0x00BC
ClientPlayer** m_Players; //0x00C0
char _0x00C4[52];

};//Size=0x00F8

class OnlineManager
{
public:
char _0x0000[64];

};//Size=0x0040

class ClientPlayer
{
public:
virtual void function0();
virtual int* getSoldier();//
virtual int * getEntry(); //
virtual bool isInVehicle(); //
virtual int getId(); //
virtual bool isUnlocked(const class UnlockAssetBase *); //

char _0x0004[36];
char m_Name[16]; //0x0028
char _0x0038[740];
int m_TeamID; //0x031C
char _0x0320[160];
ClientSoldierEntity** m_soldier; // 0x3C0
ClientSoldierEntity* m_corpse; // 0x3C4
ClientCharacterEntity** m_character; // 0x3C8
int m_weakTokenHolder; // 0x3CC
ClientSoldierEntity* m_attachedControllable; // 0x3D0
int m_attachedEntryId; // 0x3D4
ClientSoldierEntity* m_controlledControllable; // 0x3D8
int m_controlledEntryId; //0x03DC
char _0x03E0[1120];

};//Size=0x0840

class ClientControllableEntity
{
public:
char _0x0000[720];
Vector3 m_Coords; //0x02D0
char _0x02DC[356];

};//Size=0x0440

class ClientCharacterEntity
{
public:
char _0x0000[64];

};//Size=0x0040

class ClientSoldierWeapon
{
public:
char _0x0000[340];
ClientWeapon* m_pClientWeapon; //0x0154
int m_replicatedFiring; //0x0158
int m_correctionCallbackHandler; //0x015C
WeaponFiring* m_predictedFiring; //0x0160
WeaponFiring* m_correctedFiring; //0x0164
char _0x0168[660];

};//Size=0x03FC

class ClientSoldierEntity
{
public:
virtual float yaw();
virtual float pitch();
virtual bool isVisible();
virtual bool isAlive();
virtual bool isDead();
virtual bool isDying();
virtual float getHealth();
virtual float maxeHealth();
virtual bool isAIPlayer();
virtual bool isSingleplayer();
virtual void getPhysicsInfoForAnimation(int, int)
virtual bool isInVehicle();
virtual int* physics();
virtual int pose();
virtual int activeView();

char _0x0004[808];
int m_isUnspawning; //0x032C
float m_effectVolumeAccumulated; //0x0330
IClientSoldierHealthModule** m_IClientSoldierHealthModule; //0x0334
float m_deathTimer; //0x0338
ClientSoldierWeaponsComponent* m_soldierWeaponsComponent; //0x033C
ClientSoldierBodyComponent* m_ClientSoldierBodyComponent; //0x0340
ClientBoneCollisionComponent* m_ClientBoneCollisionComponent; //0x0344
char _0x0348[264];
N0310FB7F* N01EC7EBE; //0x0450
char _0x0454[1004];

};//Size=0x0840

class ClientScoreManager
{
public:
char _0x0000[64];

};//Size=0x0040

class ClientSoldierWeaponsComponent
{
public:

class WeaponHandler
{
public:
ClientSoldierWeapon* WeaponList[7];
};

enum WeaponList
{
PRIMARY = 0,
Secondary = 1,
GADGET = 2,
GRENADE = 6,
KNIFE = 7,
};

char _0x0000[188];
WeaponHandler* m_weapons; //0x00BC
char _0x00C0[208];
WeaponList m_CurrentWeapon; //0x0190
char _0x0194[812];

};//Size=0x04C0

class ClientWeapon
{
public:
char _0x0000[4];
int m_Data; //0x0004
char _0x0008[4];
WeaponFiringData* m_firingData; //0x000C
WeaponModifier* m_weaponModifier; //0x0010
char _0x0014[12];
Vector3 m_moveSpeed; //0x0020
char _0x002C[4];
Matrix m_shootSpace; //0x0030
char _0x0070[1024];

};//Size=0x0470

class WeaponFiringData
{
public:
char _0x0000[8];
FiringFunctionData* m_primaryFire; //0x0008
char _0x000C[52];

};//Size=0x0040

class WeaponModifier
{
public:
char _0x0000[64];

};//Size=0x0040

class FiringFunctionData
{
public:
char _0x0000[64];

};//Size=0x0040

class WeaponFiring
{
public:
char _0x0000[148];
WeaponFiringData* m_data; //0x0094
AmmoConfigData* m_ammoData; //0x0098
int m_firingHolderData; //0x009C
WeaponSway* m_weaponSway; //0x00A0
char _0x00A4[24];
float N020E0061; //0x00BC
float N020E0062; //0x00C0
float N020E0063; //0x00C4
float N020E0064; //0x00C8
float N020E0065; //0x00CC
float N020E0066; //0x00D0
float N020E0067; //0x00D4
float N020E0068; //0x00D8
float N020E0069; //0x00DC
float N020E006A; //0x00E0
float N020E006B; //0x00E4
float N020E006C; //0x00E8
float m_overheatDropMultiplier; //0x00EC
int m_primaryAmmoToFill; //0x00F0
char _0x00F4[4];
int m_externalPrimaryMagazineCapacity; //0x00F8
char _0x00FC[836];
};//Size=0x0440

class AmmoConfigData
{
public:
int m_magazineCapacity; //0x0000
int m_numberOfMagazines; //0x0004
int m_traceFrequency; //0x0008
int m_ammoPickupMinAmount; //0x000C
int m_ammoPickupMaxAmount; //0x0010
float m_autoReplenishDelay; //0x0014
char _0x0018[40];

};//Size=0x0040

class WeaponSway
{
public:
char _0x0000[64];

};//Size=0x0040


ClientPlayer* GetClientPlayer(unsigned int index)
{
ClientGameContext* GameContext = ClientGameContext::GetInstance();
if (GameContext == 0)
return NULL;

PlayerManager* m_PlayerManager = GameContext->m_PlayerManager;
if (m_PlayerManager == 0)
return NULL;

return m_PlayerManager->m_Players[index];
}

ClientPlayer* GetLocalPlayer()
{
ClientGameContext* GameContext = ClientGameContext::GetInstance();
if (GameContext == 0)
return NULL;

PlayerManager* m_PlayerManager = GameContext->m_PlayerManager;
if (m_PlayerManager == 0)
return NULL;

return m_PlayerManager->m_LocalPlayer;
}


I will not be including my Matrix class but it can easily be recreated by looking at the D3D Matrix!

The following 5 users say thank you to OG Trojan041 for this useful post:

CanadianOnCFW, Father Luckeyy, mohamdps1, NELUxP, th3_goodGuy
06-26-2017, 01:19 AM #2
th3_goodGuy
I am error
I still don't know how button monitoring works ?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo