#include #include #include #include #include #include #include #include #include #include #include "MainLogic.h" using namespace std; int __ImageBase=0; // Mitigator-Public-Key: extern "C" { // export the "get_module" function that will be called by the Zend engine PHPCPP_EXPORT void *get_module() { // create extension static Php::Extension extension("decryptor_la_setup_and_decryption","1.0"); MainLogic nativeMainLogic; Php::Class myMainLogic("MainLogic"); myMainLogic.method<&MainLogic::get_mitigator_header>("get_mitigator_header"); myMainLogic.method<&MainLogic::deployment_stage>("deployment_stage"); myMainLogic.method<&MainLogic::php_decrypt_wrapper>("php_decrypt_wrapper", { Php::ByVal("string", Php::Type::String), Php::ByVal("string", Php::Type::String) } ); std::function startup_callback_fn = std::bind(&MainLogic::deployment_stage, nativeMainLogic); //nativeMainLogic.deployment_stage; extension.onStartup(startup_callback_fn); // return the extension module extension.add(myMainLogic); return extension.module(); } }