Formatting

This commit is contained in:
momo5502 2022-09-15 20:55:29 +02:00
parent e761a12d8c
commit 92312dcf2f

View File

@ -434,8 +434,12 @@ namespace arxan
return false; return false;
} }
bool ignore = false;
void protect_texts() void protect_texts()
{ {
if(ignore) return;
const auto& texts = get_text_sections(); const auto& texts = get_text_sections();
for (const auto& text : texts) for (const auto& text : texts)
{ {
@ -522,7 +526,8 @@ namespace arxan
if (type) if (type)
{ {
OutputDebugStringA("Type1"); OutputDebugStringA("Type1");
}else }
else
{ {
OutputDebugStringA("Type2"); OutputDebugStringA("Type2");
} }
@ -547,7 +552,6 @@ namespace arxan
void patch_integrity_check(const integrity_handler_data& handler) void patch_integrity_check(const integrity_handler_data& handler)
{ {
OutputDebugStringA(utils::string::va("Patching: %llX", handler.address)); OutputDebugStringA(utils::string::va("Patching: %llX", handler.address));
const auto game_address = operator"" _g(handler.address); const auto game_address = operator"" _g(handler.address);
@ -1085,11 +1089,22 @@ namespace arxan
MessageBoxA(0, "done", 0, 0); MessageBoxA(0, "done", 0, 0);
*/ */
std::thread([]() std::thread([]()
{ {
MessageBoxA(0, 0, 0, 0); MessageBoxA(0, 0, 0, 0);
protect_texts(); protect_texts();
patch_integrity_checks(); patch_integrity_checks();
while (true)
{
MessageBoxA(0, "Remove guard", 0, 0);
ignore = true;
unprotect_texts();
MessageBoxA(0, "Apply guard", 0, 0);
ignore = false;
protect_texts();
}
//verify_handlers(); //verify_handlers();
/*utils::hook::set<uint8_t>(0x1423339C0_g, 0xC3); /*utils::hook::set<uint8_t>(0x1423339C0_g, 0xC3);