Русский   Home

RegisterAddr method

This method registers a function by its memory address. The other parameters are the same as those of Register.
DWX.RegisterAddr(Address, "FuncName", "i=hwwu", "r=l");

RegisterCode method

The 1st parameter of this method takes the machine code of a function in the form of a hex string. The other parameters are the same as those of Register.
DWX = new ActiveXObject("DynamicWrapperX");
if (DWX.Bitness == 32) {
    // The function multiplies its arguments and returns the result.
    Code = "8B442404F76C2408C3"
}
else {
    Code = "4889C8 48F7EA C3" // mov rax,rcx; imul rdx; ret
}
CodeAddr = DWX.RegisterCode(Code, "Multiply", "i=ll", "r=l");
WScript.Echo(DWX.Multiply(5, 4));
Remarks