Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint64_t tsl_decrypt_gameinst(struct Tsl *tsl, uint64_t prop)
- {
- struct uint128_t xmm;
- if (!READ(prop, &xmm, 16))
- {
- return 0;
- }
- uint32_t key = (uint32_t)xmm.low;
- if (!IsValid(xmm.high))
- return 0;
- if (!mem->IsValid(xmm.high) || !mem->IsValid(key))
- return 0;
- __int64 v8; // rdx
- v8 = IDA_LOWORD(key) & 2 ? xmm.high ^ (unsigned int)key : xmm.high + (unsigned int)key;
- auto index = ((unsigned __int8)(((IDA_LOWORD(key) - 66) ^ (IDA_HIWORD(key) + 24)) - 82) ^ ((unsigned __int8)(((unsigned __int16)((IDA_LOWORD(key) - 66) ^ ((_WORD)key + 11032)) >> 8) + 114) + 68))
- % 128;
- uint64_t func = READ64(GET_ADDR(TABLE) + 0x8 * index);
- if (auto encValue = decrypt(tsl, func, v8))
- return ror8(encValue, 38);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement