View difference between Paste ID: b0mur08L and 8yfYxW6A
SHOW: | | - or go back to the newest paste.
1
#include <Windows.h>
2
#include <stdio.h>
3
4
int main() {
5
	char* ImageBase = (char*)GetModuleHandleA(NULL);
6
	DWORD ImageSize = ((PIMAGE_NT_HEADERS)((DWORD64)ImageBase + ((PIMAGE_DOS_HEADER)ImageBase)->e_lfanew))->OptionalHeader.SizeOfImage;
7
8
	for (DWORD i = 0; i < ImageSize; i +=8 ) {
9
		printf("0x%p\t%p\t", ((INT_PTR)ImageBase + i), *(INT_PTR*)((INT_PTR)ImageBase + i));
10
		for (int j = 0; j < 8; j++) {
11
			printf("%c", ImageBase[i+j]);
12
		}
13
		printf("\n");
14
		Sleep(10);
15
	}
16
	return 0;
17
}