Created
March 14, 2015 22:35
-
-
Save hak8or/64a1a0b0dfed58b7ebb1 to your computer and use it in GitHub Desktop.
asdasda
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void find_none_zeroed_memory(unsigned char volatile * const base, unsigned char volatile * const top){ | |
| unsigned char volatile *offset = base; | |
| dbg_info("Looking for modified memory. \n"); | |
| while (offset < top) { | |
| // Do some magic because this and my desktops endian'ness are opposits. | |
| volatile char num[4] = {*offset, *(offset + 1), *(offset + 2), *(offset + 3)}; | |
| long output = num[3] | num[2] << 8 | num[1] << 16 | num[0] << 24; | |
| if (output != 0x00) | |
| dbg_info("Contents at %x : %x \n", offset, output); | |
| offset = offset + 4; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment