rodecomp/scripts/exe/nProtect/GameGuard.cpp
ragnarok-clanker e11260a408 Add standalone exe build tooling under scripts/exe
build_exe.py compiles every unit in data/compile.json with the pinned toolchain and links Ragexe.exe.
Not part of the decompilation and not in data/compile.json: imports/*.def (original DLL import tables),
jsoncons/ (v0.170.2 headers + JsonCppLoader glue), nProtect/GameGuard.cpp (no-op GameGuard stand-in).
2026-11-06 15:10:16 +01:00

31 lines
1.2 KiB
C++

// Stand-in for the nProtect GameGuard SDK, linked only into the standalone exe
// built by scripts/exe/build_exe.py. Clank never compiles this file.
//
// The original statically links the SDK (0x00E8A000-0x00E96000). The client
// reaches it through three entry points, called by CNProtectGameGuardMgr in
// Source/Security/NProtectGameGuardMgr.cpp. This file provides those three with
// the behaviour of a successful start-up, so the client follows the same path it
// takes when GameGuard initialises normally. No anti-cheat checks are performed
// and server GameGuard authentication requests are not answered.
namespace {
// NPGAMEMON_SUCCESS: CNProtectGameGuardMgr treats any other status as a
// start-up failure.
constexpr int kGameGuardSuccess = 0x755;
int(__stdcall* g_callback)(int, const int*) = nullptr;
}
// fn_25538 (0x00E929B0): SDK initialisation.
void sub_E929B0(const char*) {
}
// fn_25536 (0x00E92820): status of the last initialisation.
int sub_E92820() {
return kGameGuardSuccess;
}
// fn_25543 (0x00E92E90): registers the client's GameGuard message handler.
void sub_E92E90(int(__stdcall* callback)(int, const int*)) {
g_callback = callback;
}