Skip to content

Commit

Permalink
ClExtrasInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr.Abc committed Dec 19, 2024
1 parent 8601b3e commit ae09641
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Header/Var/local.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ using cl_refHookfunc_t = struct{
void(__fastcall* CBasePanel_PaintBackground)(void* pthis, int dummy);

void(__fastcall* CGameUI_Start)(void* pthis, int dummy, void* engfuncs, int idoncare, void* ibasesystem);
byte* (__fastcall* Crypto_GenerateKey)(void* pthis, int dummy, size_t param1, bool param2);

void (*pfnPlaybackEvent) (int flags, const struct edict_s* pInvoker, unsigned short eventindex, float delay, float* origin, float* angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2);
//VGUI2
Expand Down
30 changes: 30 additions & 0 deletions src/Source/HUD/CCustomHud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ static pfnUserMsgHook m_pfnTextMsg;
static pfnUserMsgHook m_pfnMetaHook;
static pfnUserMsgHook m_pfnDamage;
static pfnUserMsgHook m_pfnBattery;
static pfnUserMsgHook m_pfnClExtrasInfo;
#pragma endregion

#pragma region UserMsg Hooks
Expand Down Expand Up @@ -432,6 +433,34 @@ static int __MsgFunc_TextMsg(const char* pszName, int iSize, void* pbuf) {

return m_pfnTextMsg(pszName, iSize, pbuf);
}
static int __MsgFunc_ClExtrasInfo(const char* pszName, int iSize, void* pbuf) {
//Why Encrypt it? is it aes?
//Funny Encrypt here, plain text length 33, sent length 105
//x3 Network traffic, lets fuck more server operator
BEGIN_READ(pbuf, iSize);
int plainDataLength = READ_LONG();
int ivLength = READ_LONG();
std::vector<byte> iv{};
for (int i = 0; i < ivLength; i++) {
iv.push_back(READ_BYTE());
}
int encryptLength = READ_LONG();
std::vector<byte> encrypt{};
for (int i = 0; i < encryptLength; i++) {
encrypt.push_back(READ_BYTE());
}
int enctryptDigestLength = READ_LONG();
std::vector<byte> digest{};
for (int i = 0; i < enctryptDigestLength; i++) {
digest.push_back(READ_BYTE());
}
extern PVOID g_dwClientBase;
//Funny Stack Object;
auto pCryptoObj = reinterpret_cast<char*>(g_dwClientBase) + 0xBE0;
byte* key = gHookFuncs.Crypto_GenerateKey(pCryptoObj, 0, 1, false);

return m_pfnClExtrasInfo(pszName, iSize, pbuf);
}
static int __MsgFunc_MetaHook(const char* pszName, int iSize, void* pbuf) {
BEGIN_READ(pbuf, iSize);
int type = READ_BYTE();
Expand Down Expand Up @@ -612,6 +641,7 @@ void CCustomHud::HUD_Init(void){
m_pfnFlashlight = HOOK_MESSAGE(Flashlight);
m_pfnTextMsg = HOOK_MESSAGE(TextMsg);
m_pfnMetaHook = HOOK_MESSAGE(MetaHook);
m_pfnClExtrasInfo = HOOK_MESSAGE(ClExtrasInfo);
if(!m_pfnMetaHook)
gEngfuncs.pfnHookUserMsg("MetaHook", __MsgFunc_MetaHook);

Expand Down
2 changes: 2 additions & 0 deletions src/Source/exportfuncs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ void FillAddress() {
Fill_Sig(Client_SoundEngine_PlayFMODSound_SIG, g_dwClientBase, g_dwClientSize, CClient_SoundEngine_PlayFMODSound);
#define V_PunchAxis_SIG "\x8B\x44\x24\x04\xF3\x0F\x10\x44\x24\x08\xF3\x0F\x11\x04\x85\x2A\x2A\x2A\x2A\xC3\xCC"
Fill_Sig(V_PunchAxis_SIG, g_dwClientBase, g_dwClientSize, V_PunchAxis);
#define Crypto_GenerateKey_SIG "\x81\xEC\x8C\x08\x00\x00\xA1\x2A\x2A\x2A\x2A\x33\xC4\x89\x84\x24\x88\x08\x00\x00\x53\x8B\x9C\x24\x94"
Fill_Sig(Crypto_GenerateKey_SIG, g_dwClientBase, g_dwClientSize, Crypto_GenerateKey);
PUCHAR addr;
if (1)
{
Expand Down

0 comments on commit ae09641

Please sign in to comment.