Skip to content

Instantly share code, notes, and snippets.

@pawlos
Last active September 25, 2017 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawlos/6d44cec95ca3d1f5bbf2a3d676128000 to your computer and use it in GitHub Desktop.
Save pawlos/6d44cec95ca3d1f5bbf2a3d676128000 to your computer and use it in GitHub Desktop.
Unmangled version of button2_click
private unsafe void button2_Click(object sender, EventArgs e)
{
string text = this.textBox1.Text;
string string1;
<Module>.msclr.interop.marshal_as<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class System::String ^>(&string, ref text);
try
{
string text2 = this.textBox2.Text;
string string2;
<Module>.msclr.interop.marshal_as<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class System::String ^>(&string2, ref text2);
try
{
sbyte b = 64;
if (<Module>.std.string.find(ref string1, (sbyte*)(&b), 0u, 1u) != -1)
{
sbyte b2 = 46;
if (<Module>.std.string.find(ref string1, (sbyte*)(&b2), 0u, 1u) != -1)
{
string string3;
string* email = <Module>.std.string.{ctor}(ref string3, ref string1);
string* md;
try
{
string string4;
md = <Module>.std.string.{ctor}(ref string4, ref string2);
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(std.string.{dtor}), (void*)(&string3));
throw;
}
if (<Module>.Check(md, email) != null)
{
this.textBox1.Text = "Success!!!";
this.textBox2.Text = "";
}
else
{
this.textBox1.Text = "Wrong!!!";
}
}
}
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(std.string.{dtor}), (void*)(&string2));
throw;
}
<Module>.std.string._Tidy(ref string2, true, 0u);
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(std.string.{dtor}), (void*)(&string));
throw;
}
<Module>.std.string._Tidy(ref string, true, 0u);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment