OldSchoolHack

Registrieren / Anmelden Deutsch

BF4 X86 SDK Demo Project

  • Kategorie: Sourcecode
  • Entwickler:
  • Hochgeladen von: System
  • Hinzugefügt am:
  • System: Windows
Download (18.57 KB)

VirusTotal Ergebnis: 0/57

virustotal

Beschreibung

A small X86 sdk for bf4

Header Files:
CPP Code:
  1. #pragma once
  2.  
  3. #pragma comment(lib, "Winmm.lib" )
  4. #pragma comment(lib, "d3dx9.lib")
  5. #pragma comment(lib,"d3dx10.lib")
  6. #pragma comment(lib, "d3d11.lib")
  7. #pragma comment(lib, "d3dx11.lib")
  8. #pragma comment(lib,"ntdll.lib")
  9.  
  10. #include <windows.h>
  11. #include <TlHelp32.h>
  12. #include <d3d11.h>
  13. #include <d3dx11.h>
  14. #include <d3d9.h>
  15. #include <d3dx9math.h>
  16. #include <d3dx10.h>
  17. #include <intrin.h>
  18. #include <ddraw.h>
  19. #include <iostream>
  20. #include <fstream>
  21. #include <string>
  22. #include <algorithm>
  23. #include <tchar.h>
  24. #include <vector>
  25. #include <strstream>
  26. #include <iomanip>
  27. #include <math.h>
  28. #include <LMCons.h>
  29. #include <process.h> 
  30. #include <time.h>
  31. #include "psapi.h"
  32. #include <tlhelp32.h>
  33. #include <sstream>
  34. #include <Shellapi.h>
  35. #include <tchar.h>
  36. #include <stddef.h>
  37. #include <Vector>
  38. #include <TCHAR.H>
  39.  
  40. #define OFFSET_DEBUGRENDERER     0x009AC160
  41. #define OFFSET_DrawText          0x009AD390
  42. #define OFFSET_DrawLine          0x009ACF30
  43. #define OFFSET_DrawLineRect2D    0x009ACF80
  44. #define OFFSET_DrawRect2D        0x009AD130
  45.  
  46. #define OFFSET_CLIENTGAMECONTEXT 0x02071C30
  47. #define OFFSET_GAMERENDERER      0x020764CC
  48. #define OFFSET_DXRENDERER        0x020E24E0
  49.  
  50. #define OFFSET_SSMODULE          0x020E64EC
  51. #define OFFSET_SYNCEDBFSETTINGS  0x01F96E20
  52.  
  53. #define IsOnDeployScreen *(BYTE*)0x01FCE142
  54.  
  55. namespace fb
  56. {
  57. #pragma region _DebugRenderer
  58.     template< typename T > class Tuple2;
  59.     template <typename T>
  60.     class Tuple2
  61.     {
  62.     public:
  63.         T Element1;
  64.         T Element2;
  65.  
  66.     public:
  67.         Tuple2(T _Element1, T _Element2)
  68.         {
  69.             Element1=_Element1;
  70.             Element2=_Element2;
  71.         }
  72.     };
  73.  
  74.     class Color32
  75.     {
  76.     public:
  77.  
  78.         Color32( D3DCOLOR dwColor )
  79.         {
  80.             this->a = (dwColor >> 24) & 0xff;
  81.             this->r = (dwColor >> 16) & 0xff;
  82.             this->g = (dwColor >> 8) & 0xff;
  83.             this->b = (dwColor) & 0xff;
  84.         }
  85.  
  86.         Color32( unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha ) :
  87.         r( red ), g( green ), b( blue ), a( alpha )
  88.         {
  89.         }
  90.  
  91.         static Color32 Yellow()
  92.         {
  93.             return Color32( 255, 255, 000, 255 );
  94.         }
  95.  
  96.         static Color32 White()
  97.         {
  98.             return Color32( 255, 255, 255, 255 );
  99.         }
  100.  
  101.         static Color32 Black()
  102.         {
  103.             return Color32( 0, 0, 0, 255 );
  104.         }
  105.  
  106.         static Color32 Red()
  107.         {
  108.             return Color32( 255, 0, 0, 255 );
  109.         }
  110.  
  111.         static Color32 Green()
  112.         {
  113.             return Color32( 0, 255, 0, 255 );
  114.         }
  115.  
  116.         static Color32 Blue()
  117.         {
  118.             return Color32( 0, 0, 255, 255 );
  119.         }
  120.  
  121.     private:
  122.         union
  123.         {
  124.             struct
  125.             {
  126.                 unsigned char r;
  127.                 unsigned char g;
  128.                 unsigned char b;
  129.                 unsigned char a;
  130.             };
  131.  
  132.             unsigned long color;
  133.         };
  134.     };
  135. #ifdef OFFSET_DEBUGRENDERER
  136.     class DebugRenderer2
  137.     {
  138.     public:
  139.         static DebugRenderer2* Singleton(void)
  140.         {
  141.             typedef DebugRenderer2* (__stdcall* fb__DebugRenderManager_getThreadContext_t)(void);
  142.             fb__DebugRenderManager_getThreadContext_t fb__DebugRenderManager_getThreadContext=(fb__DebugRenderManager_getThreadContext_t)OFFSET_DEBUGRENDERER;
  143.             return fb__DebugRenderManager_getThreadContext();
  144.         }
  145. #ifdef OFFSET_DrawText
  146.         void drawText(int x, int y, Color32 color, char* text, float scale)
  147.         {
  148.             typedef void (__thiscall *tdrawText)(DebugRenderer2*,int, int, char*, Color32,float);
  149.             tdrawText mdrawText=(tdrawText)OFFSET_DrawText;
  150.             mdrawText(this,x,y,text,color,scale);
  151.         }
  152. #endif
  153.  
  154. #ifdef OFFSET_DrawLine   
  155.         void DrawLine( float x1, float y1, float x2, float y2, Color32 color )
  156.         {
  157.             Tuple2< float > tupFrom =Tuple2< float >( x1, y1 );
  158.             Tuple2< float > tupTo = Tuple2< float >( x2, y2 );
  159.  
  160.             typedef void ( __thiscall* tDrawLine )( DebugRenderer2*, Tuple2< float >*, Tuple2< float >*, Color32 );
  161.             tDrawLine oDrawLine = ( tDrawLine )OFFSET_DrawLine;
  162.  
  163.             oDrawLine( this, &tupFrom, &tupTo, color );
  164.         }
  165.  
  166.         void DrawBox2D(float x1, float y1, float w, float h, Color32 color)
  167.         {
  168.             DrawLine(x1,y1,x1+w,y1,color);
  169.             DrawLine(x1+w,y1,x1+w,y1+h,color);
  170.             DrawLine(x1+w,y1+h,x1,y1+h,color);
  171.             DrawLine(x1,y1+h,x1,y1,color);
  172.         }
  173.  
  174.         void DrawVec3Line(D3DXVECTOR3 start, D3DXVECTOR3 end,Color32 color)
  175.         {
  176.             DrawLine(start.x,start.y,end.x ,end.y,color);
  177.         }
  178.  
  179. #endif
  180.  
  181. #ifdef OFFSET_DrawRect2D
  182.         void DrawRect( float x, float y, float width, float height, Color32 color )
  183.         {
  184.             Tuple2< float > tupMin = Tuple2< float >( x, y );
  185.             Tuple2< float > tupMax = Tuple2< float >( x + width, y + height );
  186.  
  187.             typedef void ( __thiscall* tDrawRectangle )( DebugRenderer2*, Tuple2< float >*, Tuple2< float >*, Color32 );
  188.             tDrawRectangle oDrawRectangle = ( tDrawRectangle )OFFSET_DrawRect2D;
  189.  
  190.             oDrawRectangle( this, &tupMin, &tupMax, color );
  191.         }
  192. #endif
  193.     };
  194. #endif
  195. #pragma endregion _DebugRenderer
  196.  
  197. template< class T > class WeakPtr
  198. {
  199. public:
  200.     T** m_ptr;
  201.  
  202. public:
  203.     T* GetData()
  204.     {
  205.         if (!m_ptr)
  206.             return NULL;
  207.  
  208.         if (!*m_ptr)
  209.             return NULL;
  210.  
  211.         T* ptr = *m_ptr;
  212.  
  213.         return (T*)((DWORD64)ptr - 0x4);
  214.     }
  215. };
  216.  
  217. // Generated using ReClass 2015
  218. class ClientGameContext;
  219. class ClientLevel;
  220. class ClientPlayerManager;
  221. class ClientPlayer;
  222. class AxisAlignedBox;
  223. class CharacterPhysicsEntity;
  224. class ClientSoldierEntity;
  225. class SoldierEntityData;
  226. class BFClientSoldierHealthComponent;
  227. class ClientAntAnimatableComponent;
  228. class ClientSoldierWeaponsComponent;
  229. class ClientAnimatedSoldierWeaponHandler;
  230. class ClientSoldierWeapon;
  231. class SoldierWeaponData;
  232. class ClientWeapon;
  233. class WeaponFiringData;
  234. class ShotConfigData;
  235. class BulletEntityData;
  236. class FiringFunctionData;
  237. class ClientSoldierAimingSimulation;
  238. class SoldierAimingSimulationData;
  239. class AimAssist;
  240. class WeaponFiring;
  241. class WeaponSway;
  242. class ClientVehicleEntity;
  243. class VehicleEntityData;
  244. class VehicleHudData;
  245. class ClientChassisComponent;
  246. class ClientRagDollComponent;
  247. class QuatTransform;
  248. class Deviation;
  249. class SyncedBFSettings;
  250. class GameRenderer;
  251. class RenderView;
  252. class DxRenderer;
  253. class Screen;
  254. class ClientSoldierParachuteComponent;
  255. class ClientSpottingTargetComponent;
  256.  
  257. class ClientGameContext
  258. {
  259. public:
  260.     char pad_0x0000[0x14]; //0x0000
  261.     ClientLevel* m_pClientLevel; //0x0014
  262.     char pad_0x0018[0x18]; //0x0018
  263.     ClientPlayerManager* m_clientPlayerManager; //0x0030
  264. char pad_0x0034[0x3F0]; //0x0034
  265.  
  266.     __forceinline static ClientGameContext* GetInstance()
  267.     {
  268.         return *(ClientGameContext**)(OFFSET_CLIENTGAMECONTEXT);
  269.     }
  270.  
  271. };//Size=0x0424
  272.  
  273. class ClientLevel
  274. {
  275. public:
  276.     char pad_0x0000[0x2C]; //0x0000
  277.     char* m_pLevelName; //0x002C
  278. char pad_0x0030[0x54]; //0x0030
  279.  
  280. };//Size=0x0084
  281.  
  282. class ClientPlayerManager
  283. {
  284. public:
  285.     char pad_0x0000[0x2B8]; //0x0000
  286.     ClientPlayer* m_pLocalPlayer; //0x02B8
  287.     ClientPlayer**    m_ppPlayers; //0x02BC
  288.  
  289. };//Size=0x0098
  290.  
  291. class ClientPlayer
  292. {
  293. public:
  294.     DWORD m_vtable; //0x0000
  295.     char pad_0x0004[0xC]; //0x0004
  296.     char* m_pName; //0x0010
  297.     char pad_0x0014[0x14]; //0x0014
  298.     char m_szName[16]; //0x0028
  299.     char pad_0x0038[0xE1C]; //0x0038
  300.     __int32 m_TeamID; //0x0E54
  301.     char pad_0x0E58[0x88]; //0x0E58
  302.     WeakPtr<ClientSoldierEntity> m_soldier; //0x0EE0
  303.     char pad_0x0EE4[0x4]; //0x0EE4
  304.     ClientVehicleEntity* m_pAttachedControllable; //0x0EE8
  305.     DWORD m_attachedEntryId; //0x0EEC
  306.     ClientSoldierEntity* m_pControlledControllable; //0x0EF0
  307. char pad_0x0EF4[0x2F4]; //0x0EF4
  308.  
  309. };//Size=0x11E8
  310.  
  311. class AxisAlignedBox
  312. {
  313. public:
  314.     D3DXVECTOR4 min; //0x0000
  315.     D3DXVECTOR4 max; //0x0010
  316.  
  317. };//Size=0x0020
  318.  
  319. class QuatTransform
  320. {
  321. public:
  322.     D3DXVECTOR4 m_TransAndScale; //0x0000
  323.     D3DXVECTOR4 m_Rotation; //0x0010
  324.  
  325. };//Size=0x0020
  326.  
  327. enum BONES
  328. {
  329.     BONE_HEAD = 104,
  330.     BONE_NECK = 142,
  331.     BONE_SPINE2 = 7,
  332.     BONE_SPINE1 = 6,
  333.     BONE_SPINE = 5,
  334.     BONE_LEFTSHOULDER = 9,
  335.     BONE_RIGHTSHOULDER = 109,
  336.     BONE_LEFTELBOWROLL = 11,
  337.     BONE_RIGHTELBOWROLL = 111,
  338.     BONE_LEFTHAND = 15,
  339.     BONE_RIGHTHAND = 115,
  340.     BONE_LEFTKNEEROLL = 188,
  341.     BONE_RIGHTKNEEROLL = 197,
  342.     BONE_LEFTFOOT = 184,
  343.     BONE_RIGHTFOOT = 198
  344. };
  345.  
  346. class ClientRagDollComponent
  347. {
  348. public:
  349.     char pad_0x0000[0x4C]; //0x0000
  350.     QuatTransform* m_LocalTransform; //0x004C
  351.     QuatTransform* m_WorldTransform; //0x0050
  352.     char pad_0x0054[0xC]; //0x0054
  353.     QuatTransform* m_ActiveWorldTransforms; //0x0060
  354.     QuatTransform* m_ActiveLocalTransforms; //0x0064
  355.     __int32 m_Slot; //0x0068
  356.     __int32 m_ReaderIndex; //0x006C
  357.     unsigned char m_ValidTransforms; //0x0070
  358.     unsigned char m_PoseUpdateEnabled; //0x0071
  359.     unsigned char m_PoseNeeded; //0x0072
  360.  
  361. };//Size=0x0073
  362.  
  363. class ClientSoldierEntity
  364. {
  365. public:
  366.     virtual void* GetType(); // TypeInfo*
  367.     virtual void Function1(); //
  368.     virtual void Function2(); //
  369.     virtual void Function3(); //
  370.     virtual void Function4(); //
  371.     virtual void Function5(); //
  372.     virtual void Function6(); //
  373.     virtual void Function7(); //
  374.     virtual void Function8(); //
  375.     virtual void Function9(); //
  376.     virtual void Function10(); //
  377.     virtual void Function11(); //
  378.     virtual void Function12(); //
  379.     virtual void Function13(); //
  380.     virtual void Function14(); //
  381.     virtual void Function15(); //
  382.     virtual void Function16(); //
  383.     virtual void Function17(); //
  384.     virtual void Function18(); //
  385.     virtual void Function19(); //
  386.     virtual void Function20(); //
  387.     virtual void Function21(); //
  388.     virtual void Function22(); //
  389.     virtual void GetTransform(D3DXMATRIX& mTransform);// 23
  390.  
  391.     char pad_0x0004[0x14]; //0x0004
  392.     SoldierEntityData* m_pSoldierEntityData; //0x0018
  393.     char pad_0x001C[0x94]; //0x001C
  394.     __int32 m_pClientCharacterSpawnEntity; //0x00B0
  395.     char pad_0x00B4[0x4]; //0x00B4
  396.     BFClientSoldierHealthComponent* m_pBFClientSoldierHealthComponent; //0x00B8
  397.     __int32 m_pBFClientSoldierPhysicsComponent; //0x00BC
  398.     char pad_0x00C0[0x3C]; //0x00C0
  399.     CharacterPhysicsEntity* m_pCharacterPhysicsEntity; //0x00FC
  400.     char pad_0x0100[0x14]; //0x0100
  401.     ClientPlayer* m_pPlayer; //0x0114
  402.     ClientAntAnimatableComponent* m_pClientAntAnimatableComponent[2]; //0x0118
  403.     __int32 m_pVeniceClientSoldierCameraComponent; //0x0120
  404.     char pad_0x0124[0xC]; //0x0124
  405.     __int32 m_pSoldierBlueprint; //0x0130
  406.     char pad_0x0134[0x20]; //0x0134
  407.     __int32 m_pVeniceClientSoldierCameraComponent_; //0x0154
  408.     char pad_0x0158[0x1FC]; //0x0158
  409.     float m_authorativeYaw; //0x0354
  410.     float m_authorativePitch; //0x0358
  411.     char pad_0x035C[0xC]; //0x035C
  412.     __int32 m_poseType; //0x0368
  413.     unsigned char m_EngineChams; //0x036C  set to 4 for engine glowing
  414.     char pad_0x036D[0x5B]; //0x036D
  415.     ClientSoldierWeaponsComponent* m_pClientSoldierWeaponsComponent; //0x03C8
  416.     __int32 m_pClientSoldierBodyComponent; //0x03CC
  417.     ClientRagDollComponent* m_pClientRagdollComponent; //0x03D0
  418.     __int32 m_pClientSoldierBreathControlComponent; //0x03D4
  419.     __int32 m_pClientVehicleEntryListenerComponent; //0x03D8
  420.     char pad_0x03DC[0xC]; //0x03DC
  421.     float m_timeSinceLastSprinted; //0x03E8
  422.     unsigned char m_sprinting; //0x03EC
  423.     unsigned char m_occluded; //0x03ED
  424.     char pad_0x03EE[0x2FE]; //0x03EE
  425.     ClientSoldierParachuteComponent* m_pClientSoldierParachuteComponent; //0x06EC
  426.     char pad_0x06F0[0x3C]; //0x06F0
  427.     __int32 m_pClientPlayerEntryComponent; //0x072C
  428.     char pad_0x0730[0xC]; //0x0730
  429.     __int32 m_pClientSpottingComponent; //0x073C
  430.     char pad_0x0740[0xC]; //0x0740
  431.     ClientSpottingTargetComponent* m_pClientSpottingTargetComponent; //0x074C
  432.  
  433.     bool GetBonePos( int BoneId, D3DXVECTOR3 *vOut );
  434.     ClientSoldierWeapon* GetActiveWeapon();
  435.  
  436. };//Size=0x04B4
  437.  
  438. class SoldierEntityData
  439. {
  440. public:
  441.  
  442. };//Size=0x0000
  443.  
  444. class CharacterPhysicsEntityCollisionShapes
  445. {
  446. public:
  447.     char pad_0x0000[0x10]; //0x0000
  448.     AxisAlignedBox m_Aabbs[3]; //0x0010
  449.  
  450. };//Size=0x0030
  451.  
  452. class CharacterPoseData
  453. {
  454. public:
  455.     char pad_0x0000[0xC]; //0x0000
  456.     float m_StepHeight; //0x000C
  457.     char pad_0x0010[0x4]; //0x0010
  458.     D3DXVECTOR4 m_EyePosition; //0x0014
  459.     D3DXVECTOR4 m_CollisionBoxMaxExpand; //0x0024
  460.     D3DXVECTOR4 m_CollisionBoxMinExpand; //0x0034
  461. char pad_0x0044[0x8]; //0x0044
  462.  
  463. };//Size=0x004C
  464.  
  465. class CharacterPhysicsEntity
  466. {
  467. public:
  468.     char pad_0x0000[0x6C]; //0x0000
  469.     __int32 m_currentPose; //0x006C
  470.     __int32 m_changingToPose; //0x0070
  471.     float m_poseTransitionTimer; //0x0074
  472.     CharacterPhysicsEntityCollisionShapes* m_CollisionShapes; //0x0078
  473.     char pad_0x007C[0x28]; //0x007C
  474.     DWORD m_pCharacterPhysicsData; //0x00A4
  475.     char pad_0x00A8[0x14]; //0x00A8
  476.     CharacterPoseData* m_pCharacterPoseData[3]; //0x00BC
  477.  
  478. };//Size=0x00C8
  479.  
  480.  
  481.  
  482.  
  483. class BFClientSoldierHealthComponent
  484. {
  485. public:
  486.     char pad_0x0000[0x10]; //0x0000
  487.     float m_flHealth; //0x0010
  488.     float m_flMaxHealth; //0x0014
  489. char pad_0x0018[0x4]; //0x0018
  490.  
  491. };//Size=0x001C
  492.  
  493.  
  494. class ClientAntAnimatableComponent
  495. {
  496. public:
  497.  
  498. };//Size=0x0000
  499.  
  500. class ClientSoldierWeaponsComponent
  501. {
  502. public:
  503.     char pad_0x0000[0x8]; //0x0000
  504.     __int32 m_pSoldierWeaponsComponentData; //0x0008
  505.     char pad_0x000C[0x4]; //0x000C
  506.     __int32 m_pClientPlayerEntryComponent; //0x0010
  507.     char pad_0x0014[0x4FC]; //0x0014
  508.     ClientAnimatedSoldierWeaponHandler* m_handler; //0x0510
  509.     char pad_0x0514[0x10]; //0x0514
  510.     ClientAntAnimatableComponent* m_animatableComponent[2]; //0x0524
  511.     ClientSoldierEntity* m_pClientSoldierEntity; //0x052C
  512.     char pad_0x0530[0xE4]; //0x0530
  513.     __int32 m_activeSlot; //0x0614
  514.     __int32 m_lastActiveSlot; //0x0618
  515.     __int32 m_lastActiveWeaponSlot; //0x061C
  516.     char pad_0x0620[0x54]; //0x0620
  517.     __int32 m_currentZoomLevel; //0x0674
  518.     __int32 m_zoomLevelMax; //0x0678
  519.     __int32 m_zeroingDistanceLevel; //0x067C
  520.     char pad_0x0680[0x204]; //0x0680
  521.     float m_timeSinceLastShot; //0x0884
  522. char pad_0x0888[0xC]; //0x0888
  523.  
  524. };//Size=0x0894
  525.  
  526. class ClientAnimatedSoldierWeaponHandler
  527. {
  528. public:
  529.     ClientSoldierWeapon* m_WeaponList[7]; //0x0000
  530.  
  531. };//Size=0x0004
  532.  
  533. class ClientSoldierWeapon
  534. {
  535. public:
  536.     char pad_0x0000[0x18]; //0x0000
  537.     SoldierWeaponData* m_pSoldierWeaponData; //0x0018
  538.     char pad_0x001C[0x24B8]; //0x001C
  539.     ClientSoldierAimingSimulation* m_authorativeAiming; //0x24D4
  540.     char pad_0x24D8[0xC]; //0x24D8
  541.     ClientWeapon* m_pClientWeapon; //0x24E4
  542.     char pad_0x24E8[0x8]; //0x24E8
  543.     WeaponFiring* m_PredictedFiring; //0x24F0
  544.     char pad_0x24F4[0x4]; //0x24F4
  545.     ClientSoldierWeaponsComponent* m_pClientSoldierWeaponsComponent; //0x24F8
  546. char pad_0x24FC[0x10]; //0x24FC
  547.  
  548.     WeaponSway* GetWeaponSway();
  549.     BulletEntityData* GetBulletEntityData();
  550.     FiringFunctionData* GetFiringFunctionData();
  551.  
  552. };//Size=0x250C
  553.  
  554. class SoldierWeaponData
  555. {
  556. public:
  557. char pad_0x0000[0x4]; //0x0000
  558.  
  559. };//Size=0x0004
  560.  
  561. class ClientWeapon
  562. {
  563. public:
  564.     char pad_0x0000[0x4]; //0x0000
  565.     __int32 m_pWeaponData; //0x0004
  566.     char pad_0x0008[0x4]; //0x0008
  567.     WeaponFiringData* m_pWeaponFiringData; //0x000C
  568.     __int32 m_pModifier; //0x0010
  569.     char pad_0x0014[0xC]; //0x0014
  570.     D3DXVECTOR4 m_moveSpeed; //0x0020
  571.     D3DXMATRIX m_shootSpace; //0x0030
  572.     D3DXMATRIX m_shootSpaceIdentity; //0x0070
  573.     char pad_0x00B0[0x118]; //0x00B0
  574.     float m_cameraFov; //0x01C8
  575.     float m_weaponFov; //0x01CC
  576.     float m_fovScaleFactor; //0x01D0
  577.     char pad_0x01D4[0x8]; //0x01D4
  578.     DWORD m_zoomLevel; //0x01DC  gets 0 when out of zoom
  579.     DWORD m_zoomMaxLevel; //0x01E0
  580.  
  581. };//Size=0x01E4
  582.  
  583. class WeaponFiringData
  584. {
  585. public:
  586.     char pad_0x0000[0x8]; //0x0000
  587.     FiringFunctionData* m_pFiringFunctionData; //0x0008
  588.  
  589. };//Size=0x000C
  590.  
  591. class ShotConfigData
  592. {
  593. public:
  594.     D3DXVECTOR4 m_InitialPosition; //0x0000
  595.     D3DXVECTOR4 m_InitialDirection; //0x0010
  596.     D3DXVECTOR4 m_InitialSpeed; //0x0020
  597.     char pad_0x0030[0xC]; //0x0030
  598.     BulletEntityData* m_ProjectileData; //0x003C
  599.     char pad_0x0040[0x10]; //0x0040
  600.     float m_SpawnDelay; //0x0050
  601.     __int32 m_NumberOfBulletsPerShell; //0x0054
  602.     __int32 m_NumberOfBulletsPerShot; //0x0058
  603.     __int32 m_NumberOfBulletsPerBurst; //0x005C
  604. char pad_0x0060[0x9C]; //0x0060
  605.  
  606. };//Size=0x00FC
  607.  
  608. class BulletEntityData
  609. {
  610. public:
  611.     char pad_0x0000[0xF8]; //0x0000
  612.     float m_Gravity; //0x00F8
  613.     char pad_0x00FC[0x20]; //0x00FC
  614.     float m_StartDamage; //0x011C
  615.     float m_EndDamage; //0x0120
  616.     float m_DamageFalloffStartDistance; //0x0124
  617.     float m_DamageFalloffEndDistance; //0x0128
  618. char pad_0x012C[0x758]; //0x012C
  619.  
  620. };//Size=0x0884
  621.  
  622. class FiringFunctionData
  623. {
  624. public:
  625.     char pad_0x0000[0x54]; //0x0000
  626.     ShotConfigData m_ShotConfigData; //0x0054
  627. char pad_0x0150[0xAC]; //0x0150
  628.  
  629. };//Size=0x01FC
  630.  
  631. class ClientSoldierAimingSimulation
  632. {
  633. public:
  634.     SoldierAimingSimulationData* m_data; //0x0000
  635.     char pad_0x0004[0x4]; //0x0004
  636.     AimAssist* m_fpsAimer; //0x0008
  637.     float m_yaw; //0x000C
  638.     float m_pitch; //0x0010
  639.     float m_aimYawTimer; //0x0014
  640.     float m_aimPitchTimer; //0x0018
  641.     D3DXVECTOR2 m_sway; //0x001C
  642. char pad_0x0024[0x54]; //0x0024
  643.  
  644. };//Size=0x0078
  645.  
  646. class SoldierAimingSimulationData
  647. {
  648. public:
  649.  
  650. };//Size=0x0000
  651.  
  652. class AimAssist
  653. {
  654. public:
  655.     char pad_0x0000[0xC]; //0x0000
  656.     float m_yaw; //0x000C
  657.     float m_pitch; //0x0010
  658. char pad_0x0014[0x30]; //0x0014
  659.  
  660. };//Size=0x0044
  661.  
  662. class WeaponFiring
  663. {
  664. public:
  665.     char pad_0x0000[0x3C]; //0x0000
  666.     WeaponSway* m_pWeaponSway; //0x003C
  667.     char pad_0x0040[0x54]; //0x0040
  668.     WeaponFiringData* m_pPrimaryFire; //0x0094
  669.     char pad_0x0098[0xC]; //0x0098
  670.     DWORD m_weaponState; //0x00A4
  671.     DWORD m_lastWeaponState; //0x00A8
  672.     DWORD m_nextWeaponState; //0x00AC
  673.     char pad_0x00B0[0x40]; //0x00B0
  674.     __int32 m_projectilesLoaded; //0x00F0
  675.     __int32 m_projectilesInMagazines; //0x00F4
  676.     __int32 m_numberOfProjectilesToFire; //0x00F8
  677. char pad_0x00FC[0x388]; //0x00FC
  678.  
  679. };//Size=0x0484
  680.  
  681.  
  682. class Deviation
  683. {
  684. public:
  685.     float m_pitch; //0x0000
  686.     float m_yaw; //0x0004
  687.     float m_roll; //0x0008
  688.     float m_transY; //0x000C
  689.  
  690. };//Size=0x0010
  691.  
  692. class WeaponSway
  693. {
  694. public:
  695.     char pad_0x0000[0xC8]; //0x0000
  696.     Deviation m_currentRecoilDeviation; //0x00C8
  697.     float m_timeSinceLastShot; //0x00D8
  698.     char pad_0x00DC[0x9C]; //0x00DC
  699.     unsigned char m_isFiring; //0x0178
  700. char pad_0x0179[0x3]; //0x0179
  701.  
  702. };//Size=0x017C
  703.  
  704. class ClientVehicleEntity
  705. {
  706. public:
  707.     DWORD N00001A67; //0x0000
  708.     char pad_0x0004[0x14]; //0x0004
  709.     VehicleEntityData* m_pVehicleEntityData; //0x0018
  710.     char pad_0x001C[0x94]; //0x001C
  711.     __int32 m_pClientVehicleSpawnEntity; //0x00B0
  712.     char pad_0x00B4[0x4]; //0x00B4
  713.     __int32 m_pClientVehicleHealthComponent; //0x00B8
  714.     __int32 m_pClientVehiclePhysicsComponen; //0x00BC
  715.     char pad_0x00C0[0xBC]; //0x00C0
  716.     __int32 m_pDynamicPhysicsEntity; //0x017C also know as just PhysicEntity* m_pPhysicEntity
  717.     float m_waterLevel; //0x0180
  718.     float m_terrainLevel; //0x0184
  719.     float m_waterLevelUpdateTimer; //0x0188
  720.     float m_terrainLevelUpdateTime; //0x018C
  721.     AxisAlignedBox m_childrenAABB; //0x0190
  722.     char pad_0x01B0[0x10]; //0x01B0
  723.     D3DXVECTOR4 m_Velocity; //0x01C0
  724.     D3DXVECTOR4 m_prevVelocity; //0x01D0
  725.     char pad_0x01E0[0xA0]; //0x01E0
  726.     ClientChassisComponent* m_pClientChassisComponent; //0x0280
  727.  
  728. };//Size=0x0284
  729.  
  730. class VehicleHudData
  731. {
  732. public:
  733.     D3DXVECTOR4 m_CustomizationOffset; //0x0000
  734.     __int32 m_Customization; //0x0010
  735.     char pad_0x0014[0x4]; //0x0014
  736.     char* m_IconName; //0x0018
  737. char pad_0x001C[0x14]; //0x001C
  738.  
  739. };//Size=0x0030
  740.  
  741. class VehicleEntityData
  742. {
  743. public:
  744.     char pad_0x0000[0xC0]; //0x0000
  745.     VehicleHudData m_HudData; //0x00C0
  746.     char pad_0x00F0[0x20]; //0x00F0
  747.     char* m_ControllableType; //0x0110
  748.     float m_DisabledDamageThreshold; //0x0114
  749.     float m_PreDestructionDamageThreshold; //0x0118
  750.     char pad_0x011C[0xD4]; //0x011C
  751.     char* m_NameSid; //0x01F0
  752.     __int32 m_MaxPlayersInVehicle; //0x01F4
  753.     float m_MinSpeedForMineActivate; //0x01F8
  754. char pad_0x01FC[0xC]; //0x01FC
  755.  
  756. };//Size=0x0208
  757.  
  758.  
  759.  
  760. class ClientChassisComponent
  761. {
  762. public:
  763.     char pad_0x0000[0x8]; //0x0000
  764.     __int32 m_pChassisComponentData; //0x0008
  765.     char pad_0x000C[0x4]; //0x000C
  766.     __int32 m_pClientPlayerEntryComponent; //0x0010
  767.     char pad_0x0014[0x8]; //0x0014
  768.     __int32 m_pDynamicPhysicsEntity; //0x001C same as in clientvehicleentity
  769.     char pad_0x0020[0x120]; //0x0020
  770.     D3DXVECTOR4 m_linearVelocity; //0x0140
  771.     D3DXVECTOR4 m_angularVelocity; //0x0150
  772. char pad_0x0160[0x8]; //0x0160
  773.  
  774. };//Size=0x0168
  775.  
  776. class SyncedBFSettings
  777. {
  778. public:
  779.     char pad_0x0000[0x38]; //0x0000
  780.     unsigned char m_AllUnlocksUnlocked; //0x0038
  781.     unsigned char m_NoMinimap; //0x0039
  782.     unsigned char m_NoHud; //0x003A
  783.     unsigned char m_NoMinimapSpotting; //0x003B
  784.     unsigned char m_No3dSpotting; //0x003C
  785.     unsigned char m_NoNameTag; //0x003D
  786.     unsigned char m_OnlySquadLeaderSpawn; //0x003E
  787.     unsigned char m_TeamSwitchingAllowed; //0x003F
  788.  
  789.     __forceinline static SyncedBFSettings* GetInstance()
  790.     {
  791.         return *(SyncedBFSettings**)( OFFSET_SYNCEDBFSETTINGS );
  792.     }
  793. };//Size=0x0040
  794.  
  795. class GameRenderer
  796. {
  797. public:
  798.     char pad_0x0000[0x24]; //0x0000
  799.     __int32 m_GameRenderSettings; //0x0024  not sure
  800.     char pad_0x0028[0x8]; //0x0028
  801.     RenderView* m_pRenderView; //0x0030
  802. char pad_0x0034[0x10C]; //0x0034
  803.  
  804.     __forceinline static GameRenderer* GetInstance()
  805.     {
  806.         return *(GameRenderer**)(OFFSET_GAMERENDERER);
  807.     }
  808. };//Size=0x0140
  809.  
  810. class RenderView
  811. {
  812. public:
  813.     char pad_0x0000[0x420]; //0x0000
  814.     D3DXMATRIX m_ViewProj; //0x0420
  815. char pad_0x0460[0x24]; //0x0460
  816.  
  817. };//Size=0x0484
  818.  
  819. class DxRenderer
  820. {
  821. public:
  822.     char pad_0x0000[0x20]; //0x0000
  823.     Screen* m_pScreen; //0x0020
  824.     char pad_0x0024[0x74]; //0x0024
  825.     ID3D11Device* m_pDevice; //0x0098
  826.     ID3D11DeviceContext* m_pContext; //0x009C
  827.     char pad_0x00A0[0x120]; //0x00A0
  828.     char* m_GPU_Name; //0x01C0
  829.     char pad_0x01C4[0x2C]; //0x01C4
  830.     char* m_GPU_Name2; //0x01F0
  831.     char pad_0x01F4[0x8]; //0x01F4
  832.     char m_szGPU_Name[256]; //0x01FC
  833.  
  834.     __forceinline static DxRenderer* GetInstance()
  835.     {
  836.         return *(DxRenderer**)(OFFSET_DXRENDERER);
  837.     }
  838. };//Size=0x02FC
  839.  
  840. class Screen
  841. {
  842. public:
  843.     char pad_0x0000[0x54]; //0x0000
  844.     __int32 m_Game_Width; //0x0054
  845.     __int32 m_Game_Height; //0x0058
  846.     char pad_0x005C[0x3C]; //0x005C
  847.     __int32 m_GameWindow_Width; //0x0098
  848.     __int32 m_GameWindow_Height; //0x009C
  849.     char pad_0x00A0[0x20]; //0x00A0
  850.     IDXGISwapChain* m_pSwapChain; //0x00C0
  851.  
  852. };//Size=0x00C4
  853.  
  854.  
  855. class AimingConstraints
  856. {
  857. public:
  858.     float m_MinYaw; //0x0000
  859.     float m_MaxYaw; //0x0004
  860.     float m_MinPitch; //0x0008
  861.     float m_MaxPitch; //0x000C
  862.     float m_PitchOffset; //0x0010
  863.     float m_YawOffset; //0x0014
  864.     float m_MinYawDefault; //0x0018
  865.     float m_MaxYawDefault; //0x001C
  866.  
  867. };//Size=0x0020
  868.  
  869. class SoldierParachuteComponentData
  870. {
  871. public:
  872.  
  873. };//Size=0x0000
  874.  
  875. class ClientSoldierParachuteComponent
  876. {
  877. public:
  878.     char pad_0x0000[0x8]; //0x0000
  879.     SoldierParachuteComponentData* m_pSoldierParachuteComponentData; //0x0008
  880.     char pad_0x000C[0xA0]; //0x000C
  881.     DWORD m_pClientAntAnimatableComponent; //0x00AC
  882.     DWORD m_pCharacterPhysicsEntity; //0x00B0
  883.     AimingConstraints* m_pAimingContraints; //0x00B4
  884.     char pad_0x00B8[0x48]; //0x00B8
  885.     __int32 m_State; //0x0100
  886.     D3DXVECTOR2 m_View; //0x0104
  887.     D3DXVECTOR2 m_DeltaView; //0x010C
  888.     D3DXVECTOR2 m_AuthoratativeView; //0x0114
  889.     bool m_SoldierInParachute; //0x011C
  890. char pad_0x011D[0x7]; //0x011D
  891.  
  892.     //Allows you to have a 360° view, perfect for Aimbotting
  893.     //credits to ICY
  894.     void __forceinline UnlockParachuteView( )
  895.     {
  896.             if ( this->m_pAimingContraints )
  897.             {
  898.                 this->m_pAimingContraints->m_MinYaw = -180.f;
  899.                 this->m_pAimingContraints->m_MaxYaw =  180.f;
  900.                 this->m_pAimingContraints->m_MinPitch = -180.f;
  901.                 this->m_pAimingContraints->m_MaxPitch =  180.f;
  902.                 this->m_pAimingContraints->m_MinYawDefault = -180.f;
  903.                 this->m_pAimingContraints->m_MaxYawDefault =  180.f;
  904.             }
  905.     }
  906.  
  907. };//Size=0x0124
  908.  
  909. class ClientSpottingTargetComponent
  910. {
  911. public:
  912.     char pad_0x0000[0x8]; //0x0000
  913.     __int32 m_pSpottingTargetComponentData; //0x0008
  914. char pad_0x000C[0xD8]; //0x000C
  915.  
  916. };//Size=0x00E4
  917.  
  918. }
  919.  
  920. #define ValidPointer( pointer ) ( pointer  && pointer !=0  && HIWORD( pointer ) )
CPP Code:
  1. #include "BF4_SDK.h"
  2.  
  3. bool fb::ClientSoldierEntity::GetBonePos( int BoneId, D3DXVECTOR3 *vOut )
  4. {
  5.     ClientRagDollComponent* pClientRagDollComponent = this->m_pClientRagdollComponent;
  6.     if( !ValidPointer( pClientRagDollComponent) ) return false;
  7.  
  8.     if ( !pClientRagDollComponent->m_ValidTransforms ) return false;
  9.  
  10.     QuatTransform* pQuat = pClientRagDollComponent->m_ActiveWorldTransforms;
  11.     if( !ValidPointer(pQuat) ) return false;
  12.        
  13.     vOut->x = pQuat[BoneId].m_TransAndScale.x;
  14.     vOut->y = pQuat[BoneId].m_TransAndScale.y;
  15.     vOut->z = pQuat[BoneId].m_TransAndScale.z;
  16.  
  17.     return true;
  18. }
  19.  
  20. fb::ClientSoldierWeapon* fb::ClientSoldierEntity::GetActiveWeapon()
  21. {
  22.     ClientSoldierWeaponsComponent* pClientSoldierWeaponsComponent = this->m_pClientSoldierWeaponsComponent;
  23.     if (!ValidPointer( pClientSoldierWeaponsComponent )) return NULL;
  24.  
  25.     ClientAnimatedSoldierWeaponHandler* pHandler = pClientSoldierWeaponsComponent->m_handler;
  26.     if (!ValidPointer( pHandler )) return NULL;
  27.     if (!ValidPointer( pHandler->m_WeaponList )) return NULL;
  28.    
  29.     int activeSlot = pClientSoldierWeaponsComponent->m_activeSlot;
  30.     if (activeSlot < 0 ) return NULL;
  31.  
  32.     ClientSoldierWeapon* pClientSoldierWeapon = pHandler->m_WeaponList[activeSlot];
  33.     if (!ValidPointer( pClientSoldierWeapon )) return NULL;
  34.  
  35.     return pClientSoldierWeapon;
  36. }
  37.  
  38. fb::WeaponSway* fb::ClientSoldierWeapon::GetWeaponSway()
  39. {
  40.     WeaponFiring* pWeaponFiring = this->m_PredictedFiring;
  41.     if (!ValidPointer( pWeaponFiring )) return NULL;
  42.  
  43.     return pWeaponFiring->m_pWeaponSway;
  44. }
  45.  
  46.  
  47. fb::BulletEntityData* fb::ClientSoldierWeapon::GetBulletEntityData()
  48. {
  49.     FiringFunctionData* pFiringFunctionData = this->GetFiringFunctionData();
  50.     if (!ValidPointer( pFiringFunctionData )) return NULL;
  51.  
  52.     BulletEntityData* pBulletEntityData = pFiringFunctionData->m_ShotConfigData.m_ProjectileData;
  53.     if (!ValidPointer( pBulletEntityData )) return NULL;
  54.  
  55.     return pBulletEntityData;
  56. }
  57.  
  58. fb::FiringFunctionData* fb::ClientSoldierWeapon::GetFiringFunctionData()
  59. {
  60.     ClientWeapon* pClientWeapon = this->m_pClientWeapon;
  61.     if (!ValidPointer( pClientWeapon )) return NULL;
  62.  
  63.     WeaponFiringData* pWeaponFiringData = pClientWeapon->m_pWeaponFiringData;
  64.     if (!ValidPointer( pWeaponFiringData )) return NULL;
  65.  
  66.     FiringFunctionData* pFiringFunctionData = pWeaponFiringData->m_pFiringFunctionData;
  67.     if (!ValidPointer( pFiringFunctionData )) return NULL;
  68.  
  69.     return pFiringFunctionData;
  70. }

Download BF4 X86 SDK Demo Project