Advertisement
ExtReMLapin

CloudAuthX::DecryptCode(int a1, const char **a2)

May 16th, 2014
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.18 KB | None | 0 0
  1. int __stdcall CloudAuthX::DecryptCode(int a1, const char **a2)
  2. {
  3.   const char *v2; // eax@2
  4.   int v3; // edx@3
  5.   int v4; // edi@3
  6.   int v5; // edi@5
  7.   char v6; // cl@6
  8.   char v7; // cl@8
  9.   int v8; // edi@10
  10.   char v9; // si@11
  11.   int v10; // eax@13
  12.   int v11; // edx@13
  13.   int v12; // eax@16
  14.   int result; // eax@21
  15.   const char *v14; // [sp+10h] [bp-74h]@10
  16.   size_t v15; // [sp+14h] [bp-70h]@10
  17.   int v16; // [sp+18h] [bp-6Ch]@3
  18.   char v17; // [sp+18h] [bp-6Ch]@8
  19.   char v18; // [sp+1Ch] [bp-68h]@10
  20.   int v19; // [sp+20h] [bp-64h]@13
  21.   const char v20; // [sp+24h] [bp-60h]@3
  22.   char v21; // [sp+24h] [bp-60h]@10
  23.   char v22; // [sp+28h] [bp-5Ch]@21
  24.   char v23; // [sp+3Bh] [bp-49h]@18
  25.   int v24; // [sp+3Ch] [bp-48h]@10
  26.   int v25; // [sp+4Ch] [bp-38h]@6
  27.   int v26; // [sp+5Ch] [bp-28h]@6
  28.  
  29.   if ( (unsigned __int8)IsDebuggingModule() )
  30.   {
  31.     std::string::string(a1, &unk_290766, &v26);
  32.     result = a1;
  33.   }
  34.   else
  35.   {
  36.     v2 = *a2;
  37.     if ( *((_DWORD *)*a2 - 1) < 0 )
  38.     {
  39.       v3 = *((_DWORD *)v2 - 3);
  40.       v20 = *v2;
  41.       v16 = *v2 - 48;
  42.       v4 = v3 - 1;
  43.     }
  44.     else
  45.     {
  46.       std::string::_M_leak_hard(a2);
  47.       v2 = *a2;
  48.       v3 = *((_DWORD *)*a2 - 3);
  49.       v20 = **a2;
  50.       v16 = **a2 - 48;
  51.       v4 = v3 - 1;
  52.       if ( *((_DWORD *)*a2 - 1) >= 0 )
  53.       {
  54.         std::string::_M_leak_hard(a2);
  55.         v2 = *a2;
  56.         v3 = *((_DWORD *)*a2 - 3);
  57.       }
  58.     }
  59.     v5 = v2[v4];
  60.     if ( !v3 )
  61.       std::__throw_out_of_range("basic_string::substr");
  62.     std::string::string(&v26, a2, 1, v3 - 2);
  63.     std::string::assign(a2, &v26);
  64.     std::string::_Rep::_M_dispose(v26 - 12, &v25);
  65.     v6 = v20 - 51;
  66.     if ( v16 < 3 )
  67.       v6 = v16;
  68.     v17 = v6;
  69.     v7 = v5 - 53;
  70.     if ( v5 - 48 < 3 )
  71.       v7 = v5 - 48;
  72.     v18 = v7;
  73.     v14 = *a2;
  74.     v15 = strlen(*a2);
  75.     std::string::string(&v24, &unk_290766, &v26);
  76.     std::string::string(&v25, &unk_290766, &v26);
  77.     v8 = 0;
  78.     v21 = 1;
  79.     if ( (signed int)v15 > 0 )
  80.     {
  81.       do
  82.       {
  83.         v9 = v14[v8] - v17;
  84.         if ( !v21 )
  85.           v9 = v18 + v14[v8];
  86.         v10 = v24;
  87.         v11 = *(_DWORD *)(v24 - 12);
  88.         v19 = v11 + 1;
  89.         if ( (unsigned int)(v11 + 1) > *(_DWORD *)(v24 - 8) || *(_DWORD *)(v24 - 4) > 0 )
  90.         {
  91.           std::string::reserve(&v24, v19);
  92.           v10 = v24;
  93.           v11 = *(_DWORD *)(v24 - 12);
  94.         }
  95.         *(_BYTE *)(v10 + v11) = v9;
  96.         v12 = v24;
  97.         if ( (_DWORD *)(v24 - 12) != dword_333B48 )
  98.         {
  99.           *(_DWORD *)(v24 - 4) = 0;
  100.           *(_DWORD *)(v12 - 12) = v19;
  101.           *(_BYTE *)(v12 + v19) = 0;
  102.         }
  103.         v21 ^= 1u;
  104.         ++v8;
  105.       }
  106.       while ( v15 != v8 );
  107.     }
  108.     base64decode(&v26);
  109.     std::string::assign(&v25, &v26);
  110.     std::string::_Rep::_M_dispose(v26 - 12, &v23);
  111.     if ( *(_DWORD *)(v24 - 4) >= 0 )
  112.     {
  113.       std::string::_M_leak_hard(&v24);
  114.       if ( *(_DWORD *)(v24 - 4) >= 0 )
  115.         std::string::_M_leak_hard(&v24);
  116.     }
  117.     std::string::erase(&v22);
  118.     std::string::string(a1, &v25);
  119.     std::string::_Rep::_M_dispose(v25 - 12, &v26);
  120.     std::string::_Rep::_M_dispose(v24 - 12, &v26);
  121.     result = a1;
  122.   }
  123.   return result;
  124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement