title: Does anyone recognize this cipher algorithm?
body: <p>I found myself in a desperate situation trying to understand the algorithm below. Does anyone recognize it?</p>
  
  <p>It comes from a decompiled assembly. I am writing a PHP website front-end application and need to use passwords generated by this terrible piece of code as credentials to log in.</p>
  
  <pre><code>public static void Crypt(string ThisCle, string Buffer, long BufferLength)
  {
      int index = 1;
      do
      {
          WUC.cry[index] = char.MinValue;
          checked { ++index; }
      }
      while (index &lt;= 32000);
      WUC.cle = Conversions.ToCharArrayRankOne(ThisCle);
      WUC.si = 0;
      WUC.x1a2 = 0;
      WUC.i = 0;
      WUC.j = 0;
      WUC.l = 0;
      while ((long) WUC.j &lt;= checked (BufferLength - 1L))
      {
          byte num1 = checked ((byte) Strings.Asc(Strings.Mid(Buffer, WUC.j + 1, 1)));
          WUC.Assemble();
          WUC.cfc = WUC.inter &gt;&gt; 8;
          WUC.cfd = WUC.inter &amp; (int) byte.MaxValue;
          WUC.compte = 0;
          do
          {
              WUC.cle[WUC.compte] = Strings.Chr(Strings.Asc(WUC.cle[WUC.compte]) ^ (int) num1);
              checked { ++WUC.compte; }
          }
          while (WUC.compte &lt;= 15);
          byte num2 = checked ((byte) ((int) num1 ^ (WUC.cfc ^ WUC.cfd)));
          byte num3 = (byte) ((uint) num2 &gt;&gt; 4);
          byte num4 = checked ((byte) ((int) num2 &amp; 15));
          char ch;
          switch (num3)
          {
              case (byte) 0:
                  ch = 'a';
                  break;
              case (byte) 1:
                  ch = 'b';
                  break;
              case (byte) 2:
                  ch = 'c';
                  break;
              case (byte) 3:
                  ch = 'd';
                  break;
              case (byte) 4:
                  ch = 'e';
                  break;
              case (byte) 5:
                  ch = 'f';
                  break;
              case (byte) 6:
                  ch = 'g';
                  break;
              case (byte) 7:
                  ch = 'h';
                  break;
              case (byte) 8:
                  ch = 'i';
                  break;
              case (byte) 9:
                  ch = 'j';
                  break;
              case (byte) 10:
                  ch = 'k';
                  break;
              case (byte) 11:
                  ch = 'l';
                  break;
              case (byte) 12:
                  ch = 'm';
                  break;
              case (byte) 13:
                  ch = 'n';
                  break;
              case (byte) 14:
                  ch = 'o';
                  break;
              case (byte) 15:
                  ch = 'p';
                  break;
          }
          WUC.cry[checked (WUC.j * 2)] = ch;
          switch (num4)
          {
              case (byte) 0:
                  ch = 'a';
                  break;
              case (byte) 1:
                  ch = 'b';
                  break;
              case (byte) 2:
                  ch = 'c';
                  break;
              case (byte) 3:
                  ch = 'd';
                  break;
              case (byte) 4:
                  ch = 'e';
                  break;
              case (byte) 5:
                  ch = 'f';
                  break;
              case (byte) 6:
                  ch = 'g';
                  break;
              case (byte) 7:
                  ch = 'h';
                  break;
              case (byte) 8:
                  ch = 'i';
                  break;
              case (byte) 9:
                  ch = 'j';
                  break;
              case (byte) 10:
                  ch = 'k';
                  break;
              case (byte) 11:
                  ch = 'l';
                  break;
              case (byte) 12:
                  ch = 'm';
                  break;
              case (byte) 13:
                  ch = 'n';
                  break;
              case (byte) 14:
                  ch = 'o';
                  break;
              case (byte) 15:
                  ch = 'p';
                  break;
          }
          WUC.cry[checked (WUC.j * 2 + 1)] = ch;
          checked { ++WUC.j; }
      }
  }
  </code></pre>
  
  <p>There's a "Decrpyt" method working in a similar way. The ciphers are 16 chars long.</p>