#include #define __cdecl #define __int16 #define __int64 typedef int _DWORD; typedef int _BYTE; typedef int _QWORD; class _UNKNOWN { }; class CSteamID { public: static void Render(CSteamID *pID); }; class CSteam3Client { int GetAuthSessionTicket(CSteam3Client *thiz, void *a2, int a3, unsigned int *a4, unsigned int a5, unsigned __int16 a6, unsigned __int64 a7, bool a8); void Warning(int v11); }; int __stack_chk_guard_ptr; _UNKNOWN unk_700000 int __cdecl CSteam3Client::GetAuthSessionTicket(CSteam3Client *thiz, void *a2, int a3, unsigned int *a4, unsigned int a5, unsigned __int16 a6, unsigned __int64 a7, bool a8) { int v8; // eax@2 unsigned int v9; // edx@2 int v10; // ecx@2 int v11; // eax@11 int v13; // eax@25 int v14; // edx@25 char *v15; // esi@25 int v16; // eax@25 int v17; // eax@29 int v18; // [sp+30h] [bp-18h]@2 unsigned int v19; // [sp+34h] [bp-14h]@2 int v20; // [sp+38h] [bp-10h]@1 v20 = *(_DWORD *) __stack_chk_guard_ptr; *a4 = 0; if (!*(_DWORD *) thiz) { v11 = (int) "No SteamUser interface. Cannot perform steam authentication\n"; goto LABEL_16; } auto fn1 = *(int (__cdecl **)(_DWORD)) (**(_DWORD **) thiz + 8); v8 = fn1(*(_DWORD *) thiz); v19 = v9; v18 = v8; v10 = (v9 >> 20) & 0xF; if (!v10 || (unsigned int) v10 > 0xA || v9 - 0x1000000 > 0x3FFFFFF || v10 == 1 && (!v8 || (v9 & 0xFFFFF) > 4)) { goto LABEL_15; } else if ((v9 & 0xF00000) == 3145728 && !v8) { goto LABEL_15; } else if ((_UNKNOWN *) (v9 & 0xF00000) == &unk_700000 && (!v8 || v9 & 0xFFFFF)) { goto LABEL_15; } if (0) { LABEL_15: CSteamID::Render((CSteamID *) &v18); v11 = (int) "Our steam ID %s is not valid. Steam must be running and you must be logged in\n"; LABEL_16: Warning(v11); return *(_DWORD *) __stack_chk_guard_ptr; } if (*((_DWORD *) thiz + 44)) { if (*((_DWORD *) thiz + 45) == a5 && *((_WORD *) thiz + 92) == a6 && *((_BYTE *) thiz + 187) == a8 && *(_QWORD *) ((char *) thiz + 188) == a7 && *((_DWORD *) thiz + 49)) goto LABEL_29; auto fn2 = (*(void (__cdecl **)(_DWORD, _DWORD)) (**(_DWORD **) thiz + 64)); fn2(*(_DWORD *) thiz, *((_DWORD *) thiz + 44)); } auto fn3 = (*(int (__cdecl **)(_DWORD)) (**(_DWORD **) thiz + 8)); v13 = fn3(*(_DWORD *) thiz); *((_DWORD *) thiz + 51) = v14; *((_DWORD *) thiz + 50) = v13; *((_DWORD *) thiz + 49) = 0; v15 = (char *) thiz + 196; auto fn4 = (*(int (__cdecl **)(_DWORD, char *, signed int, char *)) (**(_DWORD **) thiz + 52)); v16 = fn4( *(_DWORD *) thiz, (char *) thiz + 208, 1016, (char *) thiz + 196); *((_DWORD *) thiz + 44) = v16; if (v16 && *(_DWORD *) v15) { *((_DWORD *) thiz + 49) = *(_DWORD *) v15 + 8; *((_DWORD *) thiz + 45) = a5; *((_WORD *) thiz + 92) = a6; *((_BYTE *) thiz + 187) = a8; *(_QWORD *) ((char *) thiz + 188) = a7; } else { *((_DWORD *) thiz + 44) = 0; *((_DWORD *) thiz + 49) = 0; Warning("ISteamUser::GetAuthSessionTicket failed to return a valid ticket\n"); } LABEL_29: *a4 = 0; v17 = *((_DWORD *) thiz + 49); if (v17 && v17 <= a3) { memcpy(a2, (char *) thiz + 200, *((_DWORD *) thiz + 49)); *a4 = *((_DWORD *) thiz + 49); } auto fn5 = (*(void (__cdecl **)(_DWORD, _DWORD, _DWORD, unsigned int, _DWORD)) (**(_DWORD **) thiz + 76)); fn5( *(_DWORD *) thiz, a7, HIDWORD(a7), a5, a6); return *(_DWORD *) __stack_chk_guard_ptr; } void CSteamID::Render(CSteamID *pID) { } void Warning(int v11) { }