a simple cheat for the game phasmophobia. it is written in c++ and is developed using imgui and ms-detours.

a screenshot of the game phasmophobia using the asthmaphobia cheat

some features

  • ghost information
  • esp
  • anti kick
  • change in-game stats like player sanity
  • force specific tarot card
  • godmode
  • teleportation
  • marco mode (infinite stamina)
  • be marco (custom run/walk speed)
  • toggle door interaction and collision
  • custom experience reward

technical stuff

this part is meant for nerds only.

dynamically getting function addresses

if you have read my blog post on how to make a phasmophobia cheat you know i used to hardcode the offsets for function addresses. this is obviously not very pratical, so instead of doing that, i now use exported il2cpp functions from the game to retrieve those dynamically, see example below.

template <typename T>
T GetMethodPointer(const char* assemblyName, const char* namespaceName,
const char* className, const char* methodName, int argsCount = 0)
  {
    void* image = assemblyImage;
    if (strcmp(assemblyName, "Assembly-CSharp") != 0)
    {
      void* assembly = il2cpp_domain_assembly_open(domain, assemblyName);
      if (!assembly)
        return nullptr;

      image = il2cpp_assembly_get_image(assembly);
      if (!image)
        return nullptr;
    }

    void* klass = il2cpp_class_from_name(image, namespaceName, className);
    if (!klass)
      return nullptr;

    void* method = il2cpp_class_get_method_from_name(klass, methodName, argsCount);
    if (!method)
      return nullptr;

    struct MethodInfo
    {
      void* methodPointer;
    };
    void* methodPointer = static_cast<MethodInfo*>(method)->methodPointer;

    return reinterpret_cast<T>(methodPointer);
  }

source code

the source code for this version is available on github.com/sipacid/asthmaphobia.