В где ошибка в коде?
.386
.model flat, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
.data
name1 db 'win14.exe',0
h1 dd 0
str1 db 'exe patched successfully',0
str2 db 'error',0
titl1 db 'info',0
filesize dd 0
buf db 0
.code
start:
invoke CreateFile,addr name1,GENERIC_READ OR GENERIC_WRITE,0,0,OPEN_EXISTING,0,0
cmp eax,0
je r1
mov h1,eax
invoke SetFilePointer,h1,0444h,0,FILE_BEGIN
invoke ReadFile,h1,addr buf,1,addr filesize,0
cmp buf, 03h
jne r1
invoke SetFilePointer,h1,0444h,0,FILE_BEGIN
mov buf, 02h
invoke WriteFile,h1,addr buf,1,addr filesize,0
invoke MessageBox,0,addr str1,addr titl1,MB_OK
invoke ExitProcess,0
r1:
invoke MessageBox,0,addr str2,addr titl1,MB_ICONERROR
invoke ExitProcess,1
end start