HN user

seritools

686 karma
Posts4
Comments141
View on HN

as far as i can tell, no it does not. it only desaturates 00 in particular. the other colors you see in the screenshots come from matched formats/patterns. it does not do direct coloring based on byte value.

you can also just uninstall the "new" notepad, at which point Windows will let you run the old one again (which is still shipped!).

By using a version that is _that_ old you do lose out on some of the actually useful updates legacy nodepad received, such as LF line ending support.

Because I felt like it :) Also works for multiple versions/patchlevels.

But yeah, with the info provided it should be patchable. It's a `push esi` though, where esi has to stay 0 for a few further usages, so it's a bit more than a one-byte patch. It also wouldn't fully resolve the OOB write in the rare case where you _do_ have 9+ game controllers connected.

am I right in thinking the DirectX library only exports a single function and _everything_ else is through DX interfaces

Yup! That's why I didn't have to create a gazillion passthrough functions.

The original DLL in my modern Windows installation has these 8 exports:

    DirectInputCreateA
    DirectInputCreateEx
    DirectInputCreateW
    DllCanUnloadNow
    DllGetClassObject
    DllRegisterServer
    DllUnregisterServer
The game only calls DirectInputCreateA, and the rest happens via the COM object that that function creates.
Tree Borrows 1 year ago

"can do things" in this case doesn't mean "is allowed to do things".

"Unsafe code allows to express the following, which is UB:"