Temp-Classes/security/Obf32.hpp
Yimura d81f392e61 Script VM classes (#60)
* feat(Script): Ported BBv2 script classes
* fix: Change hard tab indents to 4 width space indents
2022-11-08 21:11:50 +00:00

25 lines
404 B
C++

#pragma once
#include <cstdint>
#pragma pack(push, 1)
class Obf32
{
std::uint32_t a;
std::uint32_t b;
std::uint32_t c;
std::uint32_t d;
public:
inline void operator=(std::uint32_t val)
{
a = val & d;
b = val & ~d;
}
inline operator std::uint32_t()
{
return (a & d) | (b & ~d);
}
};
static_assert(sizeof(Obf32) == 0x10);
#pragma pack(pop)