Пользовательские тип данных в hex-окне (пример)
-
function bytes_to_value_function(b1,b2,b3,b4) -- для примера local table = {b1, b2, b3, b4} local dword = byteTableToDword(table) local refDataFromAddress = getAddressSafe(dword) if dataPointer ~= nil then return refDataFromAddress end return dword end function value_to_bytes_function(integer) -- просто для примера return bXor(integer, 100) end local isFloat = false registerCustomTypeLua('Pointer 2', 4, bytes_to_value_function, value_to_bytes_function, isFloat)
Справка
CustomType class (Object) The custom type is an convertor of raw data, to a human readable interpretation. global functions registerCustomTypeLua(typename, bytecount, bytestovaluefunction, valuetobytesfunction, isFloat) Registers a Custom type based on lua functions The bytes to value function should be defined as "function bytestovalue (b1,b2,b3,b4)" and return an integer as result The value to bytes function should be defined as "function valuetobytes (integer)" and return the bytes it should write returns the Custom Type object registerCustomTypeAutoAssembler(script) Registers a custom type based on an auto assembler script. The script must allocate an "ConvertRoutine" and "ConvertBackRoutine" returns the Custom Type object getCustomType(typename) : Returns the custom type object, or nil if not found properties name: string functiontypename: string CustomTypeType: TCustomTypeType - The type of the script script: string - The custom type script scriptUsesFloat: boolean - True if this script interprets it's user side values as float methods byteTableToValue({bytetable},Address Optional) valueToByteTable(value, Address Optional)