Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Runtime.InteropServices;
- namespace Default
- {
- static class Program
- {
- // found using IDA 6.8 Pro
- // charmap loads a DLL named GetUName.dll
- // which has a selfnamed function and pulls
- // the name of a unicode character using an
- // int and loads the name into a string
- // in c++, it is used like
- // GetUName(int, LPWSTR *)
- [DllImport("GetUName.dll", CallingConvention = CallingConvention.StdCall)]
- public static extern int GetUName(int x, [MarshalAs(UnmanagedType.LPWStr)]string lpBuffer);
- // create string buffer to load name in (255 in case of large names, can be changed)
- public static string charactername = new string('*', 255);
- static void Main()
- {
- GetUName('A', charactername);
- // asteriks are still left in (* because names don't include
- // any), simply cut the length so they aren't included
- charactername = charactername.Substring(0, charactername.IndexOf('*') - 1);
- Console.Write(charactername);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement