Example #1
0
        public static void Set(string tag)
        {
            if (Address == IntPtr.Zero)
            {
                Allocator alloc = new Allocator();
                Address = alloc.Alloc(Size);
                alloc.Free();

                if (Address == IntPtr.Zero)
                {
                    return;
                }

                Buffer.BlockCopy(BitConverter.GetBytes((int)(Address + 18)), 0, Shellcode, 1, 4);
                Buffer.BlockCopy(BitConverter.GetBytes((int)(Address + 18)), 0, Shellcode, 6, 4);
                Buffer.BlockCopy(BitConverter.GetBytes(Memory.Engine + signatures.dwSetClanTag), 0, Shellcode, 11, 4);
            }

            if (!LocalPlayer.InGame)
            {
                return;
            }

            byte[] tag_bytes = Encoding.UTF8.GetBytes(tag + "\0");
            byte[] reset     = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

            Buffer.BlockCopy(reset, 0, Shellcode, 18, reset.Length);
            Buffer.BlockCopy(tag_bytes, 0, Shellcode, 18, tag.Length > 15 ? 15 : tag.Length);
            CreateThread.Create(Address, Shellcode);
        }
 public override unsafe void Free(void *pointer)
 {
     _allocator.Free(pointer);
 }
Example #3
0
 private static void MemFreeCallback(IntPtr memory) => Allocator.Free(memory);