Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Base pointer address
- local basePointer = "EEmem"
- -- List of offsets (example values provided, replace with actual offsets)
- local offsets = {
- "010377A4",
- }
- -- Offset addition (0x08800000 in decimal)
- local additionalOffset = 0x08800000
- -- Iterate through each offset and create a memory record
- for i, offset in ipairs(offsets) do
- local memrec = getAddressList().createMemoryRecord()
- memrec.Description = "Offset " .. i
- -- Set the base address
- memrec.Address = basePointer
- -- Mark as pointer
- memrec.IsPointer = true
- -- Set the number of offsets
- memrec.OffsetCount = 1 -- Assuming one offset per memory record
- -- Convert the offset from hex to decimal and add additionalOffset
- local decimalOffset = tonumber(offset, 16)
- if decimalOffset == nil then
- print("Error converting offset: " .. offset)
- else
- -- Add additionalOffset
- decimalOffset = decimalOffset + additionalOffset
- print("Hex Offset: " .. offset .. " | Final Hex: " .. string.format("%X", decimalOffset))
- memrec.Offset[0] = decimalOffset -- Set the offset value
- end
- -- Set the value type (e.g., vtDword)
- memrec.Type = vtDword -- vtByte = 00 | vtWord = 0000 | vtDword = 00000000 | vtQword = 0000000000000000
- -- Display address in hexadecimal format or switch to false for Decimal
- memrec.ShowAsHex = true
- end
Advertisement
Add Comment
Please, Sign In to add comment