Advertisement
Guest User

Untitled

a guest
May 27th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. uint64_t tsl_decrypt_localplayer(struct Tsl *tsl, uint64_t prop)
  2. {
  3.     struct uint128_t xmm;
  4.     if (!READ(prop, &xmm, 16))
  5.     {
  6.         return 0;
  7.     }
  8.  
  9.     uint32_t key = (uint32_t)xmm.low;
  10.     if (!IsValid(xmm.high))
  11.         return 0;
  12.     if (!mem->IsValid(xmm.high) || !mem->IsValid(key))
  13.         return 0;
  14.  
  15.     int v3 = (unsigned __int16)(key + 107) ^ ((unsigned __int16)(HIWORD(key) + 31) + 59365);
  16.  
  17.     auto index = ((unsigned __int8)(((key + 107) ^ (BYTE2(key) + 4)) + 67) ^ ((unsigned __int8)~((~BYTE1(v3) - 115) ^ 0x73) + 246))
  18.         % 128;
  19.  
  20.     uint64_t func = READ64(GET_ADDR(TABLE) + 0x8 * index);
  21.  
  22.     if (auto encValue = decrypt(tsl, func, (~(~xmm.high ^ key))))
  23.         return ror8(encValue, 81);
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement