Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(int i=0; i<sizeof(pe_byte); i++){
- pe_byte[i] = pe_byte[i]^(int)XOR_KEY[i%XOR_KEY_SIZE];
- }
- // printf("%c%c\n", pe_byte[0], pe_byte[1]);
- PIMAGE_DOS_HEADER raw_image_base = (PIMAGE_DOS_HEADER)(LPVOID)pe_byte;
- printf("raw_image_base = %X\n", raw_image_base);
- if (IMAGE_DOS_SIGNATURE != raw_image_base->e_magic)
- return 0;
- PIMAGE_NT_HEADERS nt_header = (PIMAGE_NT_HEADERS)(raw_image_base->e_lfanew + (LPBYTE)raw_image_base);
- if (IMAGE_NT_SIGNATURE != nt_header->Signature)
- return 0;
- printf("nNumberOfSections = %d\n", nt_header->FileHeader.NumberOfSections);
- PIMAGE_SECTION_HEADER section_header = (PIMAGE_SECTION_HEADER)(raw_image_base->e_lfanew + sizeof(*nt_header) + (UINT_PTR)raw_image_base);
- for (int i = 0; i < nt_header->FileHeader.NumberOfSections; i++, section_header++) {
- printf("[%s:%d] section_header->VirtualAddress = %X\n", __FILE__, __LINE__, (section_header->VirtualAddress));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement