public static string ReadString(this Process process, IntPtr addr, StringEnumType type, int size, bool swap = false, string default_ = null)
        {
            string str;

            if (!process.ReadString(addr, type, size, out str, swap))
            {
                return(default_);
            }

            return(str);
        }
        public static bool ReadString(this Process process, IntPtr addr, StringEnumType type, int size, out string value, bool swap = false)
        {
            var    bytes = new byte[size];
            IntPtr read  = IntPtr.Zero;

            value = null;

            if (!NativeWrappers.ReadProcessMemory(process.Handle, addr, bytes, size, out read))
            {
                return(false);
            }

            if (swap)
            {
                Array.Reverse(bytes);
            }

            if (type == StringEnumType.AutoDetect)
            {
                if (read.ToInt64() >= 2 && bytes[1] == '\x0')
                {
                    value = Encoding.Unicode.GetString(bytes);
                }
                else
                {
                    value = Encoding.UTF8.GetString(bytes);
                }
            }
            else if (type == StringEnumType.UTF8)
            {
                value = Encoding.UTF8.GetString(bytes);
            }
            else if (type == StringEnumType.UTF16)
            {
                value = Encoding.Unicode.GetString(bytes);
            }
            else
            {
                value = Encoding.ASCII.GetString(bytes);
            }

            return(true);
        }