Originally posted by atomsymbol
Originally posted by atomsymbol
Yes this horrible stuff where code is modify calls and jumps on the fly. With extra bonus that the modification can be a value received from remote server so you cannot pre solve this. So the idea of translater parses assemble instructions in 4K pages basically does not work. Also processing in single instructions will cause code to time out.
Binary translation is not trivial to implement on the programs under windows using syscalls directly these are true evil applications. The application directly using windows syscalls don't care how much the weaken system security by using rwx(read write and execute) pages. They at times intentionally do a code modification to cause cpu to have to flush L1 because the cpus own branch predictor has gone down the wrong path and expect to see this stall this also means if you solve this horrible out application can still break.
The common reasons for doing the horrible of direct windows syscalls is anti-cheat. Common reason for self modify code in binaries is anti-debugging that is used to protect anti-cheat systems in clients in the developers mind from being simple to bypass. Once you have self modifying anti-debugging code to deal with binary translation gets a lot harder. Please note the anti-debugging code can be so touchy that true Windows users have the applications not run and have to be refunding for games they bought. Then you add in the different performance pattern of binary translated code welcome even less success at running.
The horrible reality here is the ideal applications with wine to be using dynamic translation with will not be the ones using direct Windows Syscalls. Your ideas are fine for the windows applications don't directly use windows syscalls and are not stacked with horrible self modifying anti-debuging code yes this turns out to be over 80% of the windows applications in existence.
Please note is over 99% of the applications directly using windows syscalls have anti-debugging code that is the self modifying type. So the bar to binary translate this class is not your basic or simple to perform binary translation but your insanely hard and complex binary translation to pull off with tones of pit falls. Yes some of these it will be simpler to write a clone game engine than work around the anti-debugging stuff in the existing engine.
Comment