This file contains 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 <cstdio> | |
#include <cstdint> | |
#include <Windows.h> | |
constexpr auto instruction_bytes_to_skip {1z}; // sizeof(int 3) | |
constexpr auto first_magic_value {1234z}, second_magic_value {5678z}, magic_return_value {0xABCDz}; | |
using HashType = std::uint64_t; | |
[[gnu::always_inline, gnu::pure, nodiscard]] std::uint64_t resolve_api(const HashType module_hash, const HashType api_hash) { | |
std::uint64_t first_register {}, second_register {}, return_value {}; |
This file contains 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
from __future__ import annotations | |
from enum import IntEnum, auto as _enum_auto | |
# noinspection PyArgumentList | |
class ExitCode(IntEnum): | |
# No errors occurred | |
SUCCESS: ExitCode = 0 | |
# Certificate related errors |
This file contains 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
[[gnu::naked]] int mprotect_syscall(void *const, const size_t, const int) noexcept { | |
asm volatile(".intel_syntax;" | |
"mov rax, 10;" // syscall id | |
"syscall;" | |
"ret" ::: "memory", "cc"); | |
} | |
int mprotect(void *address, const size_t length, const int protection) noexcept { | |
constexpr auto page_size = 4096ul; | |
address = reinterpret_cast<void*>(reinterpret_cast<std::uintptr_t>(address) & -page_size); |
This file contains 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
#pragma once | |
namespace events { | |
struct Event {}; | |
} |
This file contains 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
// Created by Anthony Printup on 4/21/2023. | |
#pragma once | |
#include <algorithm> | |
#include <bitset> | |
#include <cstdint> | |
#include <exception> | |
#include <functional> | |
#include <ranges> |
This file contains 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
# Generated from CLion C/C++ Code Style settings | |
BasedOnStyle: LLVM | |
AccessModifierOffset: -4 | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveAssignments: None | |
AlignOperands: Align | |
AllowAllArgumentsOnNextLine: true | |
AllowAllParametersOfDeclarationOnNextLine: true | |
AllowShortBlocksOnASingleLine: Always | |
AllowShortCaseLabelsOnASingleLine: true |