2022-09-08 20:38:45 +00:00
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
#pragma pack(push, 1)
|
|
|
|
class Obf32
|
|
|
|
{
|
2022-11-08 22:11:50 +01:00
|
|
|
std::uint32_t a;
|
|
|
|
std::uint32_t b;
|
|
|
|
std::uint32_t c;
|
|
|
|
std::uint32_t d;
|
2022-09-08 20:38:45 +00:00
|
|
|
|
|
|
|
public:
|
2022-11-08 22:11:50 +01:00
|
|
|
inline void operator=(std::uint32_t val)
|
|
|
|
{
|
|
|
|
a = val & d;
|
|
|
|
b = val & ~d;
|
|
|
|
}
|
2022-09-08 20:38:45 +00:00
|
|
|
|
2022-11-08 22:11:50 +01:00
|
|
|
inline operator std::uint32_t()
|
|
|
|
{
|
|
|
|
return (a & d) | (b & ~d);
|
|
|
|
}
|
2022-09-08 20:38:45 +00:00
|
|
|
};
|
|
|
|
static_assert(sizeof(Obf32) == 0x10);
|
|
|
|
#pragma pack(pop)
|