Rev 526 | Rev 532 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 526 | Rev 528 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | uint64_t GetObfuscSeed() { |
36 | uint64_t GetObfuscSeed() { |
37 | // Due to "volatile", this value will only exist a single time in the binary file. |
37 | // Due to "volatile", this value will only exist a single time in the binary file. |
38 | // This char array will result in contiguous chars in OpenWatcom. |
38 | // This char array will result in contiguous chars in OpenWatcom. |
39 | // In MSVC++, the array will be built using several "mov ..." OP codes. |
39 | // In MSVC++, the array will be built using several "mov ..." OP codes. |
40 | volatile char seed[8] = { '\x17', '\x05', '\x83', '\x52', '\x2a', '\x97', '\x16', '\x74' }; |
40 | volatile char seed[8] = { '\x17', '\x05', '\x83', '\x52', '\x2a', '\x97', '\x16', '\x74' }; |
41 | return (uint64_t)seed; |
41 | return *((uint64_t*)&seed[0]); |
- | 42 | ||
42 | } |
43 | } |
43 | #elif defined(_MSC_VER) |
44 | #elif defined(_MSC_VER) |
44 | #ifdef _WIN64 |
45 | #ifdef _WIN64 |
45 | // Note: For MSVCC 64-bit, neither making the method volatile, nor including a volatile variable did avoid inlining. |
46 | // Note: For MSVCC 64-bit, neither making the method volatile, nor including a volatile variable did avoid inlining. |
46 | // so we use __declspec(noinline) |
47 | // so we use __declspec(noinline) |