Пример #1
0
        public void Run(MemoryReader reader, IpcChannel channel)
        {
            var o1 = reader.FindOffset(_pattern1).Cast <int?>().FirstOrDefault();
            var o2 = reader.FindOffset(_pattern2).Cast <int?>().FirstOrDefault();

            if (o1 == null || o2 == null)
            {
                channel.LogError("Could not find version reporting function");
                return;
            }

            var ver1 = ReadVersion(reader, _pattern1, (int)o1);
            var ver2 = ReadVersion(reader, _pattern2, (int)o2);

            if (ver1 == null || ver2 == null)
            {
                channel.LogError("Could not read version values");
                return;
            }

            channel.LogBasic("Found client versions: {0}, {1}", ver1, ver2);

            channel.Version1 = ver1;
            channel.Version2 = ver2;
        }
Пример #2
0
        public unsafe void Run(MemoryReader reader, IpcChannel channel)
        {
            var o = reader.FindOffset(_patterns).Cast <int?>().FirstOrDefault();

            if (o == null)
            {
                channel.LogError("Could not find game message name function");
                return;
            }

            var func = reader.GetDelegate <GetMessageNameFunc>((int)o);
            var list = new List <Tuple <ushort, string> >();

            for (ushort i = 0; i < ushort.MaxValue; i++)
            {
                string s;

                if ((s = Marshal.PtrToStringAnsi(func(i))) != string.Empty)
                {
                    list.Add(Tuple.Create(i, s));
                }
            }

            channel.LogBasic("Found {0} opcodes", list.Count);

            channel.GameMessages = list;
        }
Пример #3
0
        public void Run(MemoryReader reader, IpcChannel channel)
        {
            var o = reader.FindOffset(_pattern).Cast <int?>().FirstOrDefault();

            if (o == null)
            {
                channel.LogError("Could not find data center decryption function");
                return;
            }

            var off = (int)o + _pattern.Length;

            using (var disasm = new Disassembler(reader.ToAbsolute(off),
                                                 reader.Length - off, ArchitectureMode.x86_32,
                                                 (ulong)reader.BaseAddress))
            {
                var key = ReadKey(disasm);
                var iv  = ReadKey(disasm);

                if (key == null || iv == null)
                {
                    channel.LogError("Could not find data center key/IV");
                    return;
                }

                channel.LogBasic("Found data center key: {0}", StringizeKey(key));
                channel.LogBasic("Found data center IV: {0}", StringizeKey(iv));

                channel.DataCenterKey = key;
                channel.DataCenterIV  = iv;
            }
        }
Пример #4
0
        public void Run(MemoryReader reader, IpcChannel channel)
        {
            var o = reader.FindOffset(_pattern).Cast <int?>().FirstOrDefault();

            if (o == null)
            {
                channel.LogError("Could not find system message table");
                return;
            }

            var count = reader.ReadUInt32((int)o + _pattern.TakeWhile(x => x != null).Count());
            var func  = reader.GetDelegate <GetMessageNameFunc>((int)o);
            var list  = new List <Tuple <ushort, string> >();

            for (ushort i = 0; i < count; i++)
            {
                list.Add(Tuple.Create(i, Marshal.PtrToStringUni(func(i))));
            }

            channel.LogBasic("Found {0} system messages", list.Count);

            channel.SystemMessages = list;
        }