Advertisement
Guest User

Untitled

a guest
Aug 10th, 2010
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.38 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace DumpUI
  7. {
  8.     class Program
  9.     {
  10.  
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.             UInt32 Offset_UIBase = 0x00B499A8;
  15.  
  16.             Int32 TotalFrames = 0;
  17.             Int32 TotalVisibleFrames = 0;
  18.  
  19.             Magic.BlackMagic BM = new Magic.BlackMagic(Magic.SProcess.GetProcessFromProcessName("Wow"));
  20.  
  21.             UInt32 Base = BM.ReadUInt(Offset_UIBase);
  22.             UInt32 Frame = BM.ReadUInt(Base + 0x0CD4);
  23.  
  24.             Console.WriteLine("Base : 0x" + Base.ToString("X"));
  25.  
  26.             while (Frame != 0)
  27.             {
  28.  
  29.                 Int32 isVisible = BM.ReadInt(Frame + 0xDC);
  30.  
  31.                 if (isVisible == 1)
  32.                     TotalVisibleFrames++;
  33.  
  34.                 String Name = BM.ReadASCIIString(BM.ReadUInt(Frame + 0x1C), 255);
  35.  
  36.                 if (Name.Length > 0)
  37.                 {
  38.  
  39.                     Console.WriteLine("Frame 0x" + Frame.ToString("X") + " Name : " + Name);
  40.  
  41.                 }
  42.  
  43.                 TotalFrames++;
  44.  
  45.                 Frame = BM.ReadUInt(Frame + BM.ReadUInt(Base + 0x0CCC) + 4);
  46.  
  47.             }
  48.            
  49.             Console.WriteLine("Total frames : " + TotalFrames);
  50.             Console.WriteLine("Total visible frames : " + TotalVisibleFrames);
  51.  
  52.             Console.ReadLine();
  53.  
  54.         }
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement