Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- #include <stdio.h>
- int main() {
- char* ImageBase = (char*)GetModuleHandleA(NULL);
- DWORD ImageSize = ((PIMAGE_NT_HEADERS)((DWORD64)ImageBase + ((PIMAGE_DOS_HEADER)ImageBase)->e_lfanew))->OptionalHeader.SizeOfImage;
- for (DWORD i = 0; i < ImageSize; i +=8 ) {
- printf("0x%p\t%p\t", ((INT_PTR)ImageBase + i), *(INT_PTR*)((INT_PTR)ImageBase + i));
- for (int j = 0; j < 8; j++) {
- printf("%c", ImageBase[i+j]);
- }
- printf("\n");
- Sleep(10);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment