Exemplo n.º 1
0
 // Token: 0x0600241C RID: 9244 RVA: 0x0000F96F File Offset: 0x0000DB6F
 public static void smethod_6(this NtStatus status)
 {
     if (status.smethod_1() || status.smethod_4())
     {
         status.smethod_5();
     }
 }
        // Token: 0x06001D46 RID: 7494 RVA: 0x0005DEDC File Offset: 0x0005C0DC
        public static string smethod_0(IntPtr dllHandle, int messageTableId, int messageLanguageId, int messageId)
        {
            IntPtr memory;

            NtStatus status = Class265.RtlFindMessage(dllHandle, messageTableId, messageLanguageId, messageId, out memory);

            if (status.smethod_1())
            {
                return(null);
            }
            string result;

            using (Class128 @class = new Class128(memory))
            {
                if ((ushort)(@class.method_21 <Struct19>().enum114_0 & Enum114.flag_1) == 1)
                {
                    result = @class.method_24(Struct19.int_0);
                }
                else
                {
                    result = @class.method_7(Struct19.int_0);
                }
            }
            return(result);
        }
Exemplo n.º 3
0
        // Token: 0x060029FD RID: 10749 RVA: 0x000A15F4 File Offset: 0x0009F7F4
        private static bool smethod_9(IntPtr handle, out string token)
        {
            IntPtr intPtr = IntPtr.Zero;
            int    num    = 0;

            token = null;
            NtStatus ntStatus = Class265.NtQueryObject(handle, Enum118.const_2, IntPtr.Zero, 0, out num);

            if (ntStatus == (NtStatus)3221225480U)
            {
                return(false);
            }
            RuntimeHelpers.PrepareConstrainedRegions();
            bool result;

            try
            {
                RuntimeHelpers.PrepareConstrainedRegions();
                try
                {
                }
                finally
                {
                    intPtr = Marshal.AllocHGlobal(num);
                }
                ntStatus = Class265.NtQueryObject(handle, Enum118.const_2, intPtr, num, out num);
                if (!ntStatus.smethod_1() && !ntStatus.smethod_4())
                {
                    token  = ((Struct16)Marshal.PtrToStructure(intPtr, typeof(Struct16))).struct31_0.method_6();
                    result = true;
                }
                else
                {
                    result = false;
                }
            }
            finally
            {
                Marshal.FreeHGlobal(intPtr);
            }
            return(result);
        }