mirror of
https://github.com/ttttupup/wxhelper.git
synced 2024-11-23 02:39:25 +08:00
拍一拍实现
This commit is contained in:
parent
6b36287c4d
commit
2f1793b2b1
34
src/pat.cc
Normal file
34
src/pat.cc
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "pat.h"
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "wechat_data.h"
|
||||||
|
|
||||||
|
#define WX_PAT_MGR_OFFSET 0x7e91c0
|
||||||
|
#define WX_SEND_PAT_MSG_OFFSET 0x1228510
|
||||||
|
#define WX_RET_OFFSET 0x1AE4A45
|
||||||
|
|
||||||
|
int SendPatMsg(wchar_t* chat_room_id, wchar_t* wxid) {
|
||||||
|
int success = -1;
|
||||||
|
WeChatString chat_room(chat_room_id);
|
||||||
|
WeChatString self_wxid(wxid);
|
||||||
|
DWORD base = GetWeChatWinBase();
|
||||||
|
DWORD get_pat_mgr_addr = base + WX_PAT_MGR_OFFSET;
|
||||||
|
DWORD send_pat_msg_addr = base + WX_SEND_PAT_MSG_OFFSET;
|
||||||
|
DWORD ret_addr = base + WX_RET_OFFSET;
|
||||||
|
__asm {
|
||||||
|
PUSHAD
|
||||||
|
CALL get_pat_mgr_addr
|
||||||
|
PUSH ret_addr
|
||||||
|
PUSH 0x0
|
||||||
|
PUSH EAX
|
||||||
|
LEA ECX,chat_room
|
||||||
|
LEA EDX,self_wxid
|
||||||
|
CALL send_pat_msg_addr
|
||||||
|
ADD ESP,0xc
|
||||||
|
MOVZX EAX,AL
|
||||||
|
MOV success,EAX
|
||||||
|
POPAD
|
||||||
|
}
|
||||||
|
return success;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user