Its a VB6 project but the Hex editor project here will give you good idea on how to do this... It can handle a file of up to 920 gig, by reading it sector for sector, as needed...

NOTE: it uses...