War3Hack ( I just a beginner)

This is a discussion on War3Hack ( I just a beginner) within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; Feel shy I'm Chinese English not so good I was programming beginners want to master to know me Code: using ...

Results 1 to 7 of 7
  1. #1
    k864928499 is offline Newbie Array
    Join Date
    Sep 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    0
    Reputation
    0

    War3Hack ( I just a beginner)

    Feel shy I'm Chinese
    English not so good
    I was programming beginners want to master to know me



    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
    using System.Threading;
    using System.Diagnostics;
    using System.Windows.Threading;
    namespace Cas
    {
        /// <summary>
        /// MainWindow.xaml 的交互逻辑
        /// </summary>
        public partial class MainWindow : Window
        {
            public static IntPtr PinballHandle;
            public static int GamedllAddress;
            public static int WarPid = 0;//全局变量 进程pid
            public static IntPtr hwnd; //全局变量 魔兽窗口句柄
            public static IntPtr baseAddress; //全局变量 game.dll基址
            public static Process Myprocess; //全局变量  魔兽进程
            public static string Var;//版本号
            public static Boolean MH = false;//全图状态
            public static Boolean VS = false;//VS防封状态
            public static Boolean XL = false;//显蓝状态
            public static Boolean CD = false;//无CD状态
            public static Boolean SRF = false;//输入法状态
            public static Boolean XLIsChecked = true;//显蓝勾选
            public static Boolean CDIsChecked = true;//无CD勾选
            public static Boolean ZDIsChecked = true;//自动勾选
            public string name;
            public string dllname;
            const int THREADSIZE = 1024 * 4;
            const int MEM_COMMIT = 0x1000;
            const int MEM_RESERVE = 0x2000;
            const int PAGE_EXECUTE_READWRITE = 0x40;
            public int pFileRemote;
            public MainWindow()
            {
                InitializeComponent();
            }
            public void Window_Loaded(object sender, RoutedEventArgs e)
            {
                Process.EnterDebugMode();
                Thread war3mhtd = new Thread(new ThreadStart(Timer));
                war3mhtd.IsBackground = false;
                war3mhtd.Start();
                API.Casload();
            }
            private void button1_Click(object sender, RoutedEventArgs e)
            {
                if (button1.Content.ToString() == "开启全图")
                {
                    switch (Var)
                    {
                        case "1, 20, 4, 6074":
                            MH120Eon();
                            button1.Content = "关闭全图";
                            break;
                        case "1, 24, 1, 6374":
                            MH124Bon();
                            button1.Content = "关闭全图";
                            break;
                        case "1, 24, 4, 6387":
                            MH124Eon();
                            button1.Content = "关闭全图";
                            break;
                        default:
                            break;
                    }
                }
                else
                {
                    switch (Var)
                    {
                        case "1, 20, 4, 6074":
                            MH120Eoff();
                            button1.Content = "开启全图";
                            break;
                        case "1, 24, 1, 6374":
                            MH124Boff();
                            button1.Content = "开启全图";
                            break;
                        case "1, 24, 4, 6387":
                            MH124Eoff();
                            button1.Content = "开启全图";
                            break;
                        default:
                            break;
                    }
                }
            }
            private void Timer()
            {
                while (true)
                { 
                    Thread.Sleep(3000);
                    Process[] processes = Process.GetProcessesByName("VSClient");
                    if (processes.Length != 0)
                    {
                        if (VS == false)
                        {
                            if (API.Casvs() == 1)
                            {
                                Dispatcher.BeginInvoke(new ThreadStart(delegate() { PtZT.Content = "VS对战平台运行[已保护]"; }), null);
                                VS = true;
                            }
                            else
                            {
                                Dispatcher.BeginInvoke(new ThreadStart(delegate() { PtZT.Content = "VS对战平台运行[未保护]"; }), null);
                                VS = false;
                            }
                        }   
                    }
                    else
                    {
                        VS = false;
                        Dispatcher.BeginInvoke(new ThreadStart(delegate() { PtZT.Content = "对战平台尚未运行,等待中..."; }), null);
                    }
                    hwnd = API.FindWindow("Warcraft III", "Warcraft III"); //取魔兽窗口句柄
                    if (hwnd != IntPtr.Zero)  // 句柄不为空
                    {
                        API.GetWindowThreadProcessId(hwnd, ref WarPid); //句柄去进程 pid
                    }
                    else
                    {
                        hwnd = IntPtr.Zero;
                        Var = "";
                        WarPid = 0;
                        GamedllAddress = 0;
                        baseAddress = (IntPtr)0;
                        MH = false;
                        XL = false;
                        CD = false;
                        SRF = false;
                        Dispatcher.BeginInvoke(new ThreadStart(delegate() { button1.Content = "开启全图"; }), null);
                        Dispatcher.BeginInvoke(new ThreadStart(delegate() { WarZT.Content =  "魔兽争霸未启动,等待中..."; }), null);
                    }
                    if (WarPid != 0 && MH != true)
                    {
                        Myprocess = Process.GetProcessById(WarPid);
                        ProcessModule myProcessModule;
                        ProcessModuleCollection Mymodules = Myprocess.Modules;
                        
                        for (int i = 0; i < Mymodules.Count; i++)
                        {
                            myProcessModule = Mymodules[i];
                            if (SRF == false)
                            {
                                if (myProcessModule.ModuleName == "War3.exe" || myProcessModule.ModuleName == "WAR3.exe" || myProcessModule.ModuleName == "war3.exe")
                                {
                                    string path = "";
                                    path = @myProcessModule.FileName.ToString();
                                    API.Casjihuo(path);
                                    SRF = true;
                                }       
                            }
                            
                            if (myProcessModule.ModuleName == "Game.dll" || myProcessModule.ModuleName == "game.dll" || myProcessModule.ModuleName == "GAME.dll")
                            {
                                Var = myProcessModule.FileVersionInfo.FileVersion;
                                baseAddress = myProcessModule.BaseAddress;  // 基址
                                GamedllAddress = baseAddress.ToInt32();
                                if (XLIsChecked == true && XL == false)
                                {
                                    if (API.Casxl() == 1)
                                    {
                                        XL = true;
                                    }
                                    else
                                    {
                                        XL = false;
                                    }
                                }
                                switch (Var)
                                {
                                    case "1, 20, 4, 6074":
                                        Dispatcher.BeginInvoke(new ThreadStart(delegate() { WarZT.Content = "当前版本 1.20E"; }), null);
                                        if (CDIsChecked == true && CD == false)
                                        {
                                            API.Cas120e();
                                            CD = true;
                                        }
                                        break;
                                    case "1, 24, 1, 6374":
                                        Dispatcher.BeginInvoke(new ThreadStart(delegate() { WarZT.Content = "当前版本 1.24B"; }), null);
                                        if (CDIsChecked == true && CD == false)
                                        {
                                            API.Cas124b();
                                            CD = true;
                                        }
                                        break;
                                    case "1, 24, 4, 6387":
                                        Dispatcher.BeginInvoke(new ThreadStart(delegate() { WarZT.Content = "当前版本 1.24E"; }), null);
                                        break;
                                    default:
                                        WarZT.Content = "当前魔兽版本不支持";
                                        break;
                                }
                                
                            }  
                        }
                    }
                }
            }
            public void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
            {
                DragMove();
            }
            public void MH120Eon()
            {
                PinballHandle = API.OpenProcess(0x1F0FFF, 0, (UInt32)WarPid);  //PROCESS_ALL_ACCESS=0x1F0FFF 调试级权限打开进程
                if (this.checkBox1.IsChecked == true)
                {
                    // 大地图去除迷雾
                    patch(0x406B53, new byte[] { 0x90, 0x8b, 0x09 });
                }
                if(this.checkBox2.IsChecked==true)
                {
                    //大地图显示单位
                    patch(0x2A0930, new byte[] { 0xd2 });
                    //显示技能
                    patch(0x12dc1a, 0x33, 0xc0);
                    patch(0x12dc5a, 0x33, 0xc0);
                    patch(0x1bfabe, 0xeb);
                    patch(0x442cc0, 0x90, 0x40, 0x30, 0xc0, 0x90, 0x90);
                    patch(0x443375, 0x30, 0xc0);
                    patch(0x45a641, 0x90, 0x90, 0x33, 0xc0, 0x90, 0x90);
                    patch(0x45e79e, 0x90, 0x90, 0x33, 0xc0, 0x90, 0x90);
                    patch(0x466527, 0x90, 0x90);
                    patch(0x46b258, 0x90, 0x33, 0xc0, 0x90, 0x90, 0x90);
                    //资源面板
                    patch(0x13EF03, 0xEB);
                    patch(0x150981, 0xeb, 0x02);
                    patch(0x1509fe, 0xeb, 0x02);
                    patch(0x151597, 0xeb, 0x02);
                    patch(0x151647, 0xeb, 0x02);
                    patch(0x151748, 0xeb, 0x02);
                    patch(0x1BED19, 0xeb, 0x02);
                    patch(0x314A9E, 0xeb, 0x02);
                    patch(0x21EAD4, 0xEB);
                    patch(0x21EAE8, 0x03);
                }
                if(this.checkBox3.IsChecked==true)
                {
                    //大地图显示隐形
                    patch(0x17d4c2, new byte[] { 0x90, 0x90 });
                    patch(0x17D4CC, new byte[] { 0xeb, 0x00, 0xeb, 0x00, 0x75, 0x30 });
                }
                if(this.checkBox4.IsChecked==true)
                {
                    //分辨幻想
                    patch(0x1acffc, new byte[] { 0x40, 0xc3 });
                }
                if(this.checkBox5.IsChecked==true)
                {
                    //显示神符
                    patch(0x2a07c5, new byte[] { 0x49, 0x4b, 0x33, 0xdb, 0x33, 0xc9 });
                }
                if(this.checkBox6.IsChecked==true)
                {
                    //去除迷雾
                    patch(0x147C53, 0xec);//",0xEC");
                }
                if(this.checkBox7.IsChecked==true)
                {
                    //显示单位
                    patch(0x1491a8, 0x00);
                    
                }
                if(this.checkBox8.IsChecked==true)
                {
                    //显示隐形
                    patch(0x1494e0, new byte[] { 0x33, 0xc0, 0x0f, 0x85 });
                }
                if(this.checkBox9.IsChecked==true)
                {
                    //敌方信号
                    patch(0x321CC4, 0x39, 0xc0, 0x0f, 0x85);
                    patch(0x321CD7, 0x39, 0xc0, 0x75);
                }
                if(this.checkBox10.IsChecked==true)
                {
                    //他人提示
                    patch(0x124ddd, 0x39, 0xc0, 0x0f, 0x85);
                }
                if (this.checkBox11.IsChecked == true)
                {
                    //显示血条
                    patch(0x17F133, 0xeb);
                    patch(0x17F150, 0xeb);
                }
                if (this.checkBox12.IsChecked == true)
                {
                    //敌方头像
                    patch(0x137BA5, 0xE7, 0x7D);
                    patch(0x137BAC, 0x85, 0xA3, 0x02, 0x00, 0x00, 0xEB, 0xCE, 0x90, 0x90, 0x90, 0x90);
                }
                if (this.checkBox13.IsChecked == true)
                {
                    ////////////////////////////////////////////////视野外点选
                    patch(0x1bd5a7, new byte[] { 0x90, 0x90 });
                    patch(0x1bd5bb, new byte[] { 0xeb });
                    //视野外显学
                    patch(0x166e5e, new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 });
                    patch(0x16fe0a, new byte[] { 0x33, 0xc0, 0x90, 0x90 });
                }
                if (this.checkBox14.IsChecked == true)
                {
                    //允许交易
                    patch(0x127b3d, 0x40, 0xb8, 0x64);
                }
                if (this.checkBox15.IsChecked == true)
                {
                    //顶显资源
                    patch(0x406B53, 0x90, 0x8b, 0x9);
                    patch(0x1509FE, 0xeb, 0x2);
                    patch(0x151597, 0xeb, 0x2);
                    patch(0x151647, 0xeb, 0x2);
                    patch(0x151748, 0xeb, 0x2);
                    patch(0x1BED19, 0xeb, 0x2);
                    //建筑显资
                    patch(0x13EF03, 0xeb);//恢复: 75
                }
                if (this.checkBox16.IsChecked == true)
                {
                    //控制单位
                }
                if (this.checkBox17.IsChecked == true)
                {
                    //交换物品
                }
                if (this.checkBox18.IsChecked == true)
                {
                    //防秒开始
                    patch(0x704BB0, 0x83, 0xf9, 0x00, 0x0f, 0x85, 0x3, 0x0, 0x0, 0x0, 0x6a, 0x3, 0x59, 0x83, 0xf9, 0x12, 0xf, 0x87, 0xef, 0x87, 0x83, 0xff, 0xe9, 0x4b, 0x86, 0xb3, 0xff);
                    patch(0x23D20C, 0xe9, 0x9f, 0x79, 0x4c, 0x00);
                }
                if (this.checkBox19.IsChecked == true)
                {
                    //无线取消
                    patch(0x23d60f, 0xeb);
                    patch(0x21ead4, 0x03);
                    patch(0x21eae8, 0x03);
                }
                if (this.checkBox20.IsChecked == true)//他人选框
                {
                }
                if (this.checkBox21.IsChecked == true)// 过-AH
                {
                    patch(0x2c240c, new byte[] { 0x3c, 0x4c, 0x74, 0x04, 0xb0, 0xff, 0xeb, 0x04, 0xb0, 0xb0, 0x90, 0x90 });
                    patch(0x2d34ed, 0xe9, 0xb3, 0x00, 0x00, 0x00, 0x90);
                }
                if (this.checkBox22.IsChecked == true)// 过-MH 真三类
                {
                    patch(0x2C5A7E, 0x90, 0x90);
                }
                if (this.checkBox23.IsChecked == true)//过信长 -TEST
                {
                }
                if (this.checkBox24.IsChecked == true)//过IMBA
                {
                }
                if (this.checkBox25.IsChecked == true)//加强
                {
                }
                API.CloseHandle(PinballHandle); //关闭进程
            }
            public void MH120Eoff()
            {
                
                PinballHandle = API.OpenProcess(0x1F0FFF, 0, (UInt32)WarPid);  //PROCESS_ALL_ACCESS=0x1F0FFF 调试级权限打开进程
                //大地图
                patch(0x2A0930, new byte[] { 0xc9 });
                patch(0x406B53, new byte[] { 0x8b, 0x49, 0x08 });
                patch(0x17d4c2, new byte[] { 0x75, 0x0e });
                patch(0x17D4CC, new byte[] { 0x0f, 0x85, 0xb0 });
                patch(0x17D4d0, 0x00, 0x00);
                patch(0x1bd5a7, new byte[] { 0x74, 0x2e });
                patch(0x1bd5bb, new byte[] { 0x75 });
                patch(0x166e5e, new byte[] { 0x85, 0xc0, 0x0f, 0x84, 0xbb, 0x03, 0x00, 0x00 });
                patch(0x16fe0a, new byte[] { 0x85 });
                patch(0x16fe0c, new byte[] { 0x74, 0x78 });
                patch(0x1acffc, new byte[] { 0x00, 0x00 });
                patch(0x2a07c5, new byte[] { 0x8b, 0x59, 0x14, 0x8b, 0x49, 0x10 });
                //小地图
                patch(0x1491a8, 0x01);
                patch(0x1494e0, 0x85);
                patch(0x1494e3, 0x84);
                patch(0x147C53, 0xe4);
                //显血
                patch(0x17F133, 0x75);
                patch(0x17F150, 0x75);
                //辅助
                //显示技能
                patch(0x12dc1a, 0x74, 0x08);
                patch(0x12dc5a, 0x74, 0x08);
                patch(0x1bfabe, 0x75);
                patch(0x442cc0, 0x0f, 0x84, 0xdc, 0x00, 0x00, 0x00);
                patch(0x443375, 0x74, 0x1e);
                patch(0x45a641, 0x0f, 0x84, 0x60, 0x01, 0x00, 0x00);
                patch(0x45e79e, 0x0f, 0x84, 0x26, 0x01, 0x00, 0x00);
                patch(0x466527, 0x74, 0x0f);
                patch(0x46b258, 0x0f, 0x84, 0x91, 0x00, 0x00, 0x00);
                //
                patch(0x124ddd, 0x85);
                patch(0x124de0, 0x84);
                //防秒
                patch(0x23D20C, 0x83, 0xf9, 0x12, 0xf, 0x87);
                //顶端资源
                patch(0x406B53, 0x8b, 0x49, 0xb);
                patch(0x1509FE, 0x85, 0xc0);
                patch(0x151597, 0x85, 0xc0);
                patch(0x151647, 0x85, 0xc0);
                patch(0x151748, 0x85, 0xc0);
                patch(0x1BED19, 0x85, 0xc0);
                //过MH
                patch(0x2c5a7e, new byte[] { 0xeb, 0x0d });
                patch(0x2dd4b0, new byte[] { 0x55, 0x8b, 0xec });
                patch(0x2C5AB0, 0x55);
                API.CloseHandle(PinballHandle); //关闭进程
            }
            public void MH124Bon()
            {
                PinballHandle = API.OpenProcess(0x1F0FFF, 0, (UInt32)WarPid);  //PROCESS_ALL_ACCESS=0x1F0FFF 调试级权限打开进程
                if (this.checkBox1.IsChecked == true)//// 大地图去除迷雾
                {
                    patch(0x74D103, new byte[] { 0xc6, 0x04, 0x3e, 0x01, 0x90, 0x46 });
                }
                if (this.checkBox2.IsChecked == true)////大地图显示单位
                {
                    patch(0x3A201B, new byte[] { 0x33 });
                    //资源面板
                    patch(0x3604CA, 0x90, 0x90);
                    patch(0x150981, 0xEB, 0x02);
                    patch(0x1509FE, 0xEB, 0x02);
                    patch(0x151597, 0xEB, 0x02);
                    patch(0x151647, 0xEB, 0x02);
                    patch(0x151748, 0xEB, 0x02);
                    patch(0x1BED19, 0xEB, 0x02);
                    patch(0x314A9E, 0xEB, 0x02);
                    patch(0x21EAD4, 0xEB);
                    patch(0x21EAE8, 0x3);
                    //显示技能
                    patch(0x28EC8E, 0xEB);
                    patch(0x20318C, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90);
                    patch(0x34FD28, 0x90, 0x90);
                    patch(0x34FD66, 0x90, 0x90, 0x90, 0x90);
                }
                if (this.checkBox3.IsChecked == true)//大地图显示隐形
                {
                    patch(0x3622D1, new byte[] { 0x3b });
                    patch(0x3622D4, new byte[] { 0x85 });
                    patch(0x39A45B, new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 });
                    patch(0x39A46E, new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x33, 0xc0, 0x40 });
                }
                if (this.checkBox4.IsChecked == true)////分辨幻想
                {
                    patch(0x28351C, new byte[] { 0x40, 0xc3 });
                }
                if (this.checkBox5.IsChecked == true)////显示神符
                {
                    patch(0x4076CA, new byte[] { 0x90, 0x90 });
                    patch(0x3A1F5B, new byte[] { 0xeb });
                }
                if (this.checkBox6.IsChecked == true)////小地图去迷雾
                {
                    patch(0x356FA5, new byte[] { 0x90, 0x90 });
                    patch(0x356FA5, new byte[] { 0x90, 0x90 });
                }
                if (this.checkBox7.IsChecked == true)////小地图显示单位
                {
                    patch(0x361EAB, 0x90, 0x90, 0x39, 0x5E, 0x10, 0x90, 0x90, 0xB8, 0x00, 0x00, 0x00, 0x00, 0xEB, 0x07);
                }
                if (this.checkBox8.IsChecked == true)////小地图显示隐形
                {
                    patch(0x361EBC, 0x00);
                }
                if (this.checkBox9.IsChecked == true)////敌方信号
                {
                    patch(0x43F956, 0x3B);
                    patch(0x43F959, 0x85);
                    patch(0x43F969, 0x3B);
                    patch(0x43F96C, 0x85);
                }
                if (this.checkBox10.IsChecked == true)////他人提示
                {
                    patch(0x334529, 0x39, 0xC0, 0x0F, 0x85);
                }
                if (this.checkBox11.IsChecked == true)////显示血条
                {
                    patch(0x39BE1D, 0x75, 0x05);
                    patch(0x39BE3A, 0x75, 0x05);
                }
                if (this.checkBox12.IsChecked == true)////敌方头像
                {
                    patch(0x371640, 0xE8, 0x3B, 0x28, 0x03, 0x00, 0x85, 0xC0, 0x0F, 0x85, 0x8F, 0x02, 0x00, 0x00, 0xEB, 0xC9, 0x90, 0x90, 0x90, 0x90);
                }
                if (this.checkBox13.IsChecked == true)////视野外点选
                {
                    patch(0x285C4C, 0x90, 0x90);
                    patch(0x285C62, 0xEB);
                }
                if (this.checkBox14.IsChecked == true)////允许交易
                {
                    patch(0x34E822, 0xB8, 0xE0, 0x03, 0x00);
                    patch(0x34E827, 0x90);
                    patch(0x34E82A, 0xB8, 0x64, 0x90, 0x90);
                    patch(0x34E82F, 0x90);
                }
                if (this.checkBox15.IsChecked == true)////顶显资源
                {
                    //顶显资源
                    patch(0x359A2D, 0xeb, 0x02);
                    patch(0x35A11F, 0xeb, 0x02);
                    patch(0x35A1DF, 0xeb, 0x02);
                    patch(0x35A310, 0xeb, 0x02);
                    patch(0x28EA8A, 0xeb, 0x02);
                    //建显资源
                    patch(0x3604C4, 0xeb);//恢复: 75
                }
                if (this.checkBox16.IsChecked == true)////控制单位
                {
                }
                if (this.checkBox17.IsChecked == true)////交换物品
                {
                }
                if (this.checkBox18.IsChecked == true)////防秒
                {
                    patch(0x87EEFC, 0x83, 0xf9, 0x00, 0x75, 0x03, 0x6a, 0x03, 0x59, 0x83, 0xf9, 0x12, 0x0f, 0x87, 0xb5, 0x85, 0xd3, 0xff, 0xe9, 0x21, 0x84, 0xd3, 0xff);
                    patch(0x5b732a, 0xe9, 0xcd, 0x7B, 0x2c, 0x00);
                }
                if (this.checkBox19.IsChecked == true)////无限取消
                {
                    patch(0x57B9FC, 0xEB);
                    patch(0x5B2CC7, 0x03);
                    patch(0x5B2CDB, 0x03);
                }
                if (this.checkBox20.IsChecked == true)////他人选框
                {
                }
                if (this.checkBox21.IsChecked == true)////AH
                {
                    patch(0x3C6E1C, 0xB8, 0xFF, 0x00, 0x00, 0x00, 0xEB);
                    patch(0x3CC2F2, 0xEB);
                }
                if (this.checkBox22.IsChecked == true)////MH
                {
                    patch(0x3C8407, 0xEB, 0x11);
                    patch(0x3C8427, 0xEB, 0x11);
                }
                if (this.checkBox23.IsChecked == true)////TEST
                {
                }
                if (this.checkBox24.IsChecked == true)////IMBA
                {
                }
                if (this.checkBox25.IsChecked == true)////他人选框
                {
                }
                API.CloseHandle(PinballHandle); //关闭进程
            }
            public void MH124Boff()
            {
                PinballHandle = API.OpenProcess(0x1F0FFF, 0, (UInt32)WarPid);  //PROCESS_ALL_ACCESS=0x1F0FFF 调试级权限打开进程
                //大地图显示单位
                patch(0x3A201D, 0x75);
                //大地图去迷雾
                patch(0x74D103, 0x88, 0x14);
                patch(0x74D106, 0x83, 0xC6, 0x01);
                //大地图显示隐形
                patch(0x3622D1, 0x85);
                patch(0x3622D4, 0x84);
                patch(0x39A45B, 0x8B, 0x97, 0x98, 0x01, 0x00, 0x00);
                patch(0x39A46E, 0x0F, 0xB7, 0x00, 0x55, 0x50, 0x56, 0xE8, 0xF7, 0x7B, 0x00, 0x00);
                //视野外点选
                patch(0x285C4C, 0x74, 0x2A);
                patch(0x285C62, 0x75);
                //分辨幻象
                patch(0x28351C, 0xC3, 0xCC);
                //显示神符
                patch(0x4076CA, 0x75, 0x0A);
                patch(0x3A1F5B, 0x75);
                //小地图显示单位
                patch(0x361EAB, 0x75, 0x0C);
                patch(0x361EB0, 0x75, 0x07, 0xB9, 0x01);
                patch(0x361EB8, 0x02);
                //小地图显示隐形
                patch(0x361EBC, 0x01);
                //小地图去除迷雾
                patch(0x356FA5, 0x88, 0x01);
                //资源面板
                patch(0x3604CA, 0xEB, 0x08);
                //显血
                patch(0x39BE1D, 0x74, 0x05);
                patch(0x39BE3A, 0x74, 0x05);
                //无限取消
                patch(0x57B9FC, 0x7A);
                patch(0x5B2CC7, 0x00);
                patch(0x5B2CDB, 0x01);
                //允许交易
                patch(0x34E822, 0x8B, 0x87, 0x6C, 0x01);
                patch(0x34E827, 0x00);
                patch(0x34E82A, 0x8B, 0x87, 0x68, 0x01);
                patch(0x34E82F, 0x00);
                //显示技能
                patch(0x28EC8E, 0x75);
                patch(0x20318C, 0x0F, 0x84, 0x5F, 0x01, 0x00, 0x00);
                patch(0x34FD28, 0x74, 0x08);
                patch(0x34FD66, 0x85, 0xC0, 0x74, 0x08);
                //他人提示
                patch(0x334529, 0x85);
                patch(0x33452C, 0x84);
                //敌方信号
                patch(0x43F956, 0x85);
                patch(0x43F959, 0x84);
                patch(0x43F969, 0x85);
                patch(0x43F96C, 0x84);
                //防秒
                patch(0x5b732a, 0x83, 0xf9, 0x12, 0x0f, 0x87);
                //顶显资源
                patch(0x359A2D, 0x85, 0xc0);
                patch(0x35A11F, 0x85, 0xc0);
                patch(0x35A1DF, 0x85, 0xc0);
                patch(0x35A310, 0x85, 0xc0);
                patch(0x28EA8A, 0x85, 0xc0);
                //过-MH
                patch(0x3C8407, 0x6A, 0x00);
                patch(0x3C8427, 0x6A, 0x00);
                //过-ah
                patch(0x3C6E1C, 0x3D);
                patch(0x3C6E21, 0x76);
                patch(0x3CC2F2, 0x74);
                //
                //patch(0x6F3BC5E0, 0x8b, 0x0d, 0x4c, 0xd4, 0xac, 0x6f);
                patch(0x3b51c0, new byte[] { 0x33, 0xd2 });
                patch(0x3c6c21, new byte[] { 0x8b, 0x44, 0x24, 0x08 });
                patch(0x3b4300, new byte[] { 0x33, 0xd2 });
                API.CloseHandle(PinballHandle); //关闭进程
            }
            public void MH124Eon()
            {
                PinballHandle = API.OpenProcess(0x1F0FFF, 0, (UInt32)WarPid);  //PROCESS_ALL_ACCESS=0x1F0FFF 调试级权限打开进程
                if (this.checkBox1.IsChecked == true)////大地图迷雾
                {
                    patch(0x74D1B9, new byte[] { 0xb2, 0x00, 0x90, 0x90, 0x90, 0x90 });
                }
                if (this.checkBox2.IsChecked == true)////大地图单位
                {
                    ////大地图显示单位
                    patch(0x39EBBC, new byte[] { 0x70 });
                    patch(0x3A2030, new byte[] { 0x90, 0x90 });
                    //                patch(0x3A20DB, new byte[] { 0x90,0x90 });
                    patch(0x3A20D2, 0xE9, 0x04, 0xCF, 0x4D, 0x00, 0x90); //2
                    patch(0x87EFDB, 0x0f, 0xb7, 0x32, 0x0f, 0xb7, 0xce, 0x0f, 0xb7, 0xd0, 0xe9, 0xf4, 0x30, 0xb2, 0xff, 0x90); //2
                    //显示技能
                    patch(0x2031EC, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90);
                    patch(0x34FDE8, 0x90, 0x90);
                    //技能CD
                    patch(0x28ECFE, 0xeb);
                    patch(0x34FE26, 0x90, 0x90, 0x90, 0x90);
                }
                if (this.checkBox3.IsChecked == true)////大地图显示隐形
                {
                    //大地图显示隐形
                    //patch(0x356FFE, new byte[] { 0x90, 0x90,0x90 });
                    patch(0x362391, new byte[] { 0x3b });
                    patch(0x362394, new byte[] { 0x85 });
                    patch(0x39A51B, new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 });
                    patch(0x39A52E, new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x33, 0xc0, 0x40 });
                }
                if (this.checkBox4.IsChecked == true)////分辨幻影
                {
                    //分辨幻象
                    patch(0x28357C, new byte[] { 0x40, 0xc3 });
                }
                if (this.checkBox5.IsChecked == true)////显示神符
                {
                    //显示物品
                    patch(0x3A201B, new byte[] { 0xeb });
                    patch(0x40A864, new byte[] { 0x90, 0x90 });
                }
                if (this.checkBox6.IsChecked == true)////小地图去除迷雾
                {
                    patch(0x357065, 0x90, 0x90);//",0xEC");
                }
                if (this.checkBox7.IsChecked == true)//小地图显示单位
                {
                    //patch(0x361F7C, 0x00);
                    patch(0x361F80, 0x33, 0xc0);
                }
                if (this.checkBox8.IsChecked == true)//
                {
                }
                if (this.checkBox9.IsChecked == true)//敌方信号
                {
                    patch(0x43F9A6, 0x3b);
                    patch(0x43F9A9, 0x85);
                    patch(0x43F9B9, 0x3b);
                    patch(0x43F9BC, 0x85);
                }
                if (this.checkBox10.IsChecked == true)//他人提示
                {
                    patch(0x3345E9, 0x39, 0xc0, 0x0f, 0x85);
                }
                if (this.checkBox11.IsChecked == true)//显示血条
                {
                    patch(0x39BEDD, 0x75, 0x05);
                    patch(0x39BEFA, 0x75, 0x05);
                }
                if (this.checkBox12.IsChecked == true)//敌方头像
                {
                    patch(0x371700, 0xE8, 0x3B, 0x28, 0x03, 0x00, 0x85, 0xC0, 0x0F, 0x85, 0x8F, 0x02, 0x00, 0x00, 0xEB, 0xC9, 0x90, 0x90, 0x90, 0x90);  
                }
                if (this.checkBox13.IsChecked == true)//视野外点选
                {
                    ////////////////////////////////////////////////视野外点选
                    patch(0x285CBC, new byte[] { 0x90, 0x90 });
                    patch(0x285CD2, new byte[] { 0xeb });
                    //视野外显学
                    patch(0x166e5e, new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 });
                    patch(0x16fe0a, new byte[] { 0x33, 0xc0, 0x90, 0x90 });
                }
                if (this.checkBox14.IsChecked == true)//允许交易
                {
                    patch(0x34E8E2, 0xb8, 0xc8, 0x00, 0x00);
                    patch(0x34E8E7, 0x90);
                    patch(0x34E8EA, 0xb8, 0x64, 0x00, 0x00);
                    patch(0x34E8EF, 0x90);
                }
                if (this.checkBox15.IsChecked == true)//顶显资源
                {
                    //顶显资源
                    patch(0x359AED, 0xeb, 0x02); //恢复:85 C0
                    patch(0x35A1DF, 0xeb, 0x02);
                    patch(0x35A29F, 0xeb, 0x02);
                    patch(0x35A3D0, 0xeb, 0x02);
                    patch(0x28EAFA, 0xeb, 0x02);
                    //建显资源
                    patch(0x360584, 0xeb);//恢复: 75
                }
                if (this.checkBox16.IsChecked == true)//控制单位
                {
                }
                if (this.checkBox17.IsChecked == true)//交换物品
                {
                }
                if (this.checkBox18.IsChecked == true)//防秒
                {
                    patch(0x87EFBC, 0x83, 0xf9, 0x00, 0x75, 0x03, 0x6a, 0x03, 0x59, 0x83, 0xf9, 0x12, 0x0f, 0x87, 0xa5, 0x85, 0xd3, 0xff, 0xe9, 0x11, 0x84, 0xd3, 0xff);
                    patch(0x5b73da, 0xe9, 0xdd, 0x7B, 0x2c, 0x00); //恢复:83 F9 12 F 87
                }
                if (this.checkBox19.IsChecked == true)//无限取消
                {
                    patch(0x57BA7C, 0xeb);
                    patch(0x5B2D77, 0x03);
                    patch(0x5B2D8B, 0x03);
                }
                if (this.checkBox20.IsChecked == true)//他人选框
                {
                }
                if (this.checkBox21.IsChecked == true)//-AH
                {
                    patch(0x3C6EDC, new byte[] { 0x3c, 0x4c, 0x74, 0x04, 0xb0, 0xff, 0xeb, 0x04, 0xb0, 0xb0, 0x90, 0x90 });
                    patch(0x3CC3B2, 0xe9, 0xb3, 0x00, 0x00, 0x00, 0x90);
                }
                if (this.checkBox22.IsChecked == true)////过真三类-MH
                {
                    patch(0x3C84C7, 0xEB, 0x11);
                    patch(0x3C84E7, 0xEB, 0x11);
                }
                if (this.checkBox23.IsChecked == true)//过信长类
                {
                }
                if (this.checkBox24.IsChecked == true)//过IMBA类
                {
                }
                if (this.checkBox25.IsChecked == true)//在加强
                {
                }
    
                API.CloseHandle(PinballHandle); //关闭进程
            }
            public void MH124Eoff()
            {
                PinballHandle = API.OpenProcess(0x1F0FFF, 0, (UInt32)WarPid);  //PROCESS_ALL_ACCESS=0x1F0FFF 调试级权限打开进程
                //大地图
                patch(0x39EBBC, new byte[] { 0x74 });
                patch(0x3A2030, new byte[] { 0xeb, 0x09 });
                //patch(0x3A20DB, new byte[] { 0x23, 0xca });
                patch(0x3A20D2, 0x0f, 0xb7, 0x32, 0x0f, 0xb7, 0xce); //2
                patch(0x87EFDB, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
                patch(0x74D1B9, new byte[] { 0x8a, 0x90 });//,0x6c,0x7e,0xab,0x6f}); //大地图迷雾
                patch(0x362391, new byte[] { 0x85 });
                patch(0x362394, new byte[] { 0x84 });
                patch(0x39A51B, new byte[] { 0x8b, 0x97, 0x98, 0x01, 0x00, 0x00 });
                patch(0x39A52E, new byte[] { 0x0f, 0xb7, 0x00, 0x55, 0x50, 0x56, 0xe8, 0xf7, 0x7b, 0x00, 0x00 });
                patch(0x285CBC, new byte[] { 0x74, 0x2a });
                patch(0x285CD2, new byte[] { 0x75 });
                patch(0x28357C, new byte[] { 0xc3, 0xcc });
                patch(0x3A201B, new byte[] { 0x75 });
                patch(0x40A864, new byte[] { 0x75, 0x0a });
                //小地图
                //patch(0x361F7C, 0x01);   //显示单位
                patch(0x361F80, 0xd3, 0xe8);
                patch(0x357065, 0x88, 0x01);
                patch(0x43F9A6, 0x85);
                patch(0x43F9A9, 0x84);
                patch(0x43F9B9, 0x85);
                patch(0x43F9BC, 0x84);
                //显血
                patch(0x39BEDD, 0x74, 0x05);
                patch(0x39BEFA, 0x74, 0x05);
                //辅助
                patch(0x2031EC, 0x0f, 0x84, 0x5f, 0x01, 0x00, 0x00);
                patch(0x34E8E7, 0x00);
                patch(0x34E8EA, 0x8B, 0x87, 0x68, 0x01);
                patch(0x34E8EF, 0x00);
                patch(0x3345E9, 0x85);
                patch(0x3345EC, 0x84);
                patch(0x34E8E2, 0x8b, 0x87, 0x6c, 0x01);
                patch(0x34FDE8, 0x74, 0x08);
                patch(0x28ECFE, 0x75);
                patch(0x34FE26, 0x85, 0xc0, 0x74, 0x08);
                //防秒开始
                patch(0x5b73da, 0x83, 0xf9, 0x12, 0x0f, 0x87);
                //顶显资源
                patch(0x359AED, 0x85, 0xc0);
                patch(0x35A1DF, 0x85, 0xc0);
                patch(0x35A29F, 0x85, 0xc0);
                patch(0x35A3D0, 0x85, 0xc0);
                patch(0x28EAFA, 0x85, 0xc0);
                //过检测
                //-MH
                patch(0x3C84C7, 0x6A, 0x00);
                patch(0x3C84E7, 0x6A, 0x00);
                //PanCameraToTimed
                patch(0x3B5280, new byte[] { 0x33, 0xd2 });
                //SetUnitAnimation
                patch(0x3c6ce0, new byte[] { 0x8b });
                //SetUserControlForceOff
                patch(0x3b43c0, new byte[] { 0x33, 0xd2 });
                //SelectUnit
                patch(0x3c84C7, new byte[] { 0x6a, 0x00 });
                patch(0x3C84E7, new byte[] { 0x6a, 0x00 });
                //ClearSelection
                //patch(0x2C5AB0, 0x55);
                patch(0x3BC5E0, 0xc3);
                API.CloseHandle(PinballHandle); //关闭进程
            }
            public void patch(int lpBaseAddress, params byte[] Buffer)//写内存Patch
            {
                int RealSize;
                bool result = API.WriteProcessMemory(PinballHandle, GamedllAddress + lpBaseAddress, Buffer, Buffer.Length, out RealSize);
            }
            private void checkBox30_Checked(object sender, RoutedEventArgs e)
            {
                if (checkBox30.IsChecked == true)
                {
                    ZDIsChecked = true;
                }
                else
                {
                    ZDIsChecked = false;
                }
            }
            private void checkBox27_Checked(object sender, RoutedEventArgs e)
            {
                if (this.checkBox27.IsChecked == true)
                {
                    XLIsChecked = true;
                }
                else
                {
                    XLIsChecked = false;
                }
            }
            private void checkBox28_Checked(object sender, RoutedEventArgs e)
            {
                if (this.checkBox28.IsChecked == true)
                {
                    CDIsChecked = true;
                }
                else
                {
                    CDIsChecked = false;
                }
            }
            private void Window_Unloaded(object sender, RoutedEventArgs e)
            {
                
            }
            private void Window_Closed(object sender, EventArgs e)
            {
                API.Casunload();
                System.Environment.Exit(System.Environment.ExitCode);
                this.Close();
            }
        }
    }

  2. #2
    hds.4rg is offline Newbie
    Array
    Join Date
    Oct 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    6
    Reputation
    1
    chinese comments on english forum?
    nobody understant it, that's why i can say: "holy crap, all of this code - without any comments >.<"
    nevertheless - nice work

  3. #3
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    Is it C# or what?

  4. #4
    Sosha's Avatar
    Sosha is offline :)



    Array
    Join Date
    Oct 2011
    Location
    Iran
    Posts
    517
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    12
    Reputation
    1008
    hmmm , it should be C#

  5. #5
    JoeBlack2060's Avatar
    JoeBlack2060 is offline Hacker
    Array
    Join Date
    Mar 2011
    Location
    California
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    7
    Reputation
    35
    Nice work man!
    I knew that chinese people work hard and fast (and cheap ) but this is good.

  6. #6
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    I knew that chinese people work hard and fast (and cheap ) but this is good.
    Agree.

    Dude post it compiled here, if it's working.

  7. #7
    ZeD's Avatar
    ZeD
    ZeD is offline RoR 0x266E


    Array
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    1,440
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    14
    Reputation
    698
    deleted.

Similar Threads

  1. New beginner wants buy help D:
    By aceeca in forum WoW Private Servers
    Replies: 2
    Last Post: 10-22-2011, 10:42 PM
  2. Cheap WOW Gold On Sale (coupon code = wow)
    By Georgia8 in forum Say Hello
    Replies: 4
    Last Post: 05-12-2011, 12:33 PM
  3. Beginner Tutorial
    By Spindrift23 in forum GFX Tutorials
    Replies: 5
    Last Post: 02-18-2011, 01:49 AM
  4. [Tutorial] Hallowsend's Beginner CSS
    By Hallowsend in forum Development
    Replies: 14
    Last Post: 06-20-2009, 03:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •