Skip to content

Instantly share code, notes, and snippets.

@pawlos
Last active September 25, 2017 18:22
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/2f2dae97566965fcba7845cc0b5af228 to your computer and use it in GitHub Desktop.
Save pawlos/2f2dae97566965fcba7845cc0b5af228 to your computer and use it in GitHub Desktop.
Unmangled Check method
internal unsafe static bool Check(string* MD5, string* Email)
{
bool result;
try
{
try
{
string string1;
<Module>.std.string.{ctor}(ref string1, (sbyte*)(&<Module>.??_C@_00CNPNBAHC@?$AA@));
try
{
int start = <Module>.GetStart();
string string2;
*(ref string2 + 16) = 0;
*(ref string2 + 20) = 0;
<Module>.std.string._Tidy(ref string2, false, 0u);
<Module>.std.string.assign(ref string2, Email, 0u, uint.MaxValue);
string string3;
string* right = <Module>.md5(&string3, (string*)(&string2));
try
{
<Module>.std.string.=(Email, right);
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(std.string.{dtor}), (void*)(&string3));
throw;
}
<Module>.std.string._Tidy(ref string3, true, 0u);
string string4;
*(ref string4 + 16) = 0;
*(ref string4 + 20) = 0;
<Module>.std.string._Tidy(ref string4, false, 0u);
<Module>.std.string.assign(ref string4, Email, 0u, uint.MaxValue);
string string5;
string* @string = <Module>.GetString(&string5, (string*)(&string4), start);
try
{
<Module>.std.string.=(ref string1, @string);
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(std.string.{dtor}), (void*)(&string5));
throw;
}
<Module>.std.string._Tidy(ref string5, true, 0u);
string string6;
string* str = <Module>.std.string.{ctor}(ref string6, ref string1);
string string7;
string* right2 = <Module>.md5(&string7, str);
try
{
<Module>.std.string.=(ref string, right2);
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(std.string.{dtor}), (void*)(&string7));
throw;
}
<Module>.std.string._Tidy(ref string7, true, 0u);
uint count = (uint)(*(int*)(MD5 + 16 / sizeof(string)));
sbyte* ptr;
if (16 <= *(int*)(MD5 + 20 / sizeof(string)))
{
ptr = *(int*)MD5;
}
else
{
ptr = (sbyte*)MD5;
}
result = (<Module>.std.string.compare(ref string1, 0u, (uint)(*(ref string1 + 16)), ptr, count) == 0);
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(std.string.{dtor}), (void*)(&string));
throw;
}
<Module>.std.string._Tidy(ref string, true, 0u);
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(std.string.{dtor}), (void*)MD5);
throw;
}
<Module>.std.string._Tidy(MD5, true, 0u);
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(std.string.{dtor}), (void*)Email);
throw;
}
<Module>.std.string._Tidy(Email, true, 0u);
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment