github.com/wfusion/gofusion@v1.1.14/common/utils/gomonkey/jmp_386.go (about)

     1  package gomonkey
     2  
     3  func buildJmpDirective(double uintptr) []byte {
     4  	d0 := byte(double)
     5  	d1 := byte(double >> 8)
     6  	d2 := byte(double >> 16)
     7  	d3 := byte(double >> 24)
     8  
     9  	return []byte{
    10  		0xBA, d0, d1, d2, d3, // MOV edx, double
    11  		0xFF, 0x22, // JMP [edx]
    12  	}
    13  }