Код (ASM): ; hook_lib.asm format MS COFF include 'C:/fasm/INCLUDE/win32ax.inc' extrn VirtualProtect public _HookInstall public _HookRemoveAll section '.data' data readable writeable my_struct rb 32 ; Структура для одного перехвата hook_table rd 16 ; Таблица с перехваченными функциями hook_table_c dd 0 ; Счетчик перехваченных функций section '.code' code readable executable _salc = 0D6h ; sbb al,al macro _aam num ; ah=al/num;al=al mod num { db 0D4h, num } macro _aad num ; al=ah*num+al;ah=0 { db 0D5h, num } VirXasm32: pushad push 000001510h push 0100101FFh push 0FFFFFF55h push 0FFFFFFF8h push 0F8FF7FA0h push 00F0EC40Dh push 007551004h push 001D005FFh push 0550D5D55h push 0555F0F88h push 0F3F3FFFFh push 00A0C1154h mov edx, esi mov esi, esp push 11001b push 10110000101011000000101110000000b push 10111111101100011111001100111110b push 00000000000100011110101001011000b mov ebx, esp sub esp, 110 mov edi, esp cld push 100 pop ecx .xa_nxtIndx: bt [ebx], ecx db _salc jnc .xa_is0 lodsb .xa_is0: stosb loop .xa_nxtIndx mov esi, edx push 2 pop ebx mov edx, ebx .xa_NxtByte: lodsb push eax push eax cmp al, 66h cmove ebx, ecx cmp al, 67h cmove edx, ecx cmp al, 0EAh je .xa_jmp cmp al, 09Ah jne .xa_nocall .xa_cll: inc esi .xa_jmp: lea esi, [esi+ebx+3] .xa_nocall: cmp al, 0C8h je .xa_i16 and al, 0F7h cmp al, 0C2h jne .xa_no16 .xa_i16: inc esi inc esi .xa_no16: and al, 0E7h cmp al, 26h pop eax je .xa_PopNxt cmp al, 0F1h je .xa_F1 and al, 0FCh cmp al, 0A0h jne .xa_noMOV lea esi, [esi+edx+2] .xa_noMOV: cmp al, 0F0h je .xa_PopNxt .xa_F1: cmp al, 64h .xa_PopNxt: pop eax je .xa_NxtByte mov edi, esp push edx push eax cmp al, 0Fh jne .xa_Nrm lodsb .xa_Nrm: pushfd _aam 10h xchg cl, ah cwde cdq xor ebp, ebp popfd jne .xa_NrmGroup .xa_ExtGroup: add edi, 53 jecxz .xa_@3 .xa_@1: bt [edi], ebp jnc .xa_@2 inc edx .xa_@2: inc ebp loop .xa_@1 jc .xa_@3 db _salc cdq .xa_@3: shl edx, 1 jmp .xa_ProcOpcode .xa_NrmGroup: sub cl, 4 jns .xa_@4 mov cl, 0Ch and al, 7 .xa_@4: jecxz .xa_4x .xa_@5: adc dl, 1 inc ebp bt [edi], ebp loop .xa_@5 jc .xa_ProcOpcode .xa_4x: shr al, 1 .xa_ProcOpcode: xchg cl, al lea edx, [edx*8+ecx] pop ecx pop ebp bt [edi+2], edx jnc .xa_noModRM .xa_ModRM: lodsb _aam 8 shl ah, 4 jnc .xa_isModRM js .xa_enModRM .xa_isModRM: pushfd test ebp, ebp jnz .xa_addr32 sub al, 6 jnz .xa_noSIB mov al, 5 .xa_addr32: cmp al, 4 jne .xa_noSIB lodsb and al, 7 .xa_noSIB: popfd jc .xa_iWD js .xa_i8 cmp al, 5 jne .xa_enModRM .xa_iWD: add esi, ebp inc esi .xa_i8: inc esi .xa_enModRM: test ah, 60h jnz .xa_noModRM xchg eax, ecx cmp al, 0F6h je .xa_ti8 cmp al, 0F7h jne .xa_noModRM add esi, ebx inc esi .xa_ti8: inc esi .xa_noModRM: shl edx, 1 bt [edi+2+17], edx jnc .xa_Exit inc edx bt [edi+2+17], edx jnc .xa_im8 adc esi, ebx .xa_im8: inc esi .xa_Exit: add esp, 110+64 sub esi, [esp+4] mov [esp+7*4], esi popad ret _HookInstall: push ebp mov ebp, esp push esi push edi push ebx mov ebx, [ebp + 12] ; HookCodeLen mov esi, [ebp + 8] ; Function test esi, esi jz .fail ; Проверка на NULL указатель ; Проверка на корректность размера test ebx, ebx jz .fail cmp ebx, 1000h ; Максимальный разумный размер (4KB) ja .fail push ebx ; Сохраняем оригинальный размер .loopme: push ebx call VirXasm32 pop ebx test eax, eax ; Проверка на ошибку VirXasm32 jz .fail_pop add esi, eax sub ebx, eax ja .loopme pop ebx ; Восстанавливаем оригинальный размер neg ebx add ebx, [ebp + 12] ; HookCodeLen ; Изменение прав доступа на RWX push eax push ecx push edx mov eax, [ebp + 8] ; Function address mov ecx, ebx ; Size push 0 ; lpflOldProtect (будет заполнено VirtualProtect) push 40h ; PAGE_EXECUTE_READWRITE push ecx push eax call VirtualProtect test eax, eax ; Проверка успешности вызова jz .fail_protect pop edx pop ecx pop eax ; save to old buffer mov edi, [ebp + 16] ; OldCodeBuffer test edi, edi jz .fail ; Проверка на NULL указатель mov esi, [ebp + 8] ; Function push ebx call Copy_It pop ebx mov edx, [ebp + 8] ; Function sub edx, ebx sub edx, edi add edx, 1 mov byte [edi+ebx], 0E9h mov [edi+ebx+1], edx ; write new code xchg esi, edi mov esi, [ebp + 20] ; HookCode test esi, esi jz .fail ; Проверка на NULL указатель push ebx call Copy_It pop ebx ; Возврат прав доступа на RX push eax push ecx push edx mov eax, [ebp + 8] ; Function address mov ecx, ebx ; Size push 0 ; lpflOldProtect (будет заполнено VirtualProtect) push 20h ; PAGE_EXECUTE_READ push ecx push eax call VirtualProtect test eax, eax ; Проверка успешности вызова jz .fail_protect pop edx pop ecx pop eax mov [ebp - 4], ebx ; Return value jmp .exit .fail_protect: add esp, 12 ; Очистка стека после неудачного вызова VirtualProtect jmp .fail .fail_pop: pop ebx .fail: xor ebx, ebx ; Возвращаем 0 в случае ошибки mov [ebp - 4], ebx .exit: pop ebx pop edi pop esi mov esp, ebp pop ebp ret 16 Copy_It: push ebp mov ebp, esp push ecx push esi push edi mov ecx, [ebp + 8] ; Размер test ecx, ecx jz .exit .cp_loop: mov al, [esi + ecx - 1] mov [edi + ecx - 1], al loop .cp_loop .exit: pop edi pop esi pop ecx mov esp, ebp pop ebp ret 4 _HookRemoveAll: push ebp mov ebp, esp push esi push edi push ebx mov ecx, [hook_table_c] .rm_loop: test ecx, ecx jle .exit dec ecx push ecx mov eax, [hook_table+ecx*4] lea esi, [eax+8] ; old code mov edi, [eax+24] ; function ptr mov ebx, [eax+28] ; size push ebx call Copy_It pop ebx pop ecx jmp .rm_loop .exit: mov [hook_table_c], 0 pop ebx pop edi pop esi mov esp, ebp pop ebp ret section '.idata' import data readable library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL',\ gdi32,'GDI32.DLL',\ advapi32,'ADVAPI32.DLL',\ comctl32,'COMCTL32.DLL',\ comdlg32,'COMDLG32.DLL',\ shell32,'SHELL32.DLL',\ wsock32,'WSOCK32.DLL';,\ include 'C:\FASM\INCLUDE\api\kernel32.inc' include 'C:\FASM\INCLUDE\api\user32.inc' include 'C:\FASM\INCLUDE\api\gdi32.inc' include 'C:\FASM\INCLUDE\api\advapi32.inc' include 'C:\FASM\INCLUDE\api\comctl32.inc' include 'C:\FASM\INCLUDE\api\comdlg32.inc' include 'C:\FASM\INCLUDE\api\shell32.inc' include 'C:\FASM\INCLUDE\api\wsock32.inc' собираю но чето не берется, в чем трабл
НАВСКИДКУ include 'C:/fasm/INCLUDE/win32ax.inc' - это error: extra characters on line ............................................................... include 'C:\FASM\INCLUDE\api\kernel32.inc'
Код (Text): include 'win32ax.inc' Код (Text): ;section '.idata' data import readable writable ;library kernel32,'KERNEL32.DLL',\ ; user32,'USER32.DLL',\ ; gdi32,'GDI32.DLL',\ ; advapi32,'ADVAPI32.DLL',\ ; comctl32,'COMCTL32.DLL',\ ; comdlg32,'COMDLG32.DLL',\ ; shell32,'SHELL32.DLL',\ ; wsock32,'WSOCK32.DLL';,\ ; include 'api\kernel32.inc' ; include 'api\user32.inc' ; include 'api\gdi32.inc' ; include 'api\advapi32.inc' ; include 'api\comctl32.inc' ; include 'api\comdlg32.inc' ; include 'api\shell32.inc' ; include 'api\wsock32.inc' Убедись, что в переменной окружения include есть путь '<path>\fasm\INCLUDE'
удалил,Компилит,но в .obj нет импорта --- Сообщение объединено, 23 сен 2024 --- не помогло --- Сообщение объединено, 23 сен 2024 --- Код (Text): C:\fasm>FASM.EXE hook_lib.asm flat assembler version 1.73.32 (1048576 kilobytes memory) C:\FASM\INCLUDE\api\kernel32.inc [4]: import kernel32,\ processed: import kernel32,AddAtomA,'AddAtomA',AddAtomW,'AddAtomW',AddConsoleAliasA,'AddConsoleAliasA',AddConsoleAliasW,'AddConsoleAliasW',AllocConsole,'AllocConsole',AreFileApisANSI,'AreFileApisANSI',AssignProcessToJobObject,'AssignProcessToJobObject',BackupRead,'BackupRead',BackupSeek,'BackupSeek',BackupWrite,'BackupWrite',BaseAttachCompleteThunk,'BaseAttachCompleteThunk',Beep,'Beep',BeginUpdateResourceA,'BeginUpdateResourceA',BeginUpdateResourceW,'BeginUpdateResourceW',BuildCommDCBA,'BuildCommDCBA',BuildCommDCBW,'BuildCommDCBW',BuildCommDCBAndTimeoutsA,'BuildCommDCBAndTimeoutsA',BuildCommDCBAndTimeoutsW,'BuildCommDCBAndTimeoutsW',CallNamedPipeA,'CallNamedPipeA',CallNamedPipeW,'CallNamedPipeW',CancelIo,'CancelIo',CancelWaitableTimer,'CancelWaitableTimer',ClearCommBreak,'ClearCommBreak',ClearCommError,'ClearCommError',CloseConsoleHandle,'CloseConsoleHandle',CloseHandle,'CloseHandle',CloseProfileUserMapping,'CloseProfileUserMapping',CmdBatNotification,'CmdBatNotification',CommConfigDialogA,'CommConfigDialogA',CommConfigDialogW,'CommConfigDialogW',CompareFileTime,'CompareFileTime',CompareStringA,'CompareStringA',CompareStringW,'CompareStringW',ConnectNamedPipe,'ConnectNamedPipe',ConsoleMenuControl,'ConsoleMenuControl',ContinueDebugEvent,'ContinueDebugEvent',ConvertDefaultLocale,'ConvertDefaultLocale',ConvertThreadToFiber,'ConvertThreadToFiber',CopyFileA,'CopyFileA',CopyFileW,'CopyFileW',CopyFileExA,'CopyFileExA',CopyFileExW,'CopyFileExW',CreateConsoleScreenBuffer,'CreateConsoleScreenBuffer',CreateDirectoryA,'CreateDirectoryA',CreateDirectoryW,'CreateDirectoryW',CreateDirectoryExA,'CreateDirectoryExA',CreateDirectoryExW,'CreateDirectoryExW',CreateEventA,'CreateEventA',CreateEventW,'CreateEventW',CreateFiber,'CreateFiber',CreateFileA,'CreateFileA',CreateFileW,'CreateFileW',CreateFileMappingA,'CreateFileMappingA',CreateFileMappingW,'CreateFileMappingW',CreateHardLinkA,'CreateHardLinkA',CreateHardLinkW,'CreateHardLinkW',CreateIoCompletionPort,'CreateIoCompletionPort',CreateJobObjectA,'CreateJobObjectA',CreateJobObjectW,'CreateJobObjectW',CreateMailslotA,'CreateMailslotA',CreateMailslotW,'CreateMailslotW',CreateMutexA,'CreateMutexA',CreateMutexW,'CreateMutexW',CreateNamedPipeA,'CreateNamedPipeA',CreateNamedPipeW,'CreateNamedPipeW',CreatePipe,'CreatePipe',CreateProcessA,'CreateProcessA',CreateProcessW,'CreateProcessW',CreateRemoteThread,'CreateRemoteThread',CreateSemaphoreA,'CreateSemaphoreA',CreateSemaphoreW,'CreateSemaphoreW',CreateTapePartition,'CreateTapePartition',CreateThread,'CreateThread',CreateToolhelp32Snapshot,'CreateToolhelp32Snapshot',CreateVirtualBuffer,'CreateVirtualBuffer',CreateWaitableTimerA,'CreateWaitableTimerA',CreateWaitableTimerW,'CreateWaitableTimerW',DebugActiveProcess,'DebugActiveProcess',DebugBreak,'DebugBreak',DefineDosDeviceA,'DefineDosDeviceA',DefineDosDeviceW,'DefineDosDeviceW',DeleteAtom,'DeleteAtom',DeleteCriticalSection,'DeleteCriticalSection',DeleteFiber,'DeleteFiber',DeleteFileA,'DeleteFileA',DeleteFileW,'DeleteFileW',DeviceIoControl,'DeviceIoControl',DisableThreadLibraryCalls,'DisableThreadLibraryCalls',DisconnectNamedPipe,'DisconnectNamedPipe',DosDateTimeToFileTime,'DosDateTimeToFileTime',DuplicateConsoleHandle,'DuplicateConsoleHandle',DuplicateHandle,'DuplicateHandle',EndUpdateResourceA,'EndUpdateResourceA',EndUpdateResourceW,'EndUpdateResourceW',EnterCriticalSection,'EnterCriticalSection',EnumCalendarInfoA,'EnumCalendarInfoA',EnumCalendarInfoW,'EnumCalendarInfoW',EnumCalendarInfoExA,'EnumCalendarInfoExA',EnumCalendarInfoExW,'EnumCalendarInfoExW',EnumDateFormatsA,'EnumDateFormatsA',EnumDateFormatsW,'EnumDateFormatsW',EnumDateFormatsExA,'EnumDateFormatsExA',EnumDateFormatsExW,'EnumDateFormatsExW',EnumResourceLanguagesA,'EnumResourceLanguagesA',EnumResourceLanguagesW,'EnumResourceLanguagesW',EnumResourceNamesA,'EnumResourceNamesA',EnumResourceNamesW,'EnumResourceNamesW',EnumResourceTypesA,'EnumResourceTypesA',EnumResourceTypesW,'EnumResourceTypesW',EnumSystemCodePagesA,'EnumSystemCodePagesA',EnumSystemCodePagesW,'EnumSystemCodePagesW',EnumSystemLocalesA,'EnumSystemLocalesA',EnumSystemLocalesW,'EnumSystemLocalesW',EnumTimeFormatsA,'EnumTimeFormatsA',EnumTimeFormatsW,'EnumTimeFormatsW',EraseTape,'EraseTape',EscapeCommFunction,'EscapeCommFunction',ExitProcess,'ExitProcess',ExitThread,'ExitThread',ExitVDM,'ExitVDM',ExpandEnvironmentStringsA,'ExpandEnvironmentStringsA',ExpandEnvironmentStringsW,'ExpandEnvironmentStringsW',ExpungeConsoleCommandHistoryA,'ExpungeConsoleCommandHistoryA',ExpungeConsoleCommandHistoryW,'ExpungeConsoleCommandHistoryW',ExtendVirtualBuffer,'ExtendVirtualBuffer',FatalAppExitA,'FatalAppExitA',FatalAppExitW,'FatalAppExitW',FatalExit,'FatalExit',FileTimeToDosDateTime,'FileTimeToDosDateTime',FileTimeToLocalFileTime,'FileTimeToLocalFileTime',FileTimeToSystemTime,'FileTimeToSystemTime',FillConsoleOutputAttribute,'FillConsoleOutputAttribute',FillConsoleOutputCharacterA,'FillConsoleOutputCharacterA',FillConsoleOutputCharacterW,'FillConsoleOutputCharacterW',FindAtomA,'FindAtomA',FindAtomW,'FindAtomW',FindClose,'FindClose',FindCloseChangeNotification,'FindCloseChangeNotification',FindFirstChangeNotificationA,'FindFirstChangeNotificationA',FindFirstChangeNotificationW,'FindFirstChangeNotificationW',FindFirstFileA,'FindFirstFileA',FindFirstFileW,'FindFirstFileW',FindFirstFileExA,'FindFirstFileExA',FindFirstFileExW,'FindFirstFileExW',FindNextChangeNotification,'FindNextChangeNotification',FindNextFileA,'FindNextFileA',FindNextFileW,'FindNextFileW',FindResourceA,'FindResourceA',FindResourceW,'FindResourceW',FindResourceExA,'FindResourceExA',FindResourceExW,'FindResourceExW',FlushConsoleInputBuffer,'FlushConsoleInputBuffer',FlushFileBuffers,'FlushFileBuffers',FlushInstructionCache,'FlushInstructionCache',FlushViewOfFile,'FlushViewOfFile',FoldStringA,'FoldStringA',FoldStringW,'FoldStringW',FormatMessageA,'FormatMessageA',FormatMessageW,'FormatMessageW',FreeConsole,'FreeConsole',FreeEnvironmentStringsA,'FreeEnvironmentStringsA',FreeEnvironmentStringsW,'FreeEnvironmentStringsW',FreeLibrary,'FreeLibrary',FreeLibraryAndExitThread,'FreeLibraryAndExitThread',FreeResource,'FreeResource',FreeVirtualBuffer,'FreeVirtualBuffer',GenerateConsoleCtrlEvent,'GenerateConsoleCtrlEvent',GetACP,'GetACP',GetAtomNameA,'GetAtomNameA',GetAtomNameW,'GetAtomNameW',GetBinaryTypeA,'GetBinaryTypeA',GetBinaryTypeW,'GetBinaryTypeW',GetCPInfo,'GetCPInfo',GetCPInfoExA,'GetCPInfoExA',GetCPInfoExW,'GetCPInfoExW',GetCommConfig,'GetCommConfig',GetCommMask,'GetCommMask',GetCommModemStatus,'GetCommModemStatus',GetCommProperties,'GetCommProperties',GetCommState,'GetCommState',GetCommTimeouts,'GetCommTimeouts',GetCommandLineA,'GetCommandLineA',GetCommandLineW,'GetCommandLineW',GetCompressedFileSizeA,'GetCompressedFileSizeA',GetCompressedFileSizeW,'GetCompressedFileSizeW',GetComputerNameA,'GetComputerNameA',GetComputerNameW,'GetComputerNameW',GetConsoleAliasA,'GetConsoleAliasA',GetConsoleAliasW,'GetConsoleAliasW',GetConsoleAliasExesA,'GetConsoleAliasExesA',GetConsoleAliasExesW,'GetConsoleAliasExesW',GetConsoleAliasExesLengthA,'GetConsoleAliasExesLengthA',GetConsoleAliasExesLengthW,'GetConsoleAliasExesLengthW',GetConsoleAliasesA,'GetConsoleAliasesA',GetConsoleAliasesW,'GetConsoleAliasesW',GetConsoleAliasesLengthA,'GetConsoleAliasesLengthA',GetConsoleAliasesLengthW,'GetConsoleAliasesLengthW',GetConsoleCP,'GetConsoleCP',GetConsoleCommandHistoryA,'GetConsoleCommandHistoryA',GetConsoleCommandHistoryW,'GetConsoleCommandHistoryW',GetConsoleCommandHistoryLengthA,'GetConsoleCommandHistoryLengthA',GetConsoleCommandHistoryLengthW,'GetConsoleCommandHistoryLengthW',GetConsoleCursorInfo,'GetConsoleCursorInfo',GetConsoleDisplayMode,'GetConsoleDisplayMode',GetConsoleFontInfo,'GetConsoleFontInfo',GetConsoleFontSize,'GetConsoleFontSize',GetConsoleHardwareState,'GetConsoleHardwareState',GetConsoleInputExeNameA,'GetConsoleInputExeNameA',GetConsoleInputExeNameW,'GetConsoleInputExeNameW',GetConsoleInputWaitHandle,'GetConsoleInputWaitHandle',GetConsoleKeyboardLayoutNameA,'GetConsoleKeyboardLayoutNameA',GetConsoleKeyboardLayoutNameW,'GetConsoleKeyboardLayoutNameW',GetConsoleMode,'GetConsoleMode',GetConsoleOutputCP,'GetConsoleOutputCP',GetConsoleScreenBufferInfo,'GetConsoleScreenBufferInfo',GetConsoleTitleA,'GetConsoleTitleA',GetConsoleTitleW,'GetConsoleTitleW',GetConsoleWindow,'GetConsoleWindow',GetCurrencyFormatA,'GetCurrencyFormatA',GetCurrencyFormatW,'GetCurrencyFormatW',GetCurrentConsoleFont,'GetCurrentConsoleFont',GetCurrentDirectoryA,'GetCurrentDirectoryA',GetCurrentDirectoryW,'GetCurrentDirectoryW',GetCurrentProcess,'GetCurrentProcess',GetCurrentProcessId,'GetCurrentProcessId',GetCurrentThread,'GetCurrentThread',GetCurrentThreadId,'GetCurrentThreadId',GetDateFormatA,'GetDateFormatA',GetDateFormatW,'GetDateFormatW',GetDefaultCommConfigA,'GetDefaultCommConfigA',GetDefaultCommConfigW,'GetDefaultCommConfigW',GetDevicePowerState,'GetDevicePowerState',GetDiskFreeSpaceA,'GetDiskFreeSpaceA',GetDiskFreeSpaceW,'GetDiskFreeSpaceW',GetDiskFreeSpaceExA,'GetDiskFreeSpaceExA',GetDiskFreeSpaceExW,'GetDiskFreeSpaceExW',GetDriveTypeA,'GetDriveTypeA',GetDriveTypeW,'GetDriveTypeW',GetEnvironmentStringsA,'GetEnvironmentStringsA',GetEnvironmentStringsW,'GetEnvironmentStringsW',GetEnvironmentVariableA,'GetEnvironmentVariableA',GetEnvironmentVariableW,'GetEnvironmentVariableW',GetExitCodeProcess,'GetExitCodeProcess',GetExitCodeThread,'GetExitCodeThread',GetFileAttributesA,'GetFileAttributesA',GetFileAttributesW,'GetFileAttributesW',GetFileAttributesExA,'GetFileAttributesExA',GetFileAttributesExW,'GetFileAttributesExW',GetFileInformationByHandle,'GetFileInformationByHandle',GetFileSize,'GetFileSize',GetFileSizeEx,'GetFileSizeEx',GetFileTime,'GetFileTime',GetFileType,'GetFileType',GetFullPathNameA,'GetFullPathNameA',GetFullPathNameW,'GetFullPathNameW',GetHandleInformation,'GetHandleInformation',GetLargestConsoleWindowSize,'GetLargestConsoleWindowSize',GetLastError,'GetLastError',GetLocalTime,'GetLocalTime',GetLocaleInfoA,'GetLocaleInfoA',GetLocaleInfoW,'GetLocaleInfoW',GetLogicalDriveStringsA,'GetLogicalDriveStringsA',GetLogicalDriveStringsW,'GetLogicalDriveStringsW',GetLogicalDrives,'GetLogicalDrives',GetLongPathNameA,'GetLongPathNameA',GetLongPathNameW,'GetLongPathNameW',GetMailslotInfo,'GetMailslotInfo',GetModuleFileNameA,'GetModuleFileNameA',GetModuleFileNameW,'GetModuleFileNameW',GetModuleHandleA,'GetModuleHandleA',GetModuleHandleW,'GetModuleHandleW',GetNamedPipeHandleStateA,'GetNamedPipeHandleStateA',GetNamedPipeHandleStateW,'GetNamedPipeHandleStateW',GetNamedPipeInfo,'GetNamedPipeInfo',GetNextVDMCommand,'GetNextVDMCommand',GetNumberFormatA,'GetNumberFormatA',GetNumberFormatW,'GetNumberFormatW',GetNumberOfConsoleFonts,'GetNumberOfConsoleFonts',GetNumberOfConsoleInputEvents,'GetNumberOfConsoleInputEvents',GetNumberOfConsoleMouseButtons,'GetNumberOfConsoleMouseButtons',GetOEMCP,'GetOEMCP',GetOverlappedResult,'GetOverlappedResult',GetPriorityClass,'GetPriorityClass',GetPrivateProfileIntA,'GetPrivateProfileIntA',GetPrivateProfileIntW,'GetPrivateProfileIntW',GetPrivateProfileSectionA,'GetPrivateProfileSectionA',GetPrivateProfileSectionW,'GetPrivateProfileSectionW',GetPrivateProfileSectionNamesA,'GetPrivateProfileSectionNamesA',GetPrivateProfileSectionNamesW,'GetPrivateProfileSectionNamesW',GetPrivateProfileStringA,'GetPrivateProfileStringA',GetPrivateProfileStringW,'GetPrivateProfileStringW',GetPrivateProfileStructA,'GetPrivateProfileStructA',GetPrivateProfileStructW,'GetPrivateProfileStructW',GetProcAddress,'GetProcAddress',GetProcessAffinityMask,'GetProcessAffinityMask',GetProcessHeap,'GetProcessHeap',GetProcessHeaps,'GetProcessHeaps',GetProcessPriorityBoost,'GetProcessPriorityBoost',GetProcessShutdownParameters,'GetProcessShutdownParameters',GetProcessTimes,'GetProcessTimes',GetProcessVersion,'GetProcessVersion',GetProcessWorkingSetSize,'GetProcessWorkingSetSize',GetProfileIntA,'GetProfileIntA',GetProfileIntW,'GetProfileIntW',GetProfileSectionA,'GetProfileSectionA',GetProfileSectionW,'GetProfileSectionW',GetProfileStringA,'GetProfileStringA',GetProfileStringW,'GetProfileStringW',GetQueuedCompletionStatus,'GetQueuedCompletionStatus',GetShortPathNameA,'GetShortPathNameA',GetShortPathNameW,'GetShortPathNameW',GetStartupInfoA,'GetStartupInfoA',GetStartupInfoW,'GetStartupInfoW',GetStdHandle,'GetStdHandle',GetStringTypeA,'GetStringTypeA',GetStringTypeW,'GetStringTypeW',GetStringTypeExA,'GetStringTypeExA',GetStringTypeExW,'GetStringTypeExW',GetSystemDefaultLCID,'GetSystemDefaultLCID',GetSystemDefaultLangID,'GetSystemDefaultLangID',GetSystemDirectoryA,'GetSystemDirectoryA',GetSystemDirectoryW,'GetSystemDirectoryW',GetSystemInfo,'GetSystemInfo',GetSystemPowerStatus,'GetSystemPowerStatus',GetSystemTime,'GetSystemTime',GetSystemTimeAdjustment,'GetSystemTimeAdjustment',GetSystemTimeAsFileTime,'GetSystemTimeAsFileTime',GetTapeParameters,'GetTapeParameters',GetTapePosition,'GetTapePosition',GetTapeStatus,'GetTapeStatus',GetTempFileNameA,'GetTempFileNameA',GetTempFileNameW,'GetTempFileNameW',GetTempPathA,'GetTempPathA',GetTempPathW,'GetTempPathW',GetThreadContext,'GetThreadContext',GetThreadLocale,'GetThreadLocale',GetThreadPriority,'GetThreadPriority',GetThreadPriorityBoost,'GetThreadPriorityBoost',GetThreadSelectorEntry,'GetThreadSelectorEntry',GetThreadTimes,'GetThreadTimes',GetTickCount,'GetTickCount',GetTimeFormatA,'GetTimeFormatA',GetTimeFormatW,'GetTimeFormatW',GetTimeZoneInformation,'GetTimeZoneInformation',GetUserDefaultLCID,'GetUserDefaultLCID',GetUserDefaultLangID,'GetUserDefaultLangID',GetVDMCurrentDirectories,'GetVDMCurrentDirectories',GetVersion,'GetVersion',GetVersionExA,'GetVersionExA',GetVersionExW,'GetVersionExW',GetVolumeInformationA,'GetVolumeInformationA',GetVolumeInformationW,'GetVolumeInformationW',GetWindowsDirectoryA,'GetWindowsDirectoryA',GetWindowsDirectoryW,'GetWindowsDirectoryW',GlobalAddAtomA,'GlobalAddAtomA',GlobalAddAtomW,'GlobalAddAtomW',GlobalAlloc,'GlobalAlloc',GlobalCompact,'GlobalCompact',GlobalDeleteAtom,'GlobalDeleteAtom',GlobalFindAtomA,'GlobalFindAtomA',GlobalFindAtomW,'GlobalFindAtomW',GlobalFix,'GlobalFix',GlobalFlags,'GlobalFlags',GlobalFree,'GlobalFree',GlobalGetAtomNameA,'GlobalGetAtomNameA',GlobalGetAtomNameW,'GlobalGetAtomNameW',GlobalHandle,'GlobalHandle',GlobalLock,'GlobalLock',GlobalMemoryStatus,'GlobalMemoryStatus',GlobalMemoryStatusVlm,'GlobalMemoryStatusVlm',GlobalReAlloc,'GlobalReAlloc',GlobalSize,'GlobalSize',GlobalUnWire,'GlobalUnWire',GlobalUnfix,'GlobalUnfix',GlobalUnlock,'GlobalUnlock',GlobalWire,'GlobalWire',Heap32First,'Heap32First',Heap32ListFirst,'Heap32ListFirst',Heap32ListNext,'Heap32ListNext',Heap32Next,'Heap32Next',HeapAlloc,'HeapAlloc',HeapCompact,'HeapCompact',HeapCreate,'HeapCreate',HeapDestroy,'HeapDestroy',HeapExtend,'HeapExtend',HeapFree,'HeapFree',HeapLock,'HeapLock',HeapReAlloc,'HeapReAlloc',HeapSize,'HeapSize',HeapSummary,'HeapSummary',HeapUnlock,'HeapUnlock',HeapUsage,'HeapUsage',HeapValidate,'HeapValidate',HeapWalk,'HeapWalk',InitAtomTable,'InitAtomTable',InitializeCriticalSection,'InitializeCriticalSection',InitializeCriticalSectionAndSpinCount,'InitializeCriticalSectionAndSpinCount',InterlockedCompareExchange,'InterlockedCompareExchange',InterlockedDecrement,'InterlockedDecrement',InterlockedExchange,'InterlockedExchange',InterlockedExchangeAdd,'InterlockedExchangeAdd',InterlockedIncrement,'InterlockedIncrement',InvalidateConsoleDIBits,'InvalidateConsoleDIBits',IsBadCodePtr,'IsBadCodePtr',IsBadHugeReadPtr,'IsBadHugeReadPtr',IsBadHugeWritePtr,'IsBadHugeWritePtr',IsBadReadPtr,'IsBadReadPtr',IsBadStringPtrA,'IsBadStringPtrA',IsBadStringPtrW,'IsBadStringPtrW',IsBadWritePtr,'IsBadWritePtr',IsDBCSLeadByte,'IsDBCSLeadByte',IsDBCSLeadByteEx,'IsDBCSLeadByteEx',IsDebuggerPresent,'IsDebuggerPresent',IsProcessorFeaturePresent,'IsProcessorFeaturePresent',IsValidCodePage,'IsValidCodePage',IsValidLocale,'IsValidLocale',LCMapStringA,'LCMapStringA',LCMapStringW,'LCMapStringW',LeaveCriticalSection,'LeaveCriticalSection',LoadLibraryA,'LoadLibraryA',LoadLibraryW,'LoadLibraryW',LoadLibraryExA,'LoadLibraryExA',LoadLibraryExW,'LoadLibraryExW',LoadModule,'LoadModule',LoadResource,'LoadResource',LocalAlloc,'LocalAlloc',LocalCompact,'LocalCompact',LocalFileTimeToFileTime,'LocalFileTimeToFileTime',LocalFlags,'LocalFlags',LocalFree,'LocalFree',LocalHandle,'LocalHandle',LocalLock,'LocalLock',LocalReAlloc,'LocalReAlloc',LocalShrink,'LocalShrink',LocalSize,'LocalSize',LocalUnlock,'LocalUnlock',LockFile,'LockFile',LockFileEx,'LockFileEx',LockResource,'LockResource',MapViewOfFile,'MapViewOfFile',MapViewOfFileEx,'MapViewOfFileEx',MapViewOfFileVlm,'MapViewOfFileVlm',Module32First,'Module32First',Module32Next,'Module32Next',MoveFileA,'MoveFileA',MoveFileW,'MoveFileW',MoveFileExA,'MoveFileExA',MoveFileExW,'MoveFileExW',MoveFileWithProgressA,'MoveFileWithProgressA',MoveFileWithProgressW,'MoveFileWithProgressW',MulDiv,'MulDiv',MultiByteToWideChar,'MultiByteToWideChar',OpenEventA,'OpenEventA',OpenEventW,'OpenEventW',OpenFile,'OpenFile',OpenFileMappingA,'OpenFileMappingA',OpenFileMappingW,'OpenFileMappingW',OpenJobObjectA,'OpenJobObjectA',OpenJobObjectW,'OpenJobObjectW',OpenMutexA,'OpenMutexA',OpenMutexW,'OpenMutexW',OpenProcess,'OpenProcess',OpenProfileUserMapping,'OpenProfileUserMapping',OpenSemaphoreA,'OpenSemaphoreA',OpenSemaphoreW,'OpenSemaphoreW',OpenWaitableTimerA,'OpenWaitableTimerA',OpenWaitableTimerW,'OpenWaitableTimerW',OutputDebugStringA,'OutputDebugStringA',OutputDebugStringW,'OutputDebugStringW',PeekConsoleInputA,'PeekConsoleInputA',PeekConsoleInputW,'PeekConsoleInputW',PeekNamedPipe,'PeekNamedPipe',PostQueuedCompletionStatus,'PostQueuedCompletionStatus',PrepareTape,'PrepareTape',Process32First,'Process32First',Process32Next,'Process32Next',PulseEvent,'PulseEvent',PurgeComm,'PurgeComm',QueryDosDeviceA,'QueryDosDeviceA',QueryDosDeviceW,'QueryDosDeviceW',QueryInformationJobObject,'QueryInformationJobObject',QueryPerformanceCounter,'QueryPerformanceCounter',QueryPerformanceFrequency,'QueryPerformanceFrequency',QueryWin31IniFilesMappedToRegistry,'QueryWin31IniFilesMappedToRegistry',QueueUserAPC,'QueueUserAPC',RaiseException,'RaiseException',ReadConsoleA,'ReadConsoleA',ReadConsoleW,'ReadConsoleW',ReadConsoleInputA,'ReadConsoleInputA',ReadConsoleInputW,'ReadConsoleInputW',ReadConsoleInputExA,'ReadConsoleInputExA',ReadConsoleInputExW,'ReadConsoleInputExW',ReadConsoleOutputA,'ReadConsoleOutputA',ReadConsoleOutputW,'ReadConsoleOutputW',ReadConsoleOutputAttribute,'ReadConsoleOutputAttribute',ReadConsoleOutputCharacterA,'ReadConsoleOutputCharacterA',ReadConsoleOutputCharacterW,'ReadConsoleOutputCharacterW',ReadFile,'ReadFile',ReadFileEx,'ReadFileEx',ReadFileScatter,'ReadFileScatter',ReadFileVlm,'ReadFileVlm',ReadProcessMemory,'ReadProcessMemory',ReadProcessMemoryVlm,'ReadProcessMemoryVlm',RegisterConsoleVDM,'RegisterConsoleVDM',RegisterWaitForInputIdle,'RegisterWaitForInputIdle',RegisterWowBaseHandlers,'RegisterWowBaseHandlers',RegisterWowExec,'RegisterWowExec',ReleaseMutex,'ReleaseMutex',ReleaseSemaphore,'ReleaseSemaphore',RemoveDirectoryA,'RemoveDirectoryA',RemoveDirectoryW,'RemoveDirectoryW',RequestWakeupLatency,'RequestWakeupLatency',ResetEvent,'ResetEvent',ResumeThread,'ResumeThread',RtlFillMemory,'RtlFillMemory',RtlMoveMemory,'RtlMoveMemory',RtlUnwind,'RtlUnwind',RtlZeroMemory,'RtlZeroMemory',ScrollConsoleScreenBufferA,'ScrollConsoleScreenBufferA',ScrollConsoleScreenBufferW,'ScrollConsoleScreenBufferW',SearchPathA,'SearchPathA',SearchPathW,'SearchPathW',SetCommBreak,'SetCommBreak',SetCommConfig,'SetCommConfig',SetCommMask,'SetCommMask',SetCommState,'SetCommState',SetCommTimeouts,'SetCommTimeouts',SetComputerNameA,'SetComputerNameA',SetComputerNameW,'SetComputerNameW',SetConsoleActiveScreenBuffer,'SetConsoleActiveScreenBuffer',SetConsoleCP,'SetConsoleCP',SetConsoleCommandHistoryMode,'SetConsoleCommandHistoryMode',SetConsoleCtrlHandler,'SetConsoleCtrlHandler',SetConsoleCursor,'SetConsoleCursor',SetConsoleCursorInfo,'SetConsoleCursorInfo',SetConsoleCursorPosition,'SetConsoleCursorPosition',SetConsoleDisplayMode,'SetConsoleDisplayMode',SetConsoleFont,'SetConsoleFont',SetConsoleHardwareState,'SetConsoleHardwareState',SetConsoleIcon,'SetConsoleIcon',SetConsoleInputExeNameA,'SetConsoleInputExeNameA',SetConsoleInputExeNameW,'SetConsoleInputExeNameW',SetConsoleKeyShortcuts,'SetConsoleKeyShortcuts',SetConsoleMaximumWindowSize,'SetConsoleMaximumWindowSize',SetConsoleMenuClose,'SetConsoleMenuClose',SetConsoleMode,'SetConsoleMode',SetConsoleNumberOfCommandsA,'SetConsoleNumberOfCommandsA',SetConsoleNumberOfCommandsW,'SetConsoleNumberOfCommandsW',SetConsoleOutputCP,'SetConsoleOutputCP',SetConsolePalette,'SetConsolePalette',SetConsoleScreenBufferSize,'SetConsoleScreenBufferSize',SetConsoleTextAttribute,'SetConsoleTextAttribute',SetConsoleTitleA,'SetConsoleTitleA',SetConsoleTitleW,'SetConsoleTitleW',SetConsoleWindowInfo,'SetConsoleWindowInfo',SetCriticalSectionSpinCount,'SetCriticalSectionSpinCount',SetCurrentDirectoryA,'SetCurrentDirectoryA',SetCurrentDirectoryW,'SetCurrentDirectoryW',SetDefaultCommConfigA,'SetDefaultCommConfigA',SetDefaultCommConfigW,'SetDefaultCommConfigW',SetEndOfFile,'SetEndOfFile',SetEnvironmentVariableA,'SetEnvironmentVariableA',SetEnvironmentVariableW,'SetEnvironmentVariableW',SetErrorMode,'SetErrorMode',SetEvent,'SetEvent',SetFileApisToANSI,'SetFileApisToANSI',SetFileApisToOEM,'SetFileApisToOEM',SetFileAttributesA,'SetFileAttributesA',SetFileAttributesW,'SetFileAttributesW',SetFilePointer,'SetFilePointer',SetFilePointerEx,'SetFilePointerEx',SetFileTime,'SetFileTime',SetHandleCount,'SetHandleCount',SetHandleInformation,'SetHandleInformation',SetInformationJobObject,'SetInformationJobObject',SetLastConsoleEventActive,'SetLastConsoleEventActive',SetLastError,'SetLastError',SetLocalTime,'SetLocalTime',SetLocaleInfoA,'SetLocaleInfoA',SetLocaleInfoW,'SetLocaleInfoW',SetMailslotInfo,'SetMailslotInfo',SetNamedPipeHandleState,'SetNamedPipeHandleState',SetPriorityClass,'SetPriorityClass',SetProcessAffinityMask,'SetProcessAffinityMask',SetProcessPriorityBoost,'SetProcessPriorityBoost',SetProcessShutdownParameters,'SetProcessShutdownParameters',SetProcessWorkingSetSize,'SetProcessWorkingSetSize',SetStdHandle,'SetStdHandle',SetSystemPowerState,'SetSystemPowerState',SetSystemTime,'SetSystemTime',SetSystemTimeAdjustment,'SetSystemTimeAdjustment',SetTapeParameters,'SetTapeParameters',SetTapePosition,'SetTapePosition',SetThreadAffinityMask,'SetThreadAffinityMask',SetThreadContext,'SetThreadContext',SetThreadExecutionState,'SetThreadExecutionState',SetThreadIdealProcessor,'SetThreadIdealProcessor',SetThreadLocale,'SetThreadLocale',SetThreadPriority,'SetThreadPriority',SetThreadPriorityBoost,'SetThreadPriorityBoost',SetTimeZoneInformation,'SetTimeZoneInformation',SetUnhandledExceptionFilter,'SetUnhandledExceptionFilter',SetVDMCurrentDirectories,'SetVDMCurrentDirectories',SetVolumeLabelA,'SetVolumeLabelA',SetVolumeLabelW,'SetVolumeLabelW',SetWaitableTimer,'SetWaitableTimer',SetupComm,'SetupComm',ShowConsoleCursor,'ShowConsoleCursor',SignalObjectAndWait,'SignalObjectAndWait',SizeofResource,'SizeofResource',Sleep,'Sleep',SleepEx,'SleepEx',SuspendThread,'SuspendThread',SwitchToFiber,'SwitchToFiber',SwitchToThread,'SwitchToThread',SystemTimeToFileTime,'SystemTimeToFileTime',SystemTimeToTzSpecificLocalTime,'SystemTimeToTzSpecificLocalTime',TerminateJobObject,'TerminateJobObject',TerminateProcess,'TerminateProcess',TerminateThread,'TerminateThread',Thread32First,'Thread32First',Thread32Next,'Thread32Next',TlsAlloc,'TlsAlloc',TlsFree,'TlsFree',TlsGetValue,'TlsGetValue',TlsSetValue,'TlsSetValue',Toolhelp32ReadProcessMemory,'Toolhelp32ReadProcessMemory',TransactNamedPipe,'TransactNamedPipe',TransmitCommChar,'TransmitCommChar',TrimVirtualBuffer,'TrimVirtualBuffer',TryEnterCriticalSection,'TryEnterCriticalSection',UnhandledExceptionFilter,'UnhandledExceptionFilter',UnlockFile,'UnlockFile',UnlockFileEx,'UnlockFileEx',UnmapViewOfFile,'UnmapViewOfFile',UnmapViewOfFileVlm,'UnmapViewOfFileVlm',UpdateResourceA,'UpdateResourceA',UpdateResourceW,'UpdateResourceW',VDMConsoleOperation,'VDMConsoleOperation',VDMOperationStarted,'VDMOperationStarted',VerLanguageNameA,'VerLanguageNameA',VerLanguageNameW,'VerLanguageNameW',VerifyConsoleIoHandle,'VerifyConsoleIoHandle',VirtualAlloc,'VirtualAlloc',VirtualAllocEx,'VirtualAllocEx',VirtualAllocVlm,'VirtualAllocVlm',VirtualBufferExceptionHandler,'VirtualBufferExceptionHandler',VirtualFree,'VirtualFree',VirtualFreeEx,'VirtualFreeEx',VirtualFreeVlm,'VirtualFreeVlm',VirtualLock,'VirtualLock',VirtualProtect,'VirtualProtect',VirtualProtectEx,'VirtualProtectEx',VirtualProtectVlm,'VirtualProtectVlm',VirtualQuery,'VirtualQuery',VirtualQueryEx,'VirtualQueryEx',VirtualQueryVlm,'VirtualQueryVlm',VirtualUnlock,'VirtualUnlock',WaitCommEvent,'WaitCommEvent',WaitForDebugEvent,'WaitForDebugEvent',WaitForMultipleObjects,'WaitForMultipleObjects',WaitForMultipleObjectsEx,'WaitForMultipleObjectsEx',WaitForSingleObject,'WaitForSingleObject',WaitForSingleObjectEx,'WaitForSingleObjectEx',WaitNamedPipeA,'WaitNamedPipeA',WaitNamedPipeW,'WaitNamedPipeW',WideCharToMultiByte,'WideCharToMultiByte',WinExec,'WinExec',WriteConsoleA,'WriteConsoleA',WriteConsoleW,'WriteConsoleW',WriteConsoleInputA,'WriteConsoleInputA',WriteConsoleInputW,'WriteConsoleInputW',WriteConsoleInputVDMA,'WriteConsoleInputVDMA',WriteConsoleInputVDMW,'WriteConsoleInputVDMW',WriteConsoleOutputA,'WriteConsoleOutputA',WriteConsoleOutputW,'WriteConsoleOutputW',WriteConsoleOutputAttribute,'WriteConsoleOutputAttribute',WriteConsoleOutputCharacterA,'WriteConsoleOutputCharacterA',WriteConsoleOutputCharacterW,'WriteConsoleOutputCharacterW',WriteFile,'WriteFile',WriteFileEx,'WriteFileEx',WriteFileGather,'WriteFileGather',WriteFileVlm,'WriteFileVlm',WritePrivateProfileSectionA,'WritePrivateProfileSectionA',WritePrivateProfileSectionW,'WritePrivateProfileSectionW',WritePrivateProfileStringA,'WritePrivateProfileStringA',WritePrivateProfileStringW,'WritePrivateProfileStringW',WritePrivateProfileStructA,'WritePrivateProfileStructA',WritePrivateProfileStructW,'WritePrivateProfileStructW',WriteProcessMemory,'WriteProcessMemory',WriteProcessMemoryVlm,'WriteProcessMemoryVlm',WriteProfileSectionA,'WriteProfileSectionA',WriteProfileSectionW,'WriteProfileSectionW',WriteProfileStringA,'WriteProfileStringA',WriteProfileStringW,'WriteProfileStringW',WriteTapemark,'WriteTapemark',_hread,'_hread',_hwrite,'_hwrite',_lclose,'_lclose',_lcreat,'_lcreat',_llseek,'_llseek',_lopen,'_lopen',_lread,'_lread',_lwrite,'_lwrite',lstrcatA,'lstrcatA',lstrcatW,'lstrcatW',lstrcmpA,'lstrcmpA',lstrcmpW,'lstrcmpW',lstrcmpiA,'lstrcmpiA',lstrcmpiW,'lstrcmpiW',lstrcpyA,'lstrcpyA',lstrcpyW,'lstrcpyW',lstrcpynA,'lstrcpynA',lstrcpynW,'lstrcpynW',lstrlenA,'lstrlenA',lstrlenW,'lstrlenW' error: illegal instruction.
Замените Код (Text): extrn VirtualProtect на Код (Text): extrn '_VirtualProtect@16' as VirtualProtect Импорта после FASM не будет, будет внешний символ, а в импорт он встанет уже при компоновке.
Файл win32a/w[x].inc из комплекта fasm предназначен для format PE/PE64. У вас же format MS COFF. В этом формате (читаем доку по fasm на оф сайте) не нужно создавать import и section '.idata'. Эту секцию создаст линковщик, когда будет решать задачу соединения всех ваших объектников. Спойлер 2.4.3 Common Object File Format To select Common Object File Format, use format COFF or format MS COFF directive, depending whether you want to create classic (DJGPP) or Microsoft's variant of COFF file. The default code setting for this format is 32-bit. To create the file in Microsoft's COFF format for the x86-64 architecture, use format MS64 COFF setting, in such case long mode code is generated by default. section directive defines a new section, it should be followed by quoted string defining the name of section, then one or more section flags can follow. Section flags available for both COFF variants are code and data, while flags readable, writeable, executable, shareable, discardable, notpageable, linkremove and linkinfo are available only with Microsoft's COFF variant. By default section is aligned to double word (four bytes), in case of Microsoft COFF variant other alignment can be specified by providing the align operator followed by alignment value (any power of two up to 8192) among the section flags. extrn directive defines the external symbol, it should be followed by the name of symbol and optionally the size operator specifying the size of data labeled by this symbol. The name of symbol can be also preceded by quoted string containing name of the external symbol and the as operator. Some example declarations of external symbols: extrn exit extrn '__imp__MessageBoxA@16' as MessageBox:dword public directive declares the existing symbol as public, it should be followed by the name of symbol, optionally it can be followed by the as operator and the quoted string containing name under which symbol should be available as public. Some examples of public symbols declarations: public main public start as '_start' Additionally, with COFF format it's possible to specify exported symbol as static, it's done by preceding the name of symbol with the static keyword. When using the Microsoft's COFF format, the rva operator can be used inside the numerical expressions to obtain the RVA of the item addressed by the value it is applied to.