#include #include #include #include #include #include #include #include #include #include #include "MainLogic.h" using namespace std; int __ImageBase=0; // Mitigator-Public-Key: MainLogic *mainLogic = NULL; Php::Value totally_normal_get_mitigator_header() { return mainLogic->get_mitigator_header(); } void totally_normal_deployment_stage() { mainLogic = new MainLogic; return mainLogic->deployment_stage(); } Php::Value totally_normal_php_decrypt_wrapper(Php::Parameters & params) { return mainLogic->php_decrypt_wrapper(params); } 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"); extension.onStartup(totally_normal_deployment_stage); extension.add("get_mitigator_header"); extension.add("php_decrypt_wrapper", {Php::ByVal("array", Php::Type::Array)} ); return extension.module(); } }