Game


You are not connected. Please login or register

Source tách Chat và Exp main 104D

Go down  Message [Page 1 of 1]

1Source tách Chat và Exp main 104D Empty Source tách Chat và Exp main 104D Thu Feb 06, 2014 1:44 pm

Fenix

Fenix
Game Master
Game Master
Source tách chat và log. ai cài vs 2010 thì build cho mọi người cùng dùng nhé! mình sài mạng cùi nên ngại tải Source tách Chat và Exp main 104D 4



Code:
#include "StdAfx.h"
#include "ChatWnd.h"
#include "ToolKit.h"
DWORD dwMsgType;
DWORD dwYpos;
DWORD dwHeight;
DWORD dwMsgCnt;
DWORD dwScrollPos;
int SystChatSepar = GetPrivateProfileIntA("Custom", "CoordY", 150, "./addons.ini");
__declspec(naked) void ShowSysMsgs()
{
__asm {
MOV EDI, GetDisplayMsgType
call EDI
MOV dwMsgType,EAX
MOV ECX, DWORD PTR SS:[EBP-4]
MOV EAX, DWORD PTR DS:[ECX+0x128]
MOV dwYpos, EAX
MOV EAX, DWORD PTR DS:[ECX+0x138]
MOV dwHeight, EAX
// ----
MOV EDX, SystChatSepar // y position
MOV DWORD PTR DS:[ECX+0x128], EDX
MOV DWORD PTR DS:[ECX+0x138], 0x64
MOV EAX, DWORD PTR DS:[ECX+0x13C]
MOV dwMsgCnt, EAX
MOV DWORD PTR DS:[ECX+0x13C], 6
MOV EAX, DWORD PTR DS:[ECX+0x148]
MOV dwScrollPos, EAX
PUSH 3
MOV ECX, DWORD PTR SS:[EBP-4]
MOV EDI,SetDisplayMsgType
CALL EDI
MOV ECX, DWORD PTR SS:[EBP-4]
MOV EDI,ShowChatMsgs
CALL EDI
MOV ECX, DWORD PTR SS:[EBP-4]
PUSH dwMsgType
MOV EDI,SetDisplayMsgType
CALL EDI
MOV ECX, DWORD PTR SS:[EBP-4]
MOV EAX, dwYpos
MOV DWORD PTR DS:[ECX+0x128], EAX
MOV EAX, dwHeight
MOV DWORD PTR DS:[ECX+0x138], EAX
MOV EAX, dwMsgCnt
MOV DWORD PTR DS:[ECX+0x13C], EAX
MOV EAX, dwScrollPos
MOV DWORD PTR DS:[ECX+0x148], EAX
MOV ECX, DWORD PTR SS:[EBP-4]
MOV EDI,ShowChatMsgs
CALL EDI
retn
}
}
__declspec(naked) void FixSysMsg1()
{
__asm {
cmp dword ptr ss:[ebp+0x10], 3
je _true
call NewCall
jmp FixSysMsg1_FALSE
_true:
pop eax
jmp FixSysMsg1_TRUE
}
}
__declspec(naked) void FixSysMsg2()
{
__asm {
cmp dword ptr ss:[ebp+0x10], 3
je _true
call NewCall
jmp FixSysMsg2_FALSE
_true:
pop eax
jmp FixSysMsg2_TRUE
}
}
__declspec(naked) void FixSysMsg3()
{
__asm {
cmp dword ptr ss:[ebp+0x10], 3
je _true
call NewCall
jmp FixSysMsg3_FALSE
_true:
pop eax
jmp FixSysMsg3_TRUE
}
}

void ChatWndHooks()
{
ToolKit.HookThis((DWORD)ShowSysMsgs, ShowChatMsgsCall_Hook);
ToolKit.WriteJmp(FixSysMsg1_Hook, (DWORD)FixSysMsg1);
ToolKit.WriteJmp(FixSysMsg2_Hook, (DWORD)FixSysMsg2);
ToolKit.WriteJmp(FixSysMsg3_Hook, (DWORD)FixSysMsg3);
}



ChatWnd.h:



Code:
#pragma once
const int GetDisplayMsgType = 0x78B770; //0x6F7FE0;
const int SetDisplayMsgType = 0x78B720; //0x6F7F95;
const int ShowChatMsgs = 0x788930; //0x6F5584;
const int ShowChatMsgsCall_Hook = 0x78AF6C; //0x6F7927;
const int NewCall = 0x9CFF45; //0x9CFF45; //0x8510BA;
const int FixSysMsg1_Hook = 0x789617; //0x6F60AC;
const int FixSysMsg1_FALSE = FixSysMsg1_Hook+5;
const int FixSysMsg1_TRUE = 0x7896D4; //0x6F6165;
const int FixSysMsg2_Hook = 0x789913; //0x6F63B3;
const int FixSysMsg2_FALSE = FixSysMsg2_Hook+5;
const int FixSysMsg2_TRUE = 0x789A0A; //0x6F64B6;
const int FixSysMsg3_Hook = 0x789C5C; //0x6F6715;
const int FixSysMsg3_FALSE = FixSysMsg3_Hook+5;
const int FixSysMsg3_TRUE = 0x789D1F; //0x6F67DA;
void ChatWndHooks();



ToolKit.h (Brain):



Code:
#pragma once
#include "StdAfx.h"
class ToolKitEx
{
public:
ToolKitEx();
virtual ~ToolKitEx();


void SetNop(DWORD dwSrcOffset, int Size);
void SetByte(DWORD dwSrcOffset, BYTE bOpCode);
void WriteJmp(DWORD dwSrcOffset, DWORD dwDstOffset);
void HookThis(DWORD dwDstOffset, DWORD dwSrcOffset);
void HookOffset(DWORD my, DWORD tohook, BYTE type);
void Protect(DWORD dwSrcOffset, int Size, DWORD dwNewProtect);
DWORD UnProtect(DWORD dwSrcOffset, int Size);


private:


protected:
};
extern ToolKitEx ToolKit;

http://www.devgame.ga

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum