I've used code submitted earlier on this forum:
#Include <EditConstants.au3>
#Include <WinAPI.au3>
#Include <WindowsConstants.au3>
Global $sFile, $hFile, $iSize, $sData, $tData, $iRead
$sFile = @WindowsDir & '\regedit.exe'
$iSize = FileGetSize($sFile)
$tData = DllStructCreate('byte[' & $iSize & ']')
$hFile = _WinAPI_CreateFile($sFile, 2, 2, 2)
_WinAPI_ReadFile($hFile, DllStructGetPtr($tData), $iSize, $iRead)
_WinAPI_CloseHandle($hFile)
MsgBox(0, '', Hex(DllStructG