"Find out why it does not work and I can make it work."
to find why it crash ,that is kind of tough....
you mean like opening from the start with MHS disassembler and looking at the instructions? and look for an exception?
Well the last thing i get is this
I have discovered that that memory in the picture is from module user32.
Now i have discover this:
So if i change the compare to 0 [cmp eax,0] then the detection is off. At least this one.
Yes the detection is off but it still crash in MHS, strangely is does not crash in Ollydgb (Ollydbg most be doing something because in MHS it said that is not the same length the changes i made). It also crash if I patch the exe in hex editor. So it maybe...