-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,396 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
|
||
add_subdirectory(${PROJECT_SOURCE_DIR}/lib) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/test) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(NoMercyModuleValidator CXX) | ||
|
||
add_library (${PROJECT_NAME} | ||
STATIC | ||
include/NoMercyValidator.h | ||
src/main.cpp | ||
) | ||
|
||
target_link_libraries( | ||
${PROJECT_NAME} | ||
crypt32 | ||
wintrust | ||
) | ||
|
||
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 20) | ||
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) | ||
set_property(TARGET ${PROJECT_NAME} PROPERTY CMAKE_CXX_EXTENSIONS OFF) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#pragma once | ||
|
||
#ifdef _M_X64 | ||
|
||
#define KARMA_MACRO_1 | ||
#define KARMA_MACRO_2 | ||
|
||
#else | ||
// .. | ||
#define JUNK_CODE_TWO_2(lineno, value) \ | ||
__asm {jz _1##lineno} \ | ||
__asm {jnz _1##lineno} \ | ||
__asm {_emit 0x##value} \ | ||
__asm {_1##lineno: } | ||
#define JUNK_CODE_TWO_1(name, value) JUNK_CODE_TWO_2(name, value) | ||
#define JUNK_CODE_TWO JUNK_CODE_TWO_1(__LINE__, __LINE__*1111%253) | ||
|
||
// .. | ||
#define JUNK_CODE_TWO_2_2(lineno) \ | ||
__asm {jz _112##lineno} \ | ||
__asm {jnz _112##lineno} \ | ||
__asm {_emit 0e8h} \ | ||
__asm {_112##lineno: } | ||
#define JUNK_CODE_TWO_1_2(name) JUNK_CODE_TWO_2_2(name) | ||
#define JUNK_CODE_TWO2 JUNK_CODE_TWO_1_2(__LINE__) | ||
|
||
// .. | ||
#define JUNK_CODE_TWO_2_3(lineno) \ | ||
__asm { xor eax, eax } \ | ||
__asm { test eax, eax } \ | ||
__asm {jz _1121##lineno} \ | ||
__asm {jnz _1120##lineno} \ | ||
__asm {_1120##lineno: } \ | ||
__asm {_emit 0e8h} \ | ||
__asm {_1121##lineno: } \ | ||
__asm { xor eax, 3 } \ | ||
__asm { add eax, 4 } \ | ||
__asm { xor eax, 5 } | ||
#define JUNK_CODE_TWO_1_3(name) JUNK_CODE_TWO_2_3(name) | ||
#define JUNK_CODE_TWO3 JUNK_CODE_TWO_1_3(__LINE__) | ||
|
||
|
||
// .. | ||
#define JUNK_CODE_THREE_2(lineno, value1, value2) \ | ||
__asm {clc} \ | ||
__asm {jnb _3t##lineno} \ | ||
__asm {_emit 0x##value1} \ | ||
__asm {_emit 0x##value2} \ | ||
__asm {_3t##lineno: } | ||
#define JUNK_CODE_THREE_1(name, value1, value2) JUNK_CODE_THREE_2(name, value1, value2) | ||
#define JUNK_CODE_THREE JUNK_CODE_THREE_1(__LINE__, __LINE__*1222%253, __LINE__*1111%253) | ||
|
||
// .. | ||
#define JUNK_CODE_FOUR_2(lineno, value) \ | ||
__asm {jl _11f##lineno} \ | ||
__asm {_12f##lineno: } \ | ||
__asm {jmp _13f##lineno } \ | ||
__asm {_emit 0x##value } \ | ||
__asm {_11f##lineno: } \ | ||
__asm {jz _12f##lineno } \ | ||
__asm {_13f##lineno: } | ||
#define JUNK_CODE_FOUR_1(name, value) JUNK_CODE_FOUR_2(name, value) | ||
#define JUNK_CODE_FOUR JUNK_CODE_FOUR_1(__LINE__, __LINE__*1111%253) | ||
|
||
|
||
// .. | ||
#define JUNK_CODE_FIVE_2(lineno) \ | ||
__asm {pushf} \ | ||
__asm {push 0x0a} \ | ||
__asm {_51f##lineno: jnb _53f##lineno} \ | ||
__asm {jmp _52f##lineno} \ | ||
__asm {_52f##lineno: call _54f##lineno} \ | ||
__asm {_53f##lineno: jnb _52f##lineno} \ | ||
__asm {_54f##lineno: add esp,4} \ | ||
__asm {jmp _55f##lineno} \ | ||
__asm {_55f##lineno: } \ | ||
__asm {dec dword ptr [esp]} \ | ||
__asm {jno _56f##lineno} \ | ||
__asm {_56f##lineno: jns _51f##lineno} \ | ||
__asm {jp _57f##lineno} \ | ||
__asm {_57f##lineno: add esp,4} \ | ||
__asm {popf} \ | ||
__asm {jmp _58f##lineno} \ | ||
__asm {_58f##lineno: } | ||
#define JUNK_CODE_FIVE_1(name) JUNK_CODE_FIVE_2(name) | ||
#define JUNK_CODE_FIVE JUNK_CODE_FIVE_1(__LINE__) | ||
|
||
|
||
#define KARMA_MACRO_1 JUNK_CODE_FOUR JUNK_CODE_TWO3 JUNK_CODE_THREE JUNK_CODE_TWO JUNK_CODE_FIVE JUNK_CODE_TWO2 | ||
#define KARMA_MACRO_2 JUNK_CODE_FIVE JUNK_CODE_THREE JUNK_CODE_TWO2 JUNK_CODE_TWO JUNK_CODE_FOUR JUNK_CODE_TWO3 | ||
#endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#pragma once | ||
|
||
bool __cdecl NMMV_IsValidModule(); | ||
void __cdecl NMMV_SafeExit(); |
Oops, something went wrong.