-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcommon.h
33 lines (27 loc) · 793 Bytes
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include <windows.h>
#define WECHATWINDLL TEXT("WeChatWin.dll")
#define WECHATRESOURCE TEXT("WeChatResource.dll")
#define ORGWECHATRESOURCE TEXT("WeChatResource.dll.1")
typedef struct _FAKE_WX_CODE
{
DWORD orig_code_count;
BYTE orig_code[100];
DWORD fake_code_count;
BYTE fake_code[100];
}FakeWxCode, *PFakeWxCode;
typedef struct _SUP_WX_CFG
{
const TCHAR* version;
DWORD revoke_offset;
FakeWxCode code;
}SuppWxCfg, *PSuppWxCfg;
bool IsSupportedWxVersion(
const SuppWxCfg* cfg,
INT cfg_count,
DWORD* offset = NULL,
BYTE* orig_code = NULL,
DWORD* orig_code_count = NULL,
BYTE* fake_code = NULL,
DWORD* fake_code_count = NULL);
int HookTemplate(HMODULE hMod, const SuppWxCfg* OffArray, int len, PVOID* orig, PVOID fake);