I think that's the wrong resource0 file (for bus 0 device 2, rather than bus 2 device 0). Probably easier to use the symlinks:
/sys/bus/pci/devices/0000:02:00.0/resource0
However, you can't call read() on those files, they can only be mmap'd. /dev/mem should work, though. I would recommend reading a whole page: dd if=/dev/mem of=asdf bs=4096 skip=1036288 count=1
I think that's the wrong resource0 file (for bus 0 device 2, rather than bus 2 device 0). Probably easier to use the symlinks: pci/devices/ 0000:02: 00.0/resource0
/sys/bus/
However, you can't call read() on those files, they can only be mmap'd. /dev/mem should work, though. I would recommend reading a whole page: dd if=/dev/mem of=asdf bs=4096 skip=1036288 count=1