Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint64_t tsl_decrypt_ulevel(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 v6 = IDA_LOWORD(key) & 2 ? xmm.high - (unsigned int)key : xmm.high + (unsigned int)key;
- auto index = ((unsigned __int8)((rol2(IDA_HIWORD(key), 8) + 61) ^ ror2(IDA_LOWORD(key), 8)) ^ ((unsigned __int8)(((unsigned __int16)((rol2(IDA_HIWORD(key), 8) + 12093) ^ ror2(IDA_LOWORD(key), 8)) >> 8) + 91) + 70))
- % 128;
- uint64_t func = READ64(GET_ADDR(TABLE) + 0x8 * index);
- if (auto encValue = decrypt(tsl, func, v6))
- return ror8(encValue, 73);
- return 0;
- }
- uint64_t tsl_decrypt_actor(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;
- auto index = ((unsigned __int8)(IDA_LOWORD(key) ^ (IDA_HIWORD(key) - 72)) ^ (((unsigned __int16)(IDA_LOWORD(key) ^ (IDA_HIWORD(key) + 26808)) >> 8) + 144))
- % 128;
- uint64_t func = READ64(GET_ADDR(TABLE) + 0x8 * index);
- if (auto encValue = decrypt(tsl, func, (ror8(xmm.high, 8 * (IDA_LOWORD(key) & 7u)) ^ (unsigned int)key)))
- return ror8(encValue, -40);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement