Easy cracked lol
This is dll just compile it download MinHook, Build as x86 Run CrackMe#7.exe Inject your DLL (with:Process Hacker → Right-click → Misc → Inject DLL or use GH Injector Type helium done it should say You cracked me!...
#include
#include
#include "MinHook.h"
typedef int(__fastcall* tCheckFunc)(void* arg1);
tCheckFunc originalFunc = nullptr;
#define INPUT_BUFFER_ADDR 0x00412780
#define CHECK_FUNC_ADDR 0x0040141E
int __fastcall hookCheckFunc(void* arg1) {
char* input = reinterpret_cast(INPUT_BUFFER_ADDR);
if (strcmp(input, "helium") == 0) {
MessageBoxA(NULL, "You cracked me!", "Heliu", MB_OK);
return 1;
}
return originalFunc(arg1);
}
DWORD WINAPI MainThread(LPVOID) {
if (MH_Initialize() != MH_OK)
return 1;
if (MH_CreateHook((LPVOID)CHECK_FUNC_ADDR, &hookCheckFunc, reinterpret_cast(&originalFunc)) != MH_OK)
return 1;
if (MH_EnableHook((LPVOID)CHECK_FUNC_ADDR) != MH_OK)
return 1;
return 0;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID) {
if (ul_reason_for_call == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hModule);
CreateThread(nullptr, 0, MainThread, hModule, 0, nullptr);
}
return TRUE;
}
|
==> |