I hope you have read the 2 previous tutorials and liked them too!This is a quick tutor and it's to give you an idea about patching in .NETapplications.This tutor depends on the Opcodes table in Chapter I, so please make sure youhave the Opcodes table since we will use it later.
A Boolean-returning functions is very common, you will face it in many programs,It's a function that returns a Boolean [True, False] data type, sometimes it's usedon startup to make sure that the current user has registered or not, or to validate alicense file or whatever, and believe me you will see lots of these.
Application.run(New MainForm)ElseMsgbox "Please Register"
Application.run(New MainForm)End IF
This is not a real piece of code, I just wrote it this way to explain how thesefunctions can be used to change the program behavior, the
functionreturns a value which could be true or false.The
is a 16-bit data type that can only represent two values: True andFalse, when a numeric value is converted to Boolean, any nonzero value isconverted to True, and zero is converted to False. In the other direction, False isconverted to zero, True is converted to 1.The point here is to change the actual bytes of this function to make its returnalways evaluate to
according to the desired return value, what wehave to do here is to find the method in Ildasm and then analyze its code anddecide what we must change.