VIRTUALS

the virtual labs for the virtuals

0%

【游戏逆向】How to find entityList in Call of Duty games with IDA tutorial

摘要:
The title says it all.

Explain

The traditional method for all CoD games is to load the binary up in IDA and find the CG_Init function. Usually you can search for the string “white”, cross reference it, and one of the cross references will be that CG_Init function.

At the tippity-top of this function, you will see some calls to memset

0x0

Here you can find a bunch of different structs, including the cg_entities struct. This struct contains an array of centity_t. Not pointers to centity_t.
centity_t contains various information about the player including their position. cg_entities is used for both players and bots.

Keep in mind that there are two entity lists. cgentity_t and ClientInfo_t. ClientInfo_t is used to get the player name while cgentity_t is used for their position and other data.

Here are some addresses for the latest Steam Version of CoD 5. Try use them as a reference/guide so you can learn how to find them yourself.

CG_Init: 0x457B20

1
2
3
4
5
6
7
8
9
10
11
#define CGS                   0x98B700
#define CGS_Size 0x45C0
#define CG 0x98FCE0
#define CG_Size 0xFDDC0
#define CG_Entities 0xA90930
#define CG_EntitySize 0x2BC
#define CG_EntitiesSize 0xAF000
#define CG_ClientInfo 0xA76790
#define CG_ClientInfoSize 0x55C
#define RefDef CG + 0x56A8C
#define CL_ViewAngles 0xF6B314 // ClientActive->ViewAngles

转载链接: [email protected]