Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define LOBYTE(x) (*((BYTE*)&(x))) // low byte
- #define LOWORD(x) (*((WORD*)&(x))) // low word
- #define LODWORD(x) (*((DWORD*)&(x))) // low dword
- #define HIBYTE(x) (*((BYTE*)&(x)+1))
- #define HIWORD(x) (*((WORD*)&(x)+1))
- #define HIDWORD(x) (*((DWORD*)&(x)+1))
- #define BYTEn(x, n) (*((BYTE*)&(x)+n))
- #define WORDn(x, n) (*((WORD*)&(x)+n))
- #define BYTE1(x) BYTEn(x, 1) // byte 1 (counting from 0)
- #define BYTE2(x) BYTEn(x, 2)
- #define BYTE3(x) BYTEn(x, 3)
- #define BYTE4(x) BYTEn(x, 4)
- #define BYTE5(x) BYTEn(x, 5)
- #define BYTE6(x) BYTEn(x, 6)
- #define BYTE7(x) BYTEn(x, 7)
- #define BYTE8(x) BYTEn(x, 8)
- #define BYTE9(x) BYTEn(x, 9)
- #define BYTE10(x) BYTEn(x, 10)
- #define BYTE11(x) BYTEn(x, 11)
- #define BYTE12(x) BYTEn(x, 12)
- #define BYTE13(x) BYTEn(x, 13)
- #define BYTE14(x) BYTEn(x, 14)
- #define BYTE15(x) BYTEn(x, 15)
- #define WORD1(x) WORDn(x, 1)
- #define WORD2(x) WORDn(x, 2) // third word of the object, unsigned
- #define WORD3(x) WORDn(x, 3)
- #define WORD4(x) WORDn(x, 4)
- #define WORD5(x) WORDn(x, 5)
- #define WORD6(x) WORDn(x, 6)
- #define WORD7(x) WORDn(x, 7)
- __declspec(noinline) BYTE __ROR1(BYTE value, int count)
- {
- return ROL((BYTE)value, -count);
- }
- __declspec(noinline) BYTE __ROL1(BYTE value, int count)
- {
- return ROL((BYTE)value, count);
- }
- __declspec(noinline) USHORT __ROL2(USHORT value, int count)
- {
- return ROL((USHORT)value, count);
- }
- __declspec(noinline) USHORT __ROR2(USHORT value, int count)
- {
- return ROL((USHORT)value, -count);
- }
- __declspec(noinline) UINT __ROL4(UINT value, int count)
- {
- return ROL((UINT)value, count);
- }
- __declspec(noinline) UINT __ROR4(UINT value, int count)
- {
- return ROL((UINT)value, -count);
- }
- __declspec(noinline) ULONGLONG __ROL8(ULONGLONG value, int count)
- {
- return ROL((ULONGLONG)value, count);
- }
- __declspec(noinline) ULONGLONG __ROR8(ULONGLONG value, int count)
- {
- return ROL((ULONGLONG)value, -count);
- }
- ULONG_PTR GoodULevel = 0;
- ULONG_PTR ULevelEncryptionPointer = ReadUMPointerNum(g_World + 0x928);
- LODWORD(GoodULevel) = (((ULevelEncryptionPointer & 0xFFFF0000 | (unsigned __int16)ULevelEncryptionPointer ^ ((unsigned int)ULevelEncryptionPointer >> 16)) - 1465382696) & 0xFFFF0000 | (unsigned __int16)((ULevelEncryptionPointer ^ WORD1(ULevelEncryptionPointer)) + 2264) ^ ((unsigned __int64)((ULevelEncryptionPointer & 0xFFFF0000 | (unsigned __int16)ULevelEncryptionPointer ^ ((unsigned int)ULevelEncryptionPointer >> 16)) - 1465382696) >> 16)) ^ 0xA8A808D8;
- HIDWORD(GoodULevel) = (((unsigned __int16)__ROR2(
- ((((unsigned __int16)__ROR2(HIDWORD(ULevelEncryptionPointer), 8) << 16) | (unsigned int)(unsigned __int16)__ROL2(WORD2(ULevelEncryptionPointer) ^ HIWORD(ULevelEncryptionPointer), 8))- 1479039016) >> 16,8) << 16) | (unsigned __int16)__ROL2((((((unsigned __int16)__ROR2(HIWORD(ULevelEncryptionPointer), 8) << 16) | (unsigned int)(unsigned __int16)__ROL2(WORD2(ULevelEncryptionPointer) ^ HIWORD(ULevelEncryptionPointer), 8))- 1479039016) >> 16) ^ (__ROL2(WORD2(ULevelEncryptionPointer) ^ HIWORD(ULevelEncryptionPointer),8)- 22568),8)) ^ 0x58285828;
- ///////////////////////////ULEVEL////////////////////////////////////////////////////////
- ///////////////////////////ACTOR////////////////////////////////////////////////////////
- ULONG_PTR GoodActorTable = 0;
- ULONG_PTR ActorTableEncryptionPointer = ReadUMPointerNum(GoodULevel + 0x250);
- LODWORD(GoodActorTable) = __ROR4(__ROL4(ActorTableEncryptionPointer + 1673235087, 8) - 2106917424, 16) ^ 0x8FAF7341;
- HIDWORD(GoodActorTable) = __ROR4(__ROR4(HIDWORD(ActorTableEncryptionPointer) - 732113544, 16) + 1912398937, 8) ^ 0xF15FF11F;
- ///////////////////////////ACTOR////////////////////////////////////////////////////////
- debug_lvl1("GoodULevel: [%p] GoodActorTable: [%p] \n", GoodULevel, GoodActorTable);
- LOG :
- g_World: [00000187B21B2740]
- GoodULevel: [D92FA107A0C10780](Not correct) GoodActorTable: [441884A7029C4EB4](Not correct)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement