The formula is correct if the jump instruction has exactly 5 bytes, and FROM is the address of this jump instruction. If the length is not 5 or the FROM not where jmp is, this is not true.
With this, you get modulo 2 32 arithmetic:
2980000H- (6259326BH + 5) = 0A03ECD90H.
If you do not understand how 2980000H - 62593270H equals 0A03ECD90H in 32 bits, imagine for a moment that you subtract from 102980000H instead of 2980000H, that is, you set the 33rd bit. Then you have 102980000H - 62593270H = 0A03ECD90H. And you can check that 102980000H = 62593270H + 0A03ECD90H. But since you only have 32 bits to calculate, this 33rd bit, no matter what it is, will not affect the amount and difference. Thus, you simply subtract the two numbers as 32-bit numbers and accept the least significant 32 bits of the result, ignoring any outstanding roles from the bits outside the 32nd.
And 0A03ECD90H should be encoded in the jmp instruction from the least significant byte to the most significant byte, so you will get this sequence of bytes encoding the instruction:
E9, 90, CD, 3E, A0.
A similar question was asked before.
source share