TimePath

Untitled

Jun 20th, 2015
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.06 KB | None | 0 0
  1. #include <string.h>
  2.  
  3. #define __cdecl
  4. #define __int16
  5. #define __int64
  6.  
  7. typedef int _DWORD;
  8. typedef int _BYTE;
  9. typedef int _QWORD;
  10.  
  11. class _UNKNOWN {
  12. };
  13.  
  14. class CSteamID {
  15.  
  16. public:
  17.     static void Render(CSteamID *pID);
  18. };
  19.  
  20. class CSteam3Client {
  21.     int GetAuthSessionTicket(CSteam3Client *thiz, void *a2, int a3, unsigned int *a4,
  22.                              unsigned int a5, unsigned __int16 a6, unsigned __int64 a7,
  23.                              bool a8);
  24.  
  25.     void Warning(int v11);
  26. };
  27.  
  28. int __stack_chk_guard_ptr;
  29. _UNKNOWN unk_700000
  30.  
  31. int __cdecl CSteam3Client::GetAuthSessionTicket(CSteam3Client *thiz, void *a2, int a3, unsigned int *a4,
  32.                                                 unsigned int a5, unsigned __int16 a6, unsigned __int64 a7,
  33.                                                 bool a8)
  34. {
  35.     int v8; // eax@2
  36.     unsigned int v9; // edx@2
  37.     int v10; // ecx@2
  38.     int v11; // eax@11
  39.     int v13; // eax@25
  40.     int v14; // edx@25
  41.     char *v15; // esi@25
  42.     int v16; // eax@25
  43.     int v17; // eax@29
  44.     int v18; // [sp+30h] [bp-18h]@2
  45.     unsigned int v19; // [sp+34h] [bp-14h]@2
  46.     int v20; // [sp+38h] [bp-10h]@1
  47.  
  48.     v20 = *(_DWORD *) __stack_chk_guard_ptr;
  49.     *a4 = 0;
  50.     if (!*(_DWORD *) thiz) {
  51.         v11 = (int) "No SteamUser interface.  Cannot perform steam authentication\n";
  52.         goto LABEL_16;
  53.     }
  54.     auto fn1 = *(int (__cdecl **)(_DWORD)) (**(_DWORD **) thiz + 8);
  55.     v8 = fn1(*(_DWORD *) thiz);
  56.     v19 = v9;
  57.     v18 = v8;
  58.     v10 = (v9 >> 20) & 0xF;
  59.     if (!v10 || (unsigned int) v10 > 0xA || v9 - 0x1000000 > 0x3FFFFFF
  60.         || v10 == 1 && (!v8 || (v9 & 0xFFFFF) > 4)) {
  61.         goto LABEL_15;
  62.     } else if ((v9 & 0xF00000) == 3145728 && !v8) {
  63.         goto LABEL_15;
  64.     } else if ((_UNKNOWN *) (v9 & 0xF00000) == &unk_700000 && (!v8 || v9 & 0xFFFFF)) {
  65.         goto LABEL_15;
  66.     }
  67.     if (0) {
  68.         LABEL_15:
  69.         CSteamID::Render((CSteamID *) &v18);
  70.         v11 = (int) "Our steam ID %s is not valid.  Steam must be running and you must be logged in\n";
  71.         LABEL_16:
  72.         Warning(v11);
  73.         return *(_DWORD *) __stack_chk_guard_ptr;
  74.     }
  75.     if (*((_DWORD *) thiz + 44)) {
  76.         if (*((_DWORD *) thiz + 45) == a5
  77.             && *((_WORD *) thiz + 92) == a6
  78.             && *((_BYTE *) thiz + 187) == a8
  79.             && *(_QWORD *) ((char *) thiz + 188) == a7
  80.             && *((_DWORD *) thiz + 49))
  81.             goto LABEL_29;
  82.         auto fn2 = (*(void (__cdecl **)(_DWORD, _DWORD)) (**(_DWORD **) thiz + 64));
  83.         fn2(*(_DWORD *) thiz, *((_DWORD *) thiz + 44));
  84.     }
  85.     auto fn3 = (*(int (__cdecl **)(_DWORD)) (**(_DWORD **) thiz + 8));
  86.     v13 = fn3(*(_DWORD *) thiz);
  87.     *((_DWORD *) thiz + 51) = v14;
  88.     *((_DWORD *) thiz + 50) = v13;
  89.     *((_DWORD *) thiz + 49) = 0;
  90.     v15 = (char *) thiz + 196;
  91.     auto fn4 = (*(int (__cdecl **)(_DWORD, char *, signed int, char *)) (**(_DWORD **) thiz + 52));
  92.     v16 = fn4(
  93.             *(_DWORD *) thiz,
  94.             (char *) thiz + 208,
  95.             1016,
  96.             (char *) thiz + 196);
  97.     *((_DWORD *) thiz + 44) = v16;
  98.     if (v16 && *(_DWORD *) v15) {
  99.         *((_DWORD *) thiz + 49) = *(_DWORD *) v15 + 8;
  100.         *((_DWORD *) thiz + 45) = a5;
  101.         *((_WORD *) thiz + 92) = a6;
  102.         *((_BYTE *) thiz + 187) = a8;
  103.         *(_QWORD *) ((char *) thiz + 188) = a7;
  104.     } else {
  105.         *((_DWORD *) thiz + 44) = 0;
  106.         *((_DWORD *) thiz + 49) = 0;
  107.         Warning("ISteamUser::GetAuthSessionTicket failed to return a valid ticket\n");
  108.     }
  109.     LABEL_29:
  110.     *a4 = 0;
  111.     v17 = *((_DWORD *) thiz + 49);
  112.     if (v17 && v17 <= a3) {
  113.         memcpy(a2, (char *) thiz + 200, *((_DWORD *) thiz + 49));
  114.         *a4 = *((_DWORD *) thiz + 49);
  115.     }
  116.     auto fn5 = (*(void (__cdecl **)(_DWORD, _DWORD, _DWORD, unsigned int, _DWORD)) (**(_DWORD **) thiz + 76));
  117.     fn5(
  118.             *(_DWORD *) thiz,
  119.             a7,
  120.             HIDWORD(a7),
  121.             a5,
  122.             a6);
  123.     return *(_DWORD *) __stack_chk_guard_ptr;
  124. }
  125.  
  126. void CSteamID::Render(CSteamID *pID)
  127. {
  128.  
  129. }
  130.  
  131. void Warning(int v11)
  132. {
  133.  
  134. }
Advertisement
Add Comment
Please, Sign In to add comment