Advertisement
krzys_h

Untitled

Feb 14th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 KB | None | 0 0
  1. int __cdecl main(int argc, const char **argv, const char **envp)
  2. {
  3.   __int64 v4; // [sp+0h] [bp-30h]@2
  4.   int i; // [sp+14h] [bp-1Ch]@4
  5.   int v6; // [sp+18h] [bp-18h]@4
  6.   int v7; // [sp+1Ch] [bp-14h]@4
  7.  
  8.   if ( argc == 2 )
  9.   {
  10.     printf("Checking License Key: %s\n", argv[1], envp, argv);
  11.     if ( strlen(*(const char **)(v4 + 8)) != 10 )
  12.     {
  13.       puts("Invalid length");
  14.       return 1;
  15.     }
  16.     v7 = 0;
  17.     v6 = 0;
  18.     for ( i = 0; i < strlen(*(const char **)(v4 + 8)); i += 2 )
  19.     {
  20.       v7 += *(_BYTE *)(*(_QWORD *)(v4 + 8) + i);
  21.       v6 += *(_BYTE *)(i + 1LL + *(_QWORD *)(v4 + 8));
  22.     }
  23.     if ( 2 * v7 == v6 )
  24.       puts("Application activated successfully!");
  25.     else
  26.       puts("Invalid key!");
  27.   }
  28.   else
  29.   {
  30.     puts("Usage: <key>");
  31.   }
  32.   return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement