internal unsafe object GetValue(string valName) { object obj2 = null; int lpType = 0; int lpcbData = 0; if (SafeNativeMethods.RegQueryValueEx(this, valName, null, ref lpType, null, ref lpcbData) != 0) { return obj2; } byte[] lpData = new byte[lpcbData]; if (SafeNativeMethods.RegQueryValueEx(this, valName, null, ref lpType, lpData, ref lpcbData) != 0) { return obj2; } string str = new UnicodeEncoding().GetString(lpData); switch (lpType) { case 1: case 2: return str.Trim(new char[1]); case 3: return lpData; case 4: fixed (byte* numRef = lpData) { obj2 = Marshal.ReadInt32((IntPtr) numRef); } return obj2; case 5: case 6: case 8: case 9: case 10: return lpData; case 7: { char[] separator = new char[1]; return str.Split(separator, StringSplitOptions.RemoveEmptyEntries); } case 11: byte[] buffer3; if (((buffer3 = lpData) != null) && (buffer3.Length != 0)) { fixed (byte* numRef2 = buffer3) { Label_00F6: obj2 = Marshal.ReadInt64((IntPtr) numRef2); } return obj2; } numRef2 = null; goto Label_00F6; } return lpData; }