(data: bytes)
| 85 | ## Utils |
| 86 | |
| 87 | def remove_trailing_null_bytes(data: bytes) -> bytes: |
| 88 | for i in range(len(data) - 1, -1, -1): |
| 89 | if data[i] != b'\x00'[0]: # Check for a non-null byte |
| 90 | return data[:i + 1] |
| 91 | return b'' # If the entire sequence is null bytes |
| 92 | |
| 93 | |
| 94 | def align_to_page_size(rva, offset, page_size=4096): |
no outgoing calls
no test coverage detected