Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. public CredentialManager()
  2.         {
  3.             int size;
  4.             byte[] data;
  5.  
  6.             using (FileStream fs = new FileStream("stump_patch.swf", FileMode.Open))
  7.             {
  8.                 size = (int)fs.Length;
  9.                 data = new byte[size];
  10.                 fs.Read(data, 0, size);
  11.             }
  12.  
  13.             BigEndianWriter rdm = new BigEndianWriter();
  14.  
  15.             rdm.WriteShort(o);
  16.             rdm.WriteUTF("AKSF");
  17.             rdm.WriteShort(1);
  18.             rdm.WriteInt(1);
  19.             rdm.WriteByte(o);
  20.  
  21.             rdm.WriteBytes(data);
  22.  
  23.             var index = rdm.Position;
  24.             rdm.Seek(o);
  25.             rdm.WriteShort((short)(index - 3));
  26.             rdm.Seek(index);
  27.  
  28.             m_patch = rdm.Data;
  29.            // this.m_patch = File.ReadAllBytes("stump_patch.swf");
  30.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement