File tree 1 file changed +10
-2
lines changed
bundles/org.eclipse.swt/Eclipse SWT PI/win32/library
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -234,9 +234,17 @@ BOOL Validate_SetPreferredAppMode(const BYTE* functionPtr)
234
234
(functionPtr [0x06 ] == 0x87 ) && (functionPtr [0x07 ] == 0x0D ) && // xchg ecx,dword ptr [uxtheme!g_preferredAppMode]
235
235
(functionPtr [0x0C ] == 0xC3 ); // ret
236
236
#elif defined(_M_ARM64 )
237
- if (* (const DWORD * )(& functionPtr [0x1C ]) == 0x912F6100 ) // add x0,x8,#0xBD8
237
+ const DWORD ldr = * (const DWORD * )(& functionPtr [0x14 ]);
238
+ const DWORD add = * (const DWORD * )(& functionPtr [0x1C ]);
239
+
240
+ if ((ldr & 0xFFC003FF ) == 0xB9400113 && // ldr, w19,[x8, arg0]
241
+ * (const DWORD * )(& functionPtr [0x18 ]) == 0x2A0003E1 && // mov w1,w0
242
+ (add & 0xFFC003FF ) == 0x91000100 && // add x0,x8,arg1
243
+ * (const DWORD * )(& functionPtr [0x24 ]) == 0x2A1303E0 ) // mov w0,w19
238
244
{
239
- return TRUE;
245
+ const DWORD arg0 = ((ldr & 0x003FFFFF ) >> 10 ) * 4 ;
246
+ const DWORD arg1 = ((add & 0x003FFFFF ) >> 10 );
247
+ return arg0 == arg1 ;
240
248
}
241
249
242
250
return FALSE;
You can’t perform that action at this time.
0 commit comments