MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / FindRet

Function FindRet

user/util/helper.go:57–77  ·  view source on GitHub ↗
(lib_path string, sym_offset, sym_size int64)

Source from the content-addressed store, hash-verified

55}
56
57func FindRet(lib_path string, sym_offset, sym_size int64) (string, error) {
58 file, err := os.Open(lib_path)
59 if err != nil {
60 return "", err
61 }
62 defer file.Close()
63
64 sym_data := make([]byte, sym_size)
65 _, err = file.Seek(sym_offset, 0)
66 if err != nil {
67 return "", err
68 }
69
70 _, err = file.Read(sym_data)
71 if err != nil {
72 return "", err
73 }
74
75 // https://armconverter.com/?code=RET -> C0035FD6
76 return FindIns(sym_offset, sym_data, []byte{0xC0, 0x03, 0x5F, 0xD6}), nil
77}
78
79func FindIns(sym_offset int64, sym_data, ins []byte) string {
80 var result []string

Callers 1

DumpSymbolRetFunction · 0.92

Calls 2

FindInsFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected