This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bit> | |
#include <array> | |
int main() | |
{ | |
// Create raw array in stack: rsp+2C | |
volatile std::uint32_t stack[3]; | |
// mov dword ptr ss:[rsp+2C], 6C6C6548 | |
stack[0] = std::integral_constant<std::uint32_t, std::bit_cast<std::uint32_t>(std::array<char, sizeof(std::uint32_t)>{'H', 'e', 'l', 'l'})>::value; |