namespace PixelSecurity.Core.SecuredTypes
{

	// [TypeInfo RVA: 0x0]
	public sealed struct SecuredBool : ValueType
	{
		private static byte _cryptoKey; // 0x0
		private byte currentCryptoKey; // 0x10
		private int hiddenValue; // 0x14
		private bool fakeValue; // 0x18
		private bool fakeValueChanged; // 0x19
		private bool inited; // 0x1A

		// RVA: 0x329AD70 VA: 0x7818985D70
		private void .ctor(int value);
		/*
		 *   undefined1 uVar1;
		 *   undefined *puVar2;
		 *   long lVar3;
		 *   undefined1 *puVar4;
		 *
		 *   puVar2 = PTR_DAT_070c6620;
		 *   if ((bRam000000000754adb5 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adb5 = 1;
		 *   }
		 *   lVar3 = *(long *)puVar2;
		 *   if (*(int *)(lVar3 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *     lVar3 = *(long *)puVar2;
		 *   }
		 *   puVar4 = *(undefined1 **)(lVar3 + 0xb8);
		 *   *(int *)&this.field_0x4 = value;
		 *   this.field_0xa = 1;
		 *   uVar1 = *puVar4;
		 *   *(undefined2 *)&this.field_0x8 = 0;
		 *   *(undefined1 *)this = uVar1;
		 *   return;
		 */
		// RVA: 0x329ADEC VA: 0x7818985DEC
		public static void SetCryptoKey(byte cryptoKey);
		/*
		 *   undefined *puVar1;
		 *   long lVar2;
		 *   void *extraout_x1;
		 *
		 *   puVar1 = PTR_DAT_070c6620;
		 *   if ((bRam000000000754adb6 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adb6 = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   lVar2 = *(long *)puVar1;
		 *   if (*(int *)(lVar2 + 0xe4) == 0) {
		 *     func_0x031fde08(lVar2,methodInfo);
		 *     lVar2 = *(long *)puVar1;
		 *   }
		 *   **(byte **)(lVar2 + 0xb8) = cryptoKey;
		 *   return;
		 */
		// RVA: 0x329AE48 VA: 0x7818985E48
		public void ApplyNewCryptoKey();
		/*
		 *   char cVar1;
		 *   undefined *puVar2;
		 *   bool value;
		 *   int iVar3;
		 *   long lVar4;
		 *   void *extraout_x1;
		 *   void *extraout_x1_00;
		 *   void *extraout_x1_01;
		 *   void *in_x2;
		 *
		 *   puVar2 = PTR_DAT_070c6620;
		 *   if ((bRam000000000754adb7 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adb7 = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   lVar4 = *(long *)puVar2;
		 *   cVar1 = *(char *)this;
		 *   if (*(int *)(lVar4 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *     lVar4 = *(long *)puVar2;
		 *     methodInfo = extraout_x1_00;
		 *   }
		 *   if (cVar1 != **(char **)(lVar4 + 0xb8)) {
		 *     if (*(int *)(lVar4 + 0xe4) == 0) {
		 *       func_0x031fde08();
		 *       methodInfo = extraout_x1_01;
		 *     }
		 *     value = SecuredBool.InternalDecrypt(this);
		 *     iVar3 = SecuredBool.Encrypt(value,**(byte **)(*(long *)puVar2 + 0xb8));
		 *     lVar4 = *(long *)puVar2;
		 *     *(int *)&this.field_0x4 = iVar3;
		 *     *(undefined1 *)this = **(undefined1 **)(lVar4 + 0xb8);
		 *   }
		 *   return;
		 */
		// RVA: 0x329B0C0 VA: 0x78189860C0
		public static int Encrypt(bool value);
		/*
		 *   undefined *puVar1;
		 *   long lVar2;
		 *   void *extraout_x1;
		 *   uint uVar3;
		 *
		 *   puVar1 = PTR_DAT_070c6620;
		 *   if ((bRam000000000754adb8 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adb8 = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
		 *     func_0x031fde08(*(long *)puVar1,methodInfo);
		 *   }
		 *   if ((bRam000000000754adb9 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adb9 = 1;
		 *   }
		 *   puVar1 = PTR_DAT_070c6620;
		 *   lVar2 = *(long *)PTR_DAT_070c6620;
		 *   if (*(int *)(lVar2 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *     lVar2 = *(long *)puVar1;
		 *   }
		 *   uVar3 = 0xd5;
		 *   if (!value) {
		 *     uVar3 = 0xb5;
		 *   }
		 *   return uVar3 ^ **(byte **)(lVar2 + 0xb8);
		 */
		// RVA: 0x329B040 VA: 0x7818986040
		public static int Encrypt(bool value, byte key);
		/*
		 *   undefined *puVar1;
		 *   long lVar2;
		 *   uint uVar3;
		 *
		 *   if ((bRam000000000754adb9 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adb9 = 1;
		 *   }
		 *   puVar1 = PTR_DAT_070c6620;
		 *   if (key == 0) {
		 *     lVar2 = *(long *)PTR_DAT_070c6620;
		 *     if (*(int *)(lVar2 + 0xe4) == 0) {
		 *       func_0x031fde08();
		 *       lVar2 = *(long *)puVar1;
		 *     }
		 *     key = **(byte **)(lVar2 + 0xb8);
		 *   }
		 *   uVar3 = 0xd5;
		 *   if (!value) {
		 *     uVar3 = 0xb5;
		 *   }
		 *   return uVar3 ^ key;
		 */
		// RVA: 0x329B118 VA: 0x7818986118
		public static bool Decrypt(int value);
		/*
		 *   undefined *puVar1;
		 *   long lVar2;
		 *   void *extraout_x1;
		 *
		 *   puVar1 = PTR_DAT_070c6620;
		 *   if ((bRam000000000754adba & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adba = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
		 *     func_0x031fde08(*(long *)puVar1,methodInfo);
		 *   }
		 *   if ((bRam000000000754adbb & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adbb = 1;
		 *   }
		 *   puVar1 = PTR_DAT_070c6620;
		 *   lVar2 = *(long *)PTR_DAT_070c6620;
		 *   if (*(int *)(lVar2 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *     lVar2 = *(long *)puVar1;
		 *   }
		 *   return ((uint)**(byte **)(lVar2 + 0xb8) ^ value) != 0xb5;
		 */
		// RVA: 0x329B170 VA: 0x7818986170
		public static bool Decrypt(int value, byte key);
		/*
		 *   undefined *puVar1;
		 *   long lVar2;
		 *
		 *   if ((bRam000000000754adbb & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adbb = 1;
		 *   }
		 *   puVar1 = PTR_DAT_070c6620;
		 *   if (key == 0) {
		 *     lVar2 = *(long *)PTR_DAT_070c6620;
		 *     if (*(int *)(lVar2 + 0xe4) == 0) {
		 *       func_0x031fde08();
		 *       lVar2 = *(long *)puVar1;
		 *     }
		 *     key = **(byte **)(lVar2 + 0xb8);
		 *   }
		 *   return ((uint)key ^ value) != 0xb5;
		 */
		// RVA: 0x329B1E8 VA: 0x78189861E8
		public int GetEncrypted();
		/*
		 *   undefined *puVar1;
		 *   void *extraout_x1;
		 *   void *extraout_x1_00;
		 *
		 *   puVar1 = PTR_DAT_070c6620;
		 *   if ((bRam000000000754adbc & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adbc = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *     methodInfo = extraout_x1_00;
		 *   }
		 *   SecuredBool.ApplyNewCryptoKey(this);
		 *   return *(int *)&this.field_0x4;
		 */
		// RVA: 0x329B244 VA: 0x7818986244
		public void SetEncrypted(int encrypted);
		/*
		 *   bool bVar1;
		 *   void *pvVar2;
		 *   void *extraout_x1;
		 *   undefined1 auVar3 [16];
		 *
		 *   if ((bRam000000000754adbd & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6630);
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adbd = 1;
		 *   }
		 *   *(int *)&this.field_0x4 = encrypted;
		 *   this.field_0xa = 1;
		 *   pvVar2 = PixelGuard.get_Instance();
		 *   if (pvVar2 != null) {
		 *     auVar3 = func_0x038d6228(pvVar2,*(undefined8 *)PTR_DAT_070c6630);
		 *     pvVar2 = auVar3._8_8_;
		 *     if ((auVar3._0_8_ & 1) != 0) {
		 *       if (*(int *)(*(long *)PTR_DAT_070c6620 + 0xe4) == 0) {
		 *         func_0x031fde08();
		 *         pvVar2 = extraout_x1;
		 *       }
		 *       bVar1 = SecuredBool.InternalDecrypt(this);
		 *       this.field_0x8 = bVar1;
		 *       this.field_0x9 = 1;
		 *     }
		 *     return;
		 *   }
		 *   IL2CPP.ThrowNullReferenceException();
		 */
		// RVA: 0x329AEEC VA: 0x7818985EEC
		private bool InternalDecrypt();
		/*
		 *   uint uVar1;
		 *   byte bVar2;
		 *   undefined *puVar3;
		 *   int iVar4;
		 *   long lVar5;
		 *   void *pvVar6;
		 *   ulong uVar7;
		 *   PixelGuard *this_00;
		 *   void *extraout_x1;
		 *   void *extraout_x1_00;
		 *
		 *   if ((bRam000000000754adbe & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6628);
		 *     func_0x031fdc8c(PTR_DAT_070c6630);
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     func_0x031fdc8c(PTR_DAT_070c6638);
		 *     bRam000000000754adbe = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   puVar3 = PTR_DAT_070c6620;
		 *   if (this.field_0xa == '\0') {
		 *     lVar5 = *(long *)PTR_DAT_070c6620;
		 *     if (*(int *)(lVar5 + 0xe4) == 0) {
		 *       func_0x031fde08();
		 *       lVar5 = *(long *)puVar3;
		 *       methodInfo = extraout_x1_00;
		 *     }
		 *     *(undefined1 *)this = **(undefined1 **)(lVar5 + 0xb8);
		 *     iVar4 = SecuredBool.Encrypt(false);
		 *     *(int *)&this.field_0x4 = iVar4;
		 *     *(undefined2 *)&this.field_0x8 = 0x100;
		 *     this.field_0xa = 1;
		 *   }
		 *   if (*(int *)(*(long *)puVar3 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *   }
		 *   bVar2 = *(byte *)this;
		 *   uVar1 = *(uint *)&this.field_0x4;
		 *   pvVar6 = PixelGuard.get_Instance();
		 *   if (pvVar6 != null) {
		 *     uVar1 = uVar1 ^ bVar2;
		 *     uVar7 = func_0x038d6228(pvVar6,*(undefined8 *)PTR_DAT_070c6630);
		 *     if ((((uVar7 & 1) != 0) && (this.field_0x9 != '\0')) &&
		 *        ((bool)this.field_0x8 != (uVar1 != 0xb5))) {
		 *       this_00 = PixelGuard.get_Instance();
		 *       pvVar6 = PixelGuard.get_Instance();
		 *       if ((pvVar6 == null) ||
		 *          (pvVar6 = (void *)func_0x038d5f58(pvVar6,*(undefined8 *)PTR_DAT_070c6628),
		 *          this_00 == null)) goto LAB_0339b03c;
		 *       PixelGuard.CreateSecurityWarning(this_00,*(void **)PTR_DAT_070c6638,pvVar6);
		 *     }
		 *     return uVar1 != 0xb5;
		 *   }
		 * LAB_0339b03c:
		 *   IL2CPP.ThrowNullReferenceException();
		 */
		// RVA: 0x329B2EC VA: 0x78189862EC
		public static PixelSecurity.Core.SecuredTypes.SecuredBool op_Implicit(bool value);
		/*
		 *   undefined *puVar1;
		 *   int value_00;
		 *   void *pvVar2;
		 *   void *extraout_x1;
		 *   void *extraout_x1_00;
		 *   void *in_x2;
		 *   undefined8 uStack_30;
		 *   undefined4 uStack_28;
		 *
		 *   puVar1 = PTR_DAT_070c6620;
		 *   if ((bRam000000000754adbf & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6630);
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adbf = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   uStack_28 = 0;
		 *   uStack_30 = 0;
		 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *     methodInfo = extraout_x1_00;
		 *   }
		 *   value_00 = SecuredBool.Encrypt(value);
		 *   SecuredBool..ctor((SecuredBool *)&uStack_30,value_00);
		 *   pvVar2 = PixelGuard.get_Instance();
		 *   if (pvVar2 != null) {
		 *     func_0x038d6228(pvVar2,*(undefined8 *)PTR_DAT_070c6630);
		 *     return;
		 *   }
		 *   IL2CPP.ThrowNullReferenceException();
		 */
		// RVA: 0x329B3A8 VA: 0x78189863A8
		public static bool op_Implicit(PixelSecurity.Core.SecuredTypes.SecuredBool value);
		/*
		 *   undefined *puVar1;
		 *   bool bVar2;
		 *   undefined4 extraout_w1;
		 *   undefined4 extraout_w1_00;
		 *   undefined4 extraout_var;
		 *   undefined4 extraout_var_00;
		 *   SecuredBool *pSStack_30;
		 *   undefined4 uStack_28;
		 *
		 *   puVar1 = PTR_DAT_070c6620;
		 *   uStack_28 = SUB84(methodInfo,0);
		 *   pSStack_30 = value;
		 *   if ((bRam000000000754adc0 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     methodInfo = (void *)CONCAT44(extraout_var,extraout_w1);
		 *     bRam000000000754adc0 = 1;
		 *   }
		 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *     methodInfo = (void *)CONCAT44(extraout_var_00,extraout_w1_00);
		 *   }
		 *   bVar2 = SecuredBool.InternalDecrypt((SecuredBool *)&pSStack_30);
		 *   return bVar2;
		 */
		// RVA: 0x329B410 VA: 0x7818986410
		public override bool Equals(object obj);
		/*
		 *   bool bVar1;
		 *   long lVar2;
		 *
		 *   if ((bRam000000000754adc1 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adc1 = 1;
		 *   }
		 *   if ((obj == null) || (*(long *)obj != *(long *)PTR_DAT_070c6620)) {
		 *     bVar1 = false;
		 *   }
		 *   else {
		 *     lVar2 = func_0x031fde14(obj);
		 *     bVar1 = *(int *)&this.field_0x4 == *(int *)(lVar2 + 4);
		 *   }
		 *   return bVar1;
		 */
		// RVA: 0x329B488 VA: 0x7818986488
		public bool Equals(PixelSecurity.Core.SecuredTypes.SecuredBool obj);
		/*
		 *   return *(int *)&this.field_0x4 == (int)((ulong)obj >> 0x20);
		 */
		// RVA: 0x329B49C VA: 0x781898649C
		public override int GetHashCode();
		/*
		 *   undefined *puVar1;
		 *   int iVar2;
		 *   void *extraout_x1;
		 *   void *extraout_x1_00;
		 *   undefined1 auStack_24 [4];
		 *
		 *   puVar1 = PTR_DAT_070c6620;
		 *   if ((bRam000000000754adc2 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adc2 = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   auStack_24[0] = 0;
		 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *     methodInfo = extraout_x1_00;
		 *   }
		 *   auStack_24[0] = SecuredBool.InternalDecrypt(this);
		 *   if (*(int *)(*(long *)(PTR_DAT_070c0840 + 0x28) + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *   }
		 *   iVar2 = System.Boolean.GetHashCode(auStack_24);
		 *   return iVar2;
		 */
		// RVA: 0x329B530 VA: 0x7818986530
		public override string ToString();
		/*
		 *   undefined *puVar1;
		 *   void *pvVar2;
		 *   void *extraout_x1;
		 *   void *extraout_x1_00;
		 *   undefined1 auStack_24 [4];
		 *
		 *   puVar1 = PTR_DAT_070c6620;
		 *   if ((bRam000000000754adc3 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adc3 = 1;
		 *     methodInfo = extraout_x1;
		 *   }
		 *   auStack_24[0] = 0;
		 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *     methodInfo = extraout_x1_00;
		 *   }
		 *   auStack_24[0] = SecuredBool.InternalDecrypt(this);
		 *   if (*(int *)(*(long *)(PTR_DAT_070c0840 + 0x28) + 0xe4) == 0) {
		 *     func_0x031fde08();
		 *   }
		 *   pvVar2 = System.Boolean.ToString(auStack_24);
		 *   return pvVar2;
		 */
		// RVA: 0x329B5C4 VA: 0x78189865C4
		private static void .cctor();
		/*
		 *   undefined *puVar1;
		 *
		 *   puVar1 = PTR_DAT_070c6620;
		 *   if ((bRam000000000754adc4 & 1) == 0) {
		 *     func_0x031fdc8c(PTR_DAT_070c6620);
		 *     bRam000000000754adc4 = 1;
		 *   }
		 *   **(undefined1 **)(*(long *)puVar1 + 0xb8) = 0xd7;
		 *   return;
		 */
	}
}
