Impl Functions_FUNC_ADD_ROOM_MEMBERS

This commit is contained in:
Changhua 2023-06-23 09:08:25 +08:00
parent 76df58d155
commit 1dfb4a8416
3 changed files with 24 additions and 19 deletions

View File

@ -23,6 +23,7 @@ int AddChatroomMember(string roomid, string wxids)
DWORD addRoomMemberCall2 = g_WeChatWinDllAddr + g_WxCalls.arm.call2; DWORD addRoomMemberCall2 = g_WeChatWinDllAddr + g_WxCalls.arm.call2;
DWORD addRoomMemberCall3 = g_WeChatWinDllAddr + g_WxCalls.arm.call3; DWORD addRoomMemberCall3 = g_WeChatWinDllAddr + g_WxCalls.arm.call3;
DWORD temp = 0;
WxString_t txtRoomid = { 0 }; WxString_t txtRoomid = { 0 };
wstring wsRoomid = String2Wstring(roomid); wstring wsRoomid = String2Wstring(roomid);
txtRoomid.text = (wchar_t *)wsRoomid.c_str(); txtRoomid.text = (wchar_t *)wsRoomid.c_str();
@ -45,23 +46,27 @@ int AddChatroomMember(string roomid, string wxids)
LOG_DEBUG("Adding {} members[{}] to {}", vTxtMembers.size(), wxids.c_str(), roomid.c_str()); LOG_DEBUG("Adding {} members[{}] to {}", vTxtMembers.size(), wxids.c_str(), roomid.c_str());
__asm { __asm {
pushad; pushad;
pushfd; pushfd;
call addRoomMemberCall1; call addRoomMemberCall1;
sub esp, 0x14; sub esp, 0x8;
mov esi, eax; mov temp, eax;
mov ecx, esp; mov ecx, esp;
lea eax, txtRoomid; mov dword ptr[ecx], 0x0;
push eax; mov dword ptr[ecx + 4], 0x0;
call addRoomMemberCall2; test esi, esi;
lea edi, vTxtMembers sub esp, 0x14;
push edi; mov ecx, esp;
mov ecx, esi; lea eax, txtRoomid;
call addRoomMemberCall3; push eax;
mov rv, eax; call addRoomMemberCall2;
popfd; mov ecx, temp;
popad; lea eax, vTxtMembers;
push eax;
call addRoomMemberCall3;
mov rv, eax;
popfd;
popad;
} }
return rv; return rv;
} }

View File

@ -22,7 +22,7 @@ WxCalls_t wxCalls = {
Exec, base, start, end, slot, name*/ Exec, base, start, end, slot, name*/
{ 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 }, { 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 },
{ 0xA17D50, 0xF59E40, 0xA18BD0, 0xA17E70 }, // Accept New Friend application { 0xA17D50, 0xF59E40, 0xA18BD0, 0xA17E70 }, // Accept New Friend application
{ 0xE29F0, 0x771980, 0x43D8D0 }, // Add chatroom members { 0x78CF20, 0xF59E40, 0xBD1DC0 }, // Add chatroom members
{ 0x771980, 0xCD2A90 } // Receive transfer { 0x771980, 0xCD2A90 } // Receive transfer
}; };

View File

@ -625,12 +625,12 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len
ret = func_accept_friend(req.msg.v.v3, req.msg.v.v4, req.msg.v.scene, out, out_len); ret = func_accept_friend(req.msg.v.v3, req.msg.v.v4, req.msg.v.scene, out, out_len);
break; break;
} }
#if 0
case Functions_FUNC_ADD_ROOM_MEMBERS: { case Functions_FUNC_ADD_ROOM_MEMBERS: {
LOG_DEBUG("[Functions_FUNC_ADD_ROOM_MEMBERS]"); LOG_DEBUG("[Functions_FUNC_ADD_ROOM_MEMBERS]");
ret = func_add_room_members(req.msg.m.roomid, req.msg.m.wxids, out, out_len); ret = func_add_room_members(req.msg.m.roomid, req.msg.m.wxids, out, out_len);
break; break;
} }
#if 0
case Functions_FUNC_RECV_TRANSFER: { case Functions_FUNC_RECV_TRANSFER: {
LOG_DEBUG("[Functions_FUNC_RECV_TRANSFER]"); LOG_DEBUG("[Functions_FUNC_RECV_TRANSFER]");
ret = func_receive_transfer(req.msg.tf.wxid, req.msg.tf.tid, out, out_len); ret = func_receive_transfer(req.msg.tf.wxid, req.msg.tf.tid, out, out_len);