Skip to content

engine

engine::attach

This method will make FC2 search for a process and prepare it for memory operations. This is protected by the same protection mode you are using in FC2. Meaning, if you are in kernel-protection, this method will act differently based on such. The same applies for the other memory operations.

This method accepts either a std::string or an unsigned long. See examples/attach/ on the repo.

Parameters

  • const std::variant< std::string, unsigned long > &

Returns

  • boolean

engine::get_module

This method will make FC2 search for a module from the process you prepared using attach. Sometimes with FC2K, the module size may not be returned or will be "0". This happens with Constellation4 as well. to fix this, simply restart the attached process. this method will return also fail if there isn't an attached process.

See examples/attach/ on the repo.

Parameters

  • const std::string &
  • int partition (0 by default)

Returns

  • std::pair< unsigned long long, unsigned long long >

engine::pattern

This method will perform a pattern scan from a module you retrieved using get_module. The pattern must be IDA-style only.

See examples/attach/ on the repo.

Parameters

  • const std::string & module name
  • const std::string & pattern
  • unsigned int offset
  • bool is_x64 (true by default)
  • bool relative (true by default)
  • bool ds (false by default)

Returns

  • unsigned long long

engine::read_memory

This method will execute a read memory operation. See notes above about protection settings.

See examples/attach/ on the repo.

Parameters

  • unsigned long long address

Returns

  • std::optional< type >