using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using Il2CppSystem.Reflection;
using MarsSDK;
using Newtonsoft.Json;

// Token: 0x0200013B RID: 315
public class GameDataProvider : Object
{
	// Token: 0x060040A0 RID: 16544 RVA: 0x000FDEC0 File Offset: 0x000FC0C0
	[CallerCount(6)]
	[CachedScanResults(RefRangeStart = 530406, RefRangeEnd = 530412, XrefRangeStart = 530388, XrefRangeEnd = 530406, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
	public unsafe GameDataProvider()
		: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr))
	{
		IntPtr* ptr = null;
		IntPtr intPtr2;
		IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GameDataProvider.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
		Il2CppException.RaiseExceptionIfNecessary(intPtr2);
	}

	// Token: 0x060040A1 RID: 16545 RVA: 0x000FDF0C File Offset: 0x000FC10C
	[CallerCount(2)]
	[CachedScanResults(RefRangeStart = 530419, RefRangeEnd = 530421, XrefRangeStart = 530412, XrefRangeEnd = 530419, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
	public unsafe Il2CppStructArray<byte> GetBytes(Object source)
	{
		IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
		checked
		{
			IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
			*ptr = IL2CPP.Il2CppObjectBaseToPtr(source);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GameDataProvider.NativeMethodInfoPtr_GetBytes_Public_Il2CppStructArray_1_Byte_Object_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			IntPtr intPtr3 = intPtr;
			return (intPtr3 != 0) ? new Il2CppStructArray<byte>(intPtr3) : null;
		}
	}

	// Token: 0x060040A2 RID: 16546 RVA: 0x000FDF7C File Offset: 0x000FC17C
	[CallerCount(6)]
	[CachedScanResults(RefRangeStart = 530424, RefRangeEnd = 530430, XrefRangeStart = 530421, XrefRangeEnd = 530424, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
	public unsafe T GetData<T>(Il2CppStructArray<byte> source)
	{
		IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
		checked
		{
			IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
			*ptr = IL2CPP.Il2CppObjectBaseToPtr(source);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GameDataProvider.MethodInfoStoreGeneric_GetData_Public_T_Il2CppStructArray_1_Byte_0<T>.Pointer, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return IL2CPP.PointerToValueGeneric<T>(intPtr, false, true);
		}
	}

	// Token: 0x060040A3 RID: 16547 RVA: 0x000FDFE0 File Offset: 0x000FC1E0
	[CallerCount(1)]
	[CachedScanResults(RefRangeStart = 530434, RefRangeEnd = 530435, XrefRangeStart = 530430, XrefRangeEnd = 530434, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
	public unsafe string Serialize(Object data, bool indent)
	{
		IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
		IntPtr* ptr;
		checked
		{
			ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
			*ptr = IL2CPP.Il2CppObjectBaseToPtr(data);
		}
		ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref indent;
		IntPtr intPtr2;
		IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GameDataProvider.NativeMethodInfoPtr_Serialize_Public_String_Object_Boolean_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
		Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		return IL2CPP.Il2CppStringToManaged(intPtr);
	}

	// Token: 0x060040A4 RID: 16548 RVA: 0x000FE058 File Offset: 0x000FC258
	[CallerCount(0)]
	[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 530435, XrefRangeEnd = 530438, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
	public unsafe T Deserialize<T>(string data)
	{
		IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
		checked
		{
			IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
			*ptr = IL2CPP.ManagedStringToIl2Cpp(data);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(GameDataProvider.MethodInfoStoreGeneric_Deserialize_Public_T_String_0<T>.Pointer, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return IL2CPP.PointerToValueGeneric<T>(intPtr, false, true);
		}
	}

	// Token: 0x060040A5 RID: 16549 RVA: 0x000FE0BC File Offset: 0x000FC2BC
	// Note: this type is marked as 'beforefieldinit'.
	static GameDataProvider()
	{
		Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "", "GameDataProvider");
		IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr);
		GameDataProvider.NativeFieldInfoPtr_aes = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr, "aes");
		GameDataProvider.NativeFieldInfoPtr_settings = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr, "settings");
		GameDataProvider.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr, 100667207);
		GameDataProvider.NativeMethodInfoPtr_GetBytes_Public_Il2CppStructArray_1_Byte_Object_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr, 100667208);
		GameDataProvider.NativeMethodInfoPtr_GetData_Public_T_Il2CppStructArray_1_Byte_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr, 100667209);
		GameDataProvider.NativeMethodInfoPtr_Serialize_Public_String_Object_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr, 100667210);
		GameDataProvider.NativeMethodInfoPtr_Deserialize_Public_T_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr, 100667211);
	}

	// Token: 0x060040A6 RID: 16550 RVA: 0x0000A688 File Offset: 0x00008888
	public GameDataProvider(IntPtr pointer)
		: base(pointer)
	{
	}

	// Token: 0x17001811 RID: 6161
	// (get) Token: 0x060040A7 RID: 16551 RVA: 0x000FE178 File Offset: 0x000FC378
	// (set) Token: 0x060040A8 RID: 16552 RVA: 0x000FE1AC File Offset: 0x000FC3AC
	public unsafe AESCryptography aes
	{
		get
		{
			IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(GameDataProvider.NativeFieldInfoPtr_aes);
			IntPtr intPtr2 = *intPtr;
			return (intPtr2 != 0) ? new AESCryptography(intPtr2) : null;
		}
		set
		{
			IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(GameDataProvider.NativeFieldInfoPtr_aes), IL2CPP.Il2CppObjectBaseToPtr(value));
		}
	}

	// Token: 0x17001812 RID: 6162
	// (get) Token: 0x060040A9 RID: 16553 RVA: 0x000FE1D4 File Offset: 0x000FC3D4
	// (set) Token: 0x060040AA RID: 16554 RVA: 0x000FE208 File Offset: 0x000FC408
	public unsafe JsonSerializerSettings settings
	{
		get
		{
			IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(GameDataProvider.NativeFieldInfoPtr_settings);
			IntPtr intPtr2 = *intPtr;
			return (intPtr2 != 0) ? new JsonSerializerSettings(intPtr2) : null;
		}
		set
		{
			IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(GameDataProvider.NativeFieldInfoPtr_settings), IL2CPP.Il2CppObjectBaseToPtr(value));
		}
	}

	// Token: 0x040029F6 RID: 10742
	private static readonly IntPtr NativeFieldInfoPtr_aes;

	// Token: 0x040029F7 RID: 10743
	private static readonly IntPtr NativeFieldInfoPtr_settings;

	// Token: 0x040029F8 RID: 10744
	private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

	// Token: 0x040029F9 RID: 10745
	private static readonly IntPtr NativeMethodInfoPtr_GetBytes_Public_Il2CppStructArray_1_Byte_Object_0;

	// Token: 0x040029FA RID: 10746
	private static readonly IntPtr NativeMethodInfoPtr_GetData_Public_T_Il2CppStructArray_1_Byte_0;

	// Token: 0x040029FB RID: 10747
	private static readonly IntPtr NativeMethodInfoPtr_Serialize_Public_String_Object_Boolean_0;

	// Token: 0x040029FC RID: 10748
	private static readonly IntPtr NativeMethodInfoPtr_Deserialize_Public_T_String_0;

	// Token: 0x0200013C RID: 316
	private sealed class MethodInfoStoreGeneric_GetData_Public_T_Il2CppStructArray_1_Byte_0<T>
	{
		// Token: 0x040029FD RID: 10749
		internal static IntPtr Pointer = IL2CPP.il2cpp_method_get_from_reflection(IL2CPP.Il2CppObjectBaseToPtrNotNull(new MethodInfo(IL2CPP.il2cpp_method_get_object(GameDataProvider.NativeMethodInfoPtr_GetData_Public_T_Il2CppStructArray_1_Byte_0, Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr)).MakeGenericMethod(new Il2CppReferenceArray<Type>(new Type[] { Type.internal_from_handle(IL2CPP.il2cpp_class_get_type(Il2CppClassPointerStore<T>.NativeClassPtr)) }))));
	}

	// Token: 0x0200013D RID: 317
	private sealed class MethodInfoStoreGeneric_Deserialize_Public_T_String_0<T>
	{
		// Token: 0x040029FE RID: 10750
		internal static IntPtr Pointer = IL2CPP.il2cpp_method_get_from_reflection(IL2CPP.Il2CppObjectBaseToPtrNotNull(new MethodInfo(IL2CPP.il2cpp_method_get_object(GameDataProvider.NativeMethodInfoPtr_Deserialize_Public_T_String_0, Il2CppClassPointerStore<GameDataProvider>.NativeClassPtr)).MakeGenericMethod(new Il2CppReferenceArray<Type>(new Type[] { Type.internal_from_handle(IL2CPP.il2cpp_class_get_type(Il2CppClassPointerStore<T>.NativeClassPtr)) }))));
	}
}
