I am adding another answer here because the comment by op is akin to a new question
I'm still confused. If ix has numerious references to the point at which I >!seeked too, why would it be that there is neither data nor code? Why would >!these references be pointed to the padded area or the alignment area?
this is a demo of code which is referenced but doing a pd on reference would yield a bunch of zeros and has nothing to do with alignment or any other artifacts
C:\evancarr>cat evancarr0.cpp
#include <stdio.h>
#include <windows.h>
char somecipher[MAX_PATH + 1];
char curdir[MAX_PATH + 1];
char deccipher[MAX_PATH + 1];
int main(void) {
GetCurrentDirectoryA(MAX_PATH, curdir);
int cdlen = strlen(curdir);
for (int i = 0; i < cdlen; i++) {
somecipher[i] = curdir[i] ^ 0x1;
}
printf("%s\n", somecipher);
for (int i = 0; i < cdlen; i++) {
deccipher[i] = somecipher[i] ^ 0x1;
}
printf("%s\n", deccipher);
}
compiled and executed
C:\evancarr>cl /Zi /W4 /analyze /EHsc /O2 evancarr0.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25835 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
evancarr0.cpp
Microsoft (R) Incremental Linker Version 14.12.25835.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:evancarr0.exe
/debug
evancarr0.obj
C:\evancarr>evancarr0.exe
B;]dw`ob`ss
C:\evancarr
loading it in radare2 seeking to main and doing a pd on the referenced global buffer (as can be seen the buffer has a lot of xrefs but it is a bunch of zeroes
and disassembling throws a bunch of add [eax] , al
C:\evancarr>radare2 -AA evancarr0.exe
[0x004015cd]> s 0x4065a0
[0x004065a0]> pd 5
| ; JMP XREF from 0x00403161 (sub.KERNEL32.dll_GetCurrentDirectoryA_161)
| 0x004065a0 56 push esi
| 0x004065a1 68380d4600 push 0x460d38 <<<<<<<
| 0x004065a6 6804010000 push 0x104 ; 260
| 0x004065ab ff1500304600 call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA] ;
0x463000
| 0x004065b1 be380d4600 mov esi, 0x460d38
[0x004065a0]> pd 5 @ 0x460d38
; DATA XREF from 0x004065a1
; DATA XREF from 0x004065b1
; DATA XREF from 0x004065f1
; DATA XREF from 0x00406650
; DATA XREF from 0x004065c0
0x00460d38 0000 add byte [eax], al
0x00460d3a 0000 add byte [eax], al
0x00460d3c 0000 add byte [eax], al
0x00460d3e 0000 add byte [eax], al
0x00460d40 0000 add byte [eax], al
[0x004065a0]> pd 5 @ 0x460c30
; DATA XREF from 0x00406658
; DATA XREF from 0x00406663
; DATA XREF from 0x004066a0
; DATA XREF from 0x00406700
; DATA XREF from 0x004065fc
0x00460c30 0000 add byte [eax], al
0x00460c32 0000 add byte [eax], al
0x00460c34 0000 add byte [eax], al
0x00460c36 0000 add byte [eax], al
0x00460c38 0000 add byte [eax], al
[0x004065a0]>
add byte [rax], al
?0000
is your data, i.e. its a chunk of empty (zero) memory.