PhieuLang

source

Sep 16th, 2015
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.25 KB | None | 0 0
  1. int __cdecl main(int argc, const char **argv, const char **envp)
  2. {
  3.   signed __int64 v3; // rcx@2
  4.   int *v4; // rdi@2
  5.   int result; // eax@11
  6.   __int64 v6; // rbx@11
  7.   FILE *stream; // [sp+18h] [bp-D8h]@1
  8.   int v8; // [sp+20h] [bp-D0h]@2
  9.   int v9; // [sp+24h] [bp-CCh]@5
  10.   int v10; // [sp+34h] [bp-BCh]@5
  11.   __int64 v11; // [sp+38h] [bp-B8h]@5
  12.   int v12; // [sp+48h] [bp-A8h]@5
  13.   char s; // [sp+50h] [bp-A0h]@2
  14.   __int64 v14; // [sp+D8h] [bp-18h]@1
  15.  
  16.   v14 = *MK_FP(__FS__, 40LL);
  17.   stream = fopen("flag.txt", "r");
  18.   if ( stream )
  19.   {
  20.     fgets(&s, 32, stream);
  21.     fclose(stream);
  22.     v3 = 5LL;
  23.     v4 = &v8;
  24.     while ( v3 )
  25.     {
  26.       *(_QWORD *)v4 = 0LL;
  27.       v4 += 2;
  28.       --v3;
  29.     }
  30.     *v4 = 0;
  31.     v8 = 17;
  32.     v10 = 16;
  33.     v12 = 0;
  34.     printf("User : ", 32LL, v4 + 1, argv);
  35.     fflush(0LL);
  36.     read(0, &v9, v8);
  37.     printf("Password : ", &v9);
  38.     fflush(0LL);
  39.     read(0, &v11, v10);
  40.     if ( !strncmp((const char *)&v9, "charly", 6uLL) && !strncmp((const char *)&v11, "h4ckTH1s", 8uLL) )
  41.     {
  42.       puts("Welcome guest!");
  43.       if ( v12 == 1 )
  44.         printf("Your flag is : %s\n", &s);
  45.     }
  46.   }
  47.   else
  48.   {
  49.     puts("Error leyendo datos");
  50.   }
  51.   result = 0;
  52.   v6 = *MK_FP(__FS__, 40LL) ^ v14;
  53.   return result;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment